\doxysection{composition.\+cpp}
\hypertarget{composition_8cpp_source}{}\label{composition_8cpp_source}\index{src/composition/lib/composition.cpp@{src/composition/lib/composition.cpp}}
\mbox{\hyperlink{composition_8cpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00001}00001\ \textcolor{comment}{/*\ ***********************************************************************}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00002}00002\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00003}00003\ \textcolor{comment}{//\ \ \ Copyright\ (C)\ 2025\ -\/-\/\ The\ 4D-\/STAR\ Collaboration}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00004}00004\ \textcolor{comment}{//\ \ \ File\ Author:\ Emily\ Boudreaux}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00005}00005\ \textcolor{comment}{//\ \ \ Last\ Modified:\ March\ 26,\ 2025}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00006}00006\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00007}00007\ \textcolor{comment}{//\ \ \ 4DSSE\ is\ free\ software;\ you\ can\ use\ it\ and/or\ modify}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00008}00008\ \textcolor{comment}{//\ \ \ it\ under\ the\ terms\ and\ restrictions\ the\ GNU\ General\ Library\ Public}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00009}00009\ \textcolor{comment}{//\ \ \ License\ version\ 3\ (GPLv3)\ as\ published\ by\ the\ Free\ Software\ Foundation.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00010}00010\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00011}00011\ \textcolor{comment}{//\ \ \ 4DSSE\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00012}00012\ \textcolor{comment}{//\ \ \ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00013}00013\ \textcolor{comment}{//\ \ \ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00014}00014\ \textcolor{comment}{//\ \ \ See\ the\ GNU\ Library\ General\ Public\ License\ for\ more\ details.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00015}00015\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00016}00016\ \textcolor{comment}{//\ \ \ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ Library\ General\ Public\ License}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00017}00017\ \textcolor{comment}{//\ \ \ along\ with\ this\ software;\ if\ not,\ write\ to\ the\ Free\ Software}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00018}00018\ \textcolor{comment}{//\ \ \ Foundation,\ Inc.,\ 59\ Temple\ Place,\ Suite\ 330,\ Boston,\ MA\ 02111-\/1307\ USA}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00019}00019\ \textcolor{comment}{//}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00020}00020\ \textcolor{comment}{//\ ***********************************************************************\ */}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00021}00021\ \textcolor{preprocessor}{\#include\ "{}quill/LogMacros.h"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00022}00022\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00023}00023\ \textcolor{preprocessor}{\#include\ <stdexcept>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00024}00024\ \textcolor{preprocessor}{\#include\ <unordered\_map>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00025}00025\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00026}00026\ \textcolor{preprocessor}{\#include\ <array>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00027}00027\ \textcolor{preprocessor}{\#include\ <ranges>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00028}00028\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00029}00029\ \textcolor{preprocessor}{\#include\ <utility>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00030}00030\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00031}00031\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{atomic_species_8h}{fourdst/composition/atomicSpecies.h}}"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00032}00032\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{species_8h}{fourdst/composition/species.h}}"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00033}00033\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{composition_8h}{fourdst/composition/composition.h}}"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00034}00034\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{exceptions__composition_8h}{fourdst/composition/exceptions/exceptions\_composition.h}}"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00035}00035\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00036}00036\ \textcolor{keyword}{namespace\ }\mbox{\hyperlink{namespacefourdst_1_1composition}{fourdst::composition}}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00037}00037\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00038}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{00038}}\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{CompositionEntry::CompositionEntry}}()\ :}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00039}00039\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}(\textcolor{stringliteral}{"{}H-\/1"{}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00040}00040\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}(\mbox{\hyperlink{namespacefourdst}{fourdst}}::\mbox{\hyperlink{namespacefourdst_1_1atomic}{atomic}}::species.at(\textcolor{stringliteral}{"{}H-\/1"{}})),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00041}00041\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a391e899874cd7ef299a3ae1f64c016d2}{m\_initialized}}(false)\ \{\}\ \textcolor{comment}{//\ Note:\ Default\ entry\ is\ uninitialized,\ must\ be\ explicitly\ set.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00042}00042\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00043}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_af27b09bb4e1ee357bb657146feb6039e}{00043}}\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{CompositionEntry::CompositionEntry}}(\textcolor{keyword}{const}\ std::string\&\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}},\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ massFracMode)\ :\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}(\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}}),\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}(\mbox{\hyperlink{namespacefourdst}{fourdst}}::\mbox{\hyperlink{namespacefourdst_1_1atomic}{atomic}}::species.at(\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}})),\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}}(massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00044}00044\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a5885a0e33687bceb15b225a00163e9d3}{setSpecies}}(\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00045}00045\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00046}00046\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00047}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a38f3e109b2952c1f0e7444d7fb9e93a0}{00047}}\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{CompositionEntry::CompositionEntry}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{CompositionEntry}}\&\ entry)\ :}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00048}00048\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00049}00049\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00050}00050\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00051}00051\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00052}00052\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00053}00053\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}),}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00054}00054\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a391e899874cd7ef299a3ae1f64c016d2}{m\_initialized}}(entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a391e899874cd7ef299a3ae1f64c016d2}{m\_initialized}})\ \{\}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00055}00055\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00056}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a5885a0e33687bceb15b225a00163e9d3}{00056}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a5885a0e33687bceb15b225a00163e9d3}{CompositionEntry::setSpecies}}(\textcolor{keyword}{const}\ std::string\&\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00057}00057\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a391e899874cd7ef299a3ae1f64c016d2}{m\_initialized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00058}00058\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_entry_already_initialized_error}{exceptions::EntryAlreadyInitializedError}}(\textcolor{stringliteral}{"{}Composition\ entry\ is\ already\ initialized."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00059}00059\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00060}00060\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{namespacefourdst_1_1atomic_a3f619cc8f8b2cd718a4082c6adb0de90}{fourdst::atomic::species}}.contains(\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}}))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00061}00061\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_species_symbol_error}{exceptions::InvalidSpeciesSymbolError}}(\textcolor{stringliteral}{"{}Invalid\ symbol."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00062}00062\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00063}00063\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00064}00064\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1atomic_a3f619cc8f8b2cd718a4082c6adb0de90}{fourdst::atomic::species}}.at(\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{symbol}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00065}00065\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a391e899874cd7ef299a3ae1f64c016d2}{m\_initialized}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00066}00066\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00067}00067\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00068}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{00068}}\ \ \ \ \ std::string\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a50d18b4c27611fa9314dd756af54c2f0}{CompositionEntry::symbol}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00069}00069\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00070}00070\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00071}00071\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00072}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{00072}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{CompositionEntry::mass\_fraction}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00073}00073\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00074}00074\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ entry\ is\ in\ number\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00075}00075\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00076}00076\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00077}00077\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00078}00078\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00079}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a27b0ae0f7ef9469d515c4c7b6ec8dc22}{00079}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{CompositionEntry::mass\_fraction}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ meanMolarMass)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00080}00080\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00081}00081\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00082}00082\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00083}00083\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Convert\ from\ number\ fraction\ to\ mass\ fraction\ using:\ X\_i\ =\ n\_i\ *\ A\_i\ /\ <A>}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00084}00084\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ where\ m\_relAbundance\ is\ n\_i\ *\ A\_i\ and\ meanMolarMass\ is\ <A>.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00085}00085\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ /\ meanMolarMass;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00086}00086\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00087}00087\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00088}00088\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00089}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2d55492d285068d4a64db5602dfb1c78}{00089}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2d55492d285068d4a64db5602dfb1c78}{CompositionEntry::number\_fraction}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00090}00090\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00091}00091\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ entry\ is\ in\ mass\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00092}00092\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00093}00093\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00094}00094\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00095}00095\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00096}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ab96d976b53f3828237525005b904a39c}{00096}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2d55492d285068d4a64db5602dfb1c78}{CompositionEntry::number\_fraction}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ totalMoles)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00097}00097\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00098}00098\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Convert\ from\ mass\ fraction\ to\ number\ fraction\ using:\ n\_i\ =\ (X\_i\ /\ A\_i)\ /\ sum(X\_j\ /\ A\_j)}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00099}00099\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ where\ m\_relAbundance\ is\ X\_i\ /\ A\_i\ and\ totalMoles\ is\ sum(X\_j\ /\ A\_j).}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00100}00100\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ /\ totalMoles;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00101}00101\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00102}00102\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00103}00103\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00104}00104\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00105}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ab6619d23e111905d1e3ab16ee822d96c}{00105}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ab6619d23e111905d1e3ab16ee822d96c}{CompositionEntry::rel\_abundance}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00106}00106\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00107}00107\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00108}00108\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00109}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_af4f8d292d18755670a914072e2260dfb}{00109}}\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_af4f8d292d18755670a914072e2260dfb}{CompositionEntry::isotope}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00110}00110\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00111}00111\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00112}00112\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00113}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a4d6df43e098e7e2e2d94ff7fb76cb4c2}{00113}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a4d6df43e098e7e2e2d94ff7fb76cb4c2}{CompositionEntry::setMassFraction}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{mass\_fraction}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00114}00114\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00115}00115\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ entry\ is\ in\ number\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00116}00116\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00117}00117\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{mass\_fraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00118}00118\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}}\ /\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}.mass();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00119}00119\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00120}00120\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00121}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a9ec47cf4b3399128d3836c1b24b031b0}{00121}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a9ec47cf4b3399128d3836c1b24b031b0}{CompositionEntry::setNumberFraction}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2d55492d285068d4a64db5602dfb1c78}{number\_fraction}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00122}00122\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00123}00123\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ entry\ is\ in\ mass\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00124}00124\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00125}00125\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2d55492d285068d4a64db5602dfb1c78}{number\_fraction}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00126}00126\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}}\ *\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a79039cbdc76b4401eb2ce44b85467503}{m\_isotope}}.mass();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00127}00127\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00128}00128\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00129}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a3fb3f63a4e5675c6fefb662a8e3e7aa3}{00129}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a3fb3f63a4e5675c6fefb662a8e3e7aa3}{CompositionEntry::setMassFracMode}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ meanParticleMass)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00130}00130\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00131}00131\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00132}00132\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00133}00133\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00134}00134\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_adc20165bf94e18eea3458003025579ac}{m\_massFraction}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ /\ meanParticleMass;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00135}00135\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00136}00136\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00137}00137\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00138}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a743042d1998875851150d789817f5473}{00138}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a743042d1998875851150d789817f5473}{CompositionEntry::setNumberFracMode}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ specificNumberDensity)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00139}00139\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00140}00140\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00141}00141\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00142}00142\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00143}00143\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a2b5e245f7dabb11076efdbe1ed516d9f}{m\_numberFraction}}\ =\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a0498d707d8ea78be39283786c10657ef}{m\_relAbundance}}\ /\ specificNumberDensity;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00144}00144\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00145}00145\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00146}00146\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00147}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a14f12b8b0178df2e32e2023bd4564ddc}{00147}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a14f12b8b0178df2e32e2023bd4564ddc}{CompositionEntry::getMassFracMode}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00148}00148\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1e860519bea86793413ed67c76d18c8b}{m\_massFracMode}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00149}00149\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00150}00150\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00151}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ae3cc2099efd7db8eec3d9af2294b75fa}{00151}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition::Composition}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00152}00152\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00153}00153\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00154}00154\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00155}00155\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00156}00156\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00157}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a2d6fbe5c8142b358641bbe7ffde51053}{00157}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition::Composition}}(\textcolor{keyword}{const}\ std::set<std::string>\&\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00158}00158\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00159}00159\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00160}00160\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00161}00161\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00162}00162\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00163}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_af4d4cc5875cba931a91faee13f55594e}{00163}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition::Composition}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols,\ \textcolor{keyword}{const}\ std::vector<double>\&\ fractions,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ massFracMode)\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}(massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00164}00164\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (symbols.size()\ !=\ fractions.size())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00165}00165\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_CRITICAL(m\_logger,\ \textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ fractions\ must\ be\ equal\ (got\ \{\}\ symbols\ and\ \{\}\ fractions)."{}},\ symbols.size(),\ fractions.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00166}00166\ \ \ \ \ \ \ \ \ \ \ \ \ throw\ exceptions::InvalidCompositionError(\textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ fractions\ must\ be\ equal.\ Got\ "{}}\ +\ std::to\_string(symbols.size())\ +\ \textcolor{stringliteral}{"{}\ symbols\ and\ "{}}\ +\ std::to\_string(fractions.size())\ +\ \textcolor{stringliteral}{"{}\ fractions."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00167}00167\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00168}00168\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00169}00169\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a86982685c34db4a8f079ddafc25c594e}{validateComposition}}(fractions);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00170}00170\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00171}00171\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&symbol\ :\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00172}00172\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00173}00173\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00174}00174\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00175}00175\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ symbols.size();\ ++i)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00176}00176\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00177}00177\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(symbols[i],\ fractions[i]);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00178}00178\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00179}00179\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{setNumberFraction}}(symbols[i],\ fractions[i]);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00180}00180\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00181}00181\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00182}00182\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72d063a74a9d2197065884a2cea57a14}{finalize}}();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00183}00183\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00184}00184\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00185}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a21369a80378d4c90438a34f0e4a275ca}{00185}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition::Composition}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ \&\mbox{\hyperlink{namespacefourdst_1_1composition}{composition}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00186}00186\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_finalized;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00187}00187\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_specificNumberDensity;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00188}00188\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_meanParticleMass;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00189}00189\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_massFracMode;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00190}00190\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_registeredSymbols;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00191}00191\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ =\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_compositions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00192}00192\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00193}00193\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00194}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ec1e23cfecef764cb831171fed62fc2}{00194}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\&\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ec1e23cfecef764cb831171fed62fc2}{Composition::operator=}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ \&other)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00195}00195\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\textcolor{keyword}{this}\ !=\ \&other)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00196}00196\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00197}00197\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}}\ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00198}00198\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\ \ \ \ \ \ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00199}00199\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}\ \ \ \ \ \ \ \ \ \ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00200}00200\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}\ \ \ \ \ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00201}00201\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ \ \ \ \ \ \ \ \ \ \ \ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00202}00202\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ note:\ m\_config\ remains\ bound\ to\ the\ same\ singleton,\ so\ we\ skip\ it}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00203}00203\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00204}00204\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ *\textcolor{keyword}{this};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00205}00205\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00206}00206\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00207}00207\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00208}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{00208}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{Composition::registerSymbol}}(\textcolor{keyword}{const}\ std::string\&\ symbol,\ \textcolor{keywordtype}{bool}\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00209}00209\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a8fdac26e6298008aaeaa5b15f7fe244f}{isValidSymbol}}(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00210}00210\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Invalid\ symbol:\ \{\}"{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00211}00211\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error}{exceptions::InvalidSymbolError}}(\textcolor{stringliteral}{"{}Invalid\ symbol:\ "{}}\ +\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00212}00212\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00213}00213\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00214}00214\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ If\ no\ symbols\ have\ been\ registered\ allow\ mode\ to\ be\ set}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00215}00215\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.empty())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00216}00216\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}\ =\ massFracMode;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00217}00217\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00218}00218\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}\ !=\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00219}00219\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ is\ in\ mass\ fraction\ mode.\ Cannot\ register\ symbol\ (\{\})\ in\ number\ fraction\ mode."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00220}00220\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ is\ in\ mass\ fraction\ mode.\ Cannot\ register\ symbol\ ("{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{})\ in\ number\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00221}00221\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00222}00222\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00223}00223\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00224}00224\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00225}00225\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_WARNING(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ already\ registered."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00226}00226\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00227}00227\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00228}00228\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00229}00229\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.insert(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00230}00230\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry}{CompositionEntry}}\ entry(symbol,\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00231}00231\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}[symbol]\ =\ entry;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00232}00232\ \ \ \ \ \ \ \ \ LOG\_TRACE\_L3(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Registered\ symbol:\ \{\}"{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00233}00233\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00234}00234\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00235}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a9b422156600823276a9606bfa07ad4db}{00235}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{Composition::registerSymbol}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols,\ \textcolor{keywordtype}{bool}\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00236}00236\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00237}00237\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(symbol,\ massFracMode);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00238}00238\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00239}00239\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00240}00240\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00241}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ce00f73cc133bb1bac2b030b93ab480}{00241}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ce00f73cc133bb1bac2b030b93ab480}{Composition::registerSpecies}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species,\ \textcolor{keywordtype}{bool}\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00242}00242\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00243}00243\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00244}00244\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00245}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a057f2bf2e86bcc3c649c0ddf18cf3826}{00245}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ce00f73cc133bb1bac2b030b93ab480}{Composition::registerSpecies}}(\textcolor{keyword}{const}\ std::vector<fourdst::atomic::Species>\ \&species,\ \textcolor{keywordtype}{bool}\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00246}00246\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ s\ :\ species)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00247}00247\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4ce00f73cc133bb1bac2b030b93ab480}{registerSpecies}}(s,\ massFracMode);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00248}00248\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00249}00249\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00250}00250\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00251}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84c7b72c2aee46b94492d404855dd3e0}{00251}}\ \ \ \ \ std::set<std::string>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84c7b72c2aee46b94492d404855dd3e0}{Composition::getRegisteredSymbols}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00252}00252\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00253}00253\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00254}00254\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00255}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a3dee7b5e1f54920de9eab99f95a516ec}{00255}}\ \ \ \ \ std::set<fourdst::atomic::Species>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a3dee7b5e1f54920de9eab99f95a516ec}{Composition::getRegisteredSpecies}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00256}00256\ \ \ \ \ \ \ \ \ std::set<fourdst::atomic::Species>\ result;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00257}00257\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ entry\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00258}00258\ \ \ \ \ \ \ \ \ \ \ \ \ result.insert(entry.isotope());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00259}00259\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00260}00260\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00261}00261\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00262}00262\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00263}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a86982685c34db4a8f079ddafc25c594e}{00263}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a86982685c34db4a8f079ddafc25c594e}{Composition::validateComposition}}(\textcolor{keyword}{const}\ std::vector<double>\&\ fractions)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00264}00264\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addf03ba8b988970d341884d487aa94d5}{isValidComposition}}(fractions))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00265}00265\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Invalid\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00266}00266\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}Invalid\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00267}00267\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00268}00268\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00269}00269\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00270}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addf03ba8b988970d341884d487aa94d5}{00270}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addf03ba8b988970d341884d487aa94d5}{Composition::isValidComposition}}(\textcolor{keyword}{const}\ std::vector<double>\&\ fractions)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00271}00271\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ sum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00272}00272\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ fraction\ :\ fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00273}00273\ \ \ \ \ \ \ \ \ \ \ \ \ sum\ +=\ fraction;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00274}00274\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00275}00275\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (sum\ <\ 0.999999\ ||\ sum\ >\ 1.000001)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00276}00276\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}The\ sum\ of\ fractions\ must\ be\ equal\ to\ 1\ (expected\ 1,\ got\ \{\})."{}},\ sum);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00277}00277\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00278}00278\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00279}00279\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00280}00280\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00281}00281\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00282}00282\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00283}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a8fdac26e6298008aaeaa5b15f7fe244f}{00283}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a8fdac26e6298008aaeaa5b15f7fe244f}{Composition::isValidSymbol}}(\textcolor{keyword}{const}\ std::string\&\ symbol)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00284}00284\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{namespacefourdst_1_1atomic_a3f619cc8f8b2cd718a4082c6adb0de90}{fourdst::atomic::species}}.contains(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00285}00285\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00286}00286\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00287}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{00287}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{Composition::setMassFraction}}(\textcolor{keyword}{const}\ std::string\&\ symbol,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ mass\_fraction)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00288}00288\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00289}00289\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ registered."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00290}00290\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol\ ("{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{})\ is\ not\ registered."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00291}00291\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00292}00292\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00293}00293\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00294}00294\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ is\ in\ number\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00295}00295\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ is\ in\ number\ fraction\ mode."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00296}00296\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00297}00297\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00298}00298\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (mass\_fraction\ <\ 0.0\ ||\ mass\_fraction\ >\ 1.0)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00299}00299\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Mass\ fraction\ must\ be\ between\ 0\ and\ 1\ for\ symbol\ \{\}.\ Currently\ it\ is\ \{\}."{}},\ symbol,\ mass\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00300}00300\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}Mass\ fraction\ must\ be\ between\ 0\ and\ 1\ for\ symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}.\ Currently\ it\ is\ "{}}\ +\ std::to\_string(mass\_fraction)\ +\ \textcolor{stringliteral}{"{}."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00301}00301\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00302}00302\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00303}00303\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00304}00304\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ old\_mass\_fraction\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).mass\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00305}00305\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).setMassFraction(mass\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00306}00306\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00307}00307\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_mass\_fraction;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00308}00308\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00309}00309\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00310}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a66ce1012c12b0a83629eb09d451b68e3}{00310}}\ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{Composition::setMassFraction}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols,\ \textcolor{keyword}{const}\ std::vector<double>\&\ mass\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00311}00311\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (symbols.size()\ !=\ mass\_fractions.size())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00312}00312\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ mass\ fractions\ must\ be\ equal\ (currently\ \{\}\ symbols\ and\ \{\}\ mass\ fractions)."{}},\ symbols.size(),\ mass\_fractions.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00313}00313\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ mass\ fractions\ must\ be\ equal\ (currently\ "{}}\ +\ std::to\_string(symbols.size())\ +\ \textcolor{stringliteral}{"{}\ symbols\ and\ "{}}\ +\ std::to\_string(mass\_fractions.size())\ +\ \textcolor{stringliteral}{"{}\ mass\ fractions)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00314}00314\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00315}00315\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00316}00316\ \ \ \ \ \ \ \ \ std::vector<double>\ old\_mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00317}00317\ \ \ \ \ \ \ \ \ old\_mass\_fractions.reserve(symbols.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00318}00318\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ symbols.size();\ ++i)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00319}00319\ \ \ \ \ \ \ \ \ \ \ \ \ old\_mass\_fractions.push\_back(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(symbols[i],\ mass\_fractions[i]));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00320}00320\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00321}00321\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00322}00322\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00323}00323\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00324}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa6c94269a5d16349c98860f3015b734a}{00324}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{Composition::setMassFraction}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \&mass\_fraction)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00325}00325\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()),\ mass\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00326}00326\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00327}00327\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00328}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_abbae020d46c74708a7974c1ca755bb62}{00328}}\ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{Composition::setMassFraction}}(\textcolor{keyword}{const}\ std::vector<fourdst::atomic::Species>\ \&species,}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00329}00329\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector<double>\ \&mass\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00330}00330\ \ \ \ \ \ \ \ \ std::vector<double>\ old\_mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00331}00331\ \ \ \ \ \ \ \ \ old\_mass\_fractions.reserve(species.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00332}00332\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ spec\ :\ species)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00333}00333\ \ \ \ \ \ \ \ \ \ \ \ \ old\_mass\_fractions.push\_back(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(spec,\ mass\_fractions[\&spec\ -\/\ \&species[0]]));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00334}00334\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00335}00335\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00336}00336\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00337}00337\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00338}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{00338}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{Composition::setNumberFraction}}(\textcolor{keyword}{const}\ std::string\&\ symbol,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\&\ number\_fraction)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00339}00339\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00340}00340\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ registered."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00341}00341\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol\ ("{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{})\ is\ not\ registered."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00342}00342\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00343}00343\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00344}00344\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00345}00345\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ is\ in\ mass\ fraction\ mode,\ should\ be\ in\ number\ fraction\ mode\ to\ call\ setNumberFraction.\ Hint:\ The\ mode\ can\ be\ switched\ by\ first\ finalizing\ and\ then\ calling\ setCompositionMode(false)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00346}00346\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error}{exceptions::CompositionModeError}}(\textcolor{stringliteral}{"{}Composition\ is\ in\ mass\ fraction\ mode,\ should\ be\ in\ number\ fraction\ mode\ to\ call\ setNumberFraction.\ Hint:\ The\ mode\ can\ be\ switched\ by\ first\ finalizing\ and\ then\ calling\ setCompositionMode(false)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00347}00347\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00348}00348\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00349}00349\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (number\_fraction\ <\ 0.0\ ||\ number\_fraction\ >\ 1.0)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00350}00350\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Number\ fraction\ must\ be\ between\ 0\ and\ 1\ for\ symbol\ \{\}.\ Currently\ it\ is\ \{\}."{}},\ symbol,\ number\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00351}00351\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}Number\ fraction\ must\ be\ between\ 0\ and\ 1\ for\ symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}.\ Currently\ it\ is\ "{}}\ +\ std::to\_string(number\_fraction)\ +\ \textcolor{stringliteral}{"{}."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00352}00352\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00353}00353\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00354}00354\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00355}00355\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ old\_number\_fraction\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).number\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00356}00356\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).setNumberFraction(number\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00357}00357\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00358}00358\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_number\_fraction;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00359}00359\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00360}00360\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00361}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a48014a0a725ebd91ad1193c063b5b26f}{00361}}\ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{Composition::setNumberFraction}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols,\ \textcolor{keyword}{const}\ std::vector<double>\&\ number\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00362}00362\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (symbols.size()\ !=\ number\_fractions.size())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00363}00363\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ number\ fractions\ must\ be\ equal.\ (Currently\ \{\}\ symbols\ and\ \{\}\ number\ fractions)."{}},\ symbols.size(),\ number\_fractions.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00364}00364\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}The\ number\ of\ symbols\ and\ number\ fractions\ must\ be\ equal.\ (Currently\ "{}}\ +\ std::to\_string(symbols.size())\ +\ \textcolor{stringliteral}{"{}\ symbols\ and\ "{}}\ +\ std::to\_string(number\_fractions.size())\ +\ \textcolor{stringliteral}{"{}\ number\ fractions)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00365}00365\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00366}00366\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00367}00367\ \ \ \ \ \ \ \ \ std::vector<double>\ old\_number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00368}00368\ \ \ \ \ \ \ \ \ old\_number\_fractions.reserve(symbols.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00369}00369\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{size\_t}\ i\ =\ 0;\ i\ <\ symbols.size();\ ++i)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00370}00370\ \ \ \ \ \ \ \ \ \ \ \ \ old\_number\_fractions.push\_back(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{setNumberFraction}}(symbols[i],\ number\_fractions[i]));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00371}00371\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00372}00372\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00373}00373\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00374}00374\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00375}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aaa822bb48a948d101fef759ffbefe31b}{00375}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{Composition::setNumberFraction}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ \&number\_fraction)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00376}00376\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{setNumberFraction}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()),\ number\_fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00377}00377\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00378}00378\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00379}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_adc068778a1ef33cad67f5ca028b49bb8}{00379}}\ \ \ \ \ std::vector<double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{Composition::setNumberFraction}}(\textcolor{keyword}{const}\ std::vector<fourdst::atomic::Species>\ \&species,}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00380}00380\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::vector<double>\ \&number\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00381}00381\ \ \ \ \ \ \ \ \ std::vector<double>\ old\_number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00382}00382\ \ \ \ \ \ \ \ \ old\_number\_fractions.reserve(species.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00383}00383\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ spec\ :\ species)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00384}00384\ \ \ \ \ \ \ \ \ \ \ \ \ old\_number\_fractions.push\_back(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{setNumberFraction}}(spec,\ number\_fractions[\&spec\ -\/\ \&species[0]]));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00385}00385\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00386}00386\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ old\_number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00387}00387\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00388}00388\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00389}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72d063a74a9d2197065884a2cea57a14}{00389}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72d063a74a9d2197065884a2cea57a14}{Composition::finalize}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ norm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00390}00390\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ finalized\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00391}00391\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00392}00392\ \ \ \ \ \ \ \ \ \ \ \ \ finalized\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a869dbae3db9d09c57b2df56a813a55fb}{finalizeMassFracMode}}(norm);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00393}00393\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00394}00394\ \ \ \ \ \ \ \ \ \ \ \ \ finalized\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a461ab4e9cb5975cf865db5f16f03ddfe}{finalizeNumberFracMode}}(norm);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00395}00395\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00396}00396\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (finalized)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00397}00397\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00398}00398\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00399}00399\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ finalized;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00400}00400\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00401}00401\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00402}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a869dbae3db9d09c57b2df56a813a55fb}{00402}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a869dbae3db9d09c57b2df56a813a55fb}{Composition::finalizeMassFracMode}}(\textcolor{keywordtype}{bool}\ norm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00403}00403\ \ \ \ \ \ \ \ \ std::vector<double>\ mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00404}00404\ \ \ \ \ \ \ \ \ mass\_fractions.reserve(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00405}00405\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00406}00406\ \ \ \ \ \ \ \ \ \ \ \ \ mass\_fractions.push\_back(entry.mass\_fraction());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00407}00407\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00408}00408\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (norm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00409}00409\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ sum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00410}00410\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ mass\_fraction\ :\ mass\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00411}00411\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sum\ +=\ mass\_fraction;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00412}00412\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00413}00413\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keywordtype}{double}\ \&\ mass\_fraction\ :\ mass\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00414}00414\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mass\_fraction\ /=\ sum;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00415}00415\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00416}00416\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ [symbol,\ entry]\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00417}00417\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(symbol,\ entry.mass\_fraction()\ /\ sum);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00418}00418\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00419}00419\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00420}00420\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{try}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00421}00421\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a86982685c34db4a8f079ddafc25c594e}{validateComposition}}(mass\_fractions);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00422}00422\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{catch}\ ([[maybe\_unused]]\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}\&\ e)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00423}00423\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ massSum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00424}00424\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00425}00425\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ massSum\ +=\ entry.mass\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00426}00426\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00427}00427\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ is\ invalid\ (Total\ mass\ \{\})."{}},\ massSum);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00428}00428\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00429}00429\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00430}00430\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00431}00431\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ After\ validation,\ calculate\ the\ specific\ number\ density\ (total\ moles\ per\ unit\ mass).}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00432}00432\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00433}00433\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}}\ +=\ entry.rel\_abundance();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00434}00434\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00435}00435\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\ =\ 1.0/\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00436}00436\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00437}00437\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00438}00438\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00439}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a461ab4e9cb5975cf865db5f16f03ddfe}{00439}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a461ab4e9cb5975cf865db5f16f03ddfe}{Composition::finalizeNumberFracMode}}(\textcolor{keywordtype}{bool}\ norm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00440}00440\ \ \ \ \ \ \ \ \ std::vector<double>\ number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00441}00441\ \ \ \ \ \ \ \ \ number\_fractions.reserve(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.size());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00442}00442\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00443}00443\ \ \ \ \ \ \ \ \ \ \ \ \ number\_fractions.push\_back(entry.number\_fraction());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00444}00444\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00445}00445\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (norm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00446}00446\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ sum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00447}00447\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ number\_fraction\ :\ number\_fractions)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00448}00448\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ sum\ +=\ number\_fraction;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00449}00449\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00450}00450\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\&\ [symbol,\ entry]\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00451}00451\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7d4d748f3ee25e68751fb143717ed080}{setNumberFraction}}(symbol,\ entry.number\_fraction()\ /\ sum);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00452}00452\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00453}00453\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00454}00454\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{try}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00455}00455\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a86982685c34db4a8f079ddafc25c594e}{validateComposition}}(number\_fractions);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00456}00456\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{catch}\ ([[maybe\_unused]]\ \textcolor{keyword}{const}\ std::runtime\_error\&\ e)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00457}00457\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ numberSum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00458}00458\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00459}00459\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ numberSum\ +=\ entry.number\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00460}00460\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00461}00461\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ is\ invalid\ (Total\ number\ \{\})."{}},\ numberSum);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00462}00462\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00463}00463\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00464}00464\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00465}00465\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ After\ validation,\ calculate\ the\ mean\ particle\ mass.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00466}00466\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00467}00467\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\ +=\ entry.rel\_abundance();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00468}00468\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00469}00469\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}}\ =\ 1.0/\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00470}00470\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00471}00471\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00472}00472\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00473}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a3aead72892606725a4149a5f65bd31ec}{00473}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a3aead72892606725a4149a5f65bd31ec}{Composition::mix}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\&\ other,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ fraction)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00474}00474\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}}\ ||\ !other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00475}00475\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Compositions\ have\ not\ both\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()\ on\ both\ compositions\ before\ mixing."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00476}00476\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Compositions\ have\ not\ been\ finalized\ (Hint:\ Consider\ running\ .finalize()\ on\ both\ compositions\ before\ mixing)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00477}00477\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00478}00478\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00479}00479\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (fraction\ <\ 0.0\ ||\ fraction\ >\ 1.0)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00480}00480\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Mixing\ fraction\ must\ be\ between\ 0\ and\ 1.\ Currently\ it\ is\ \{\}."{}},\ fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00481}00481\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error}{exceptions::InvalidCompositionError}}(\textcolor{stringliteral}{"{}Mixing\ fraction\ must\ be\ between\ 0\ and\ 1.\ Currently\ it\ is\ "{}}\ +\ std::to\_string(fraction)\ +\ \textcolor{stringliteral}{"{}."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00482}00482\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00483}00483\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00484}00484\ \ \ \ \ \ \ \ \ std::set<std::string>\ mixedSymbols\ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84c7b72c2aee46b94492d404855dd3e0}{getRegisteredSymbols}}();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00485}00485\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Get\ the\ union\ of\ the\ two\ sets\ of\ symbols\ to\ ensure\ all\ species\ are\ included\ in\ the\ new\ composition.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00486}00486\ \ \ \ \ \ \ \ \ mixedSymbols.insert(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.begin(),\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a39bfcb7d81d723cbd9d021abd533b4d6}{m\_registeredSymbols}}.end());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00487}00487\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00488}00488\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ mixedComposition(mixedSymbols);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00489}00489\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ mixedSymbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00490}00490\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ otherMassFrac\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00491}00491\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00492}00492\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ thisMassFrac\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{hasSymbol}}(symbol)\ ?\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol)\ :\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00493}00493\ \ \ \ \ \ \ \ \ \ \ \ \ otherMassFrac\ =\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{hasSymbol}}(symbol)\ ?\ other.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol)\ :\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00494}00494\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00495}00495\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ The\ mixing\ formula\ is\ a\ linear\ interpolation\ of\ mass\ fractions.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00496}00496\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ massFraction\ =\ fraction\ *\ thisMassFrac\ +\ otherMassFrac\ *\ (1-\/fraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00497}00497\ \ \ \ \ \ \ \ \ \ \ \ \ mixedComposition.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(symbol,\ massFraction);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00498}00498\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00499}00499\ \ \ \ \ \ \ \ \ mixedComposition.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72d063a74a9d2197065884a2cea57a14}{finalize}}();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00500}00500\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ mixedComposition;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00501}00501\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00502}00502\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00503}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7f6a6edf02b55eeecf147c3f1f7f55e7}{00503}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{Composition::getMassFraction}}(\textcolor{keyword}{const}\ std::string\&\ symbol)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00504}00504\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00505}00505\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00506}00506\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00507}00507\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00508}00508\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00509}00509\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ in\ the\ composition."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00510}00510\ \ \ \ \ \ \ \ \ \ \ \ \ std::string\ currentSymbols;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00511}00511\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ count\ =\ 0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00512}00512\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ sym\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::keys)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00513}00513\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ currentSymbols\ +=\ sym;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00514}00514\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (count\ <\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.size()\ -\/\ 2)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00515}00515\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ currentSymbols\ +=\ \textcolor{stringliteral}{"{},\ "{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00516}00516\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (count\ ==\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.size()\ -\/\ 2)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00517}00517\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ currentSymbols\ +=\ \textcolor{stringliteral}{"{},\ and\ "{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00518}00518\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00519}00519\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ count++;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00520}00520\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00521}00521\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol("{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{})\ is\ not\ in\ the\ current\ composition.\ Current\ composition\ has\ symbols:\ "{}}\ +\ currentSymbols\ +\ \textcolor{stringliteral}{"{}."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00522}00522\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00523}00523\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00524}00524\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).mass\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00525}00525\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00526}00526\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).mass\_fraction(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00527}00527\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00528}00528\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00529}00529\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00530}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa3ba0c742872384cff3ed03789c0a17d}{00530}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{Composition::getMassFraction}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00531}00531\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00532}00532\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00533}00533\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00534}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{00534}}\ \ \ \ \ std::unordered\_map<std::string,\ double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{Composition::getMassFraction}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00535}00535\ \ \ \ \ \ \ \ \ std::unordered\_map<std::string,\ double>\ mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00536}00536\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&symbol:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::keys)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00537}00537\ \ \ \ \ \ \ \ \ \ \ \ \ mass\_fractions[symbol]\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00538}00538\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00539}00539\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ mass\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00540}00540\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00541}00541\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00542}00542\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00543}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84fea38bc1c005e483910285f6800e15}{00543}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{Composition::getNumberFraction}}(\textcolor{keyword}{const}\ std::string\&\ symbol)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00544}00544\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00545}00545\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00546}00546\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00547}00547\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00548}00548\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00549}00549\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ in\ the\ composition."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00550}00550\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}\ is\ not\ in\ the\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00551}00551\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00552}00552\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00553}00553\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).number\_fraction();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00554}00554\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00555}00555\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).number\_fraction(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00556}00556\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00557}00557\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00558}00558\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00559}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa0ce4143a267e96ab7967538c76acdc3}{00559}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{Composition::getNumberFraction}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00560}00560\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{getNumberFraction}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00561}00561\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00562}00562\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00563}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{00563}}\ \ \ \ \ std::unordered\_map<std::string,\ double>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{Composition::getNumberFraction}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00564}00564\ \ \ \ \ \ \ \ \ std::unordered\_map<std::string,\ double>\ number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00565}00565\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&symbol:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::keys)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00566}00566\ \ \ \ \ \ \ \ \ \ \ \ \ number\_fractions[symbol]\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a7731df9b30f8c8f13231f7e1a17b105c}{getNumberFraction}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00567}00567\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00568}00568\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ number\_fractions;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00569}00569\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00570}00570\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00571}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a67a2ed844f3aee3d9cc1a3cb996eb56f}{00571}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a67a2ed844f3aee3d9cc1a3cb996eb56f}{Composition::getMolarAbundance}}(\textcolor{keyword}{const}\ std::string\ \&symbol)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00572}00572\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00573}00573\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00574}00574\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00575}00575\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00576}00576\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00577}00577\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ in\ the\ composition."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00578}00578\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}\ is\ not\ in\ the\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00579}00579\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00580}00580\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol)\ /\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).isotope().mass();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00581}00581\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00582}00582\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00583}00583\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00584}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84d6552e2b762fabb7bddf68b05c4022}{00584}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a67a2ed844f3aee3d9cc1a3cb996eb56f}{Composition::getMolarAbundance}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00585}00585\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a67a2ed844f3aee3d9cc1a3cb996eb56f}{getMolarAbundance}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00586}00586\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00587}00587\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00588}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a092d3536b04167ea2e6e3a3b1446c377}{00588}}\ \ \ \ \ std::pair<CompositionEntry,\ GlobalComposition>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1138c86f7ccd39594601c2ec63ad89e9}{Composition::getComposition}}(\textcolor{keyword}{const}\ std::string\&\ symbol)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00589}00589\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00590}00590\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00591}00591\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00592}00592\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00593}00593\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00594}00594\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ in\ the\ composition."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00595}00595\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}\ is\ not\ in\ the\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00596}00596\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00597}00597\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \{\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol),\ \{\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}},\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\}\};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00598}00598\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00599}00599\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00600}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_afe5f1086027044c84ff35a366b2e8e2d}{00600}}\ \ \ \ \ std::pair<CompositionEntry,\ GlobalComposition>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1138c86f7ccd39594601c2ec63ad89e9}{Composition::getComposition}}(}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00601}00601\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&species)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00602}00602\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1138c86f7ccd39594601c2ec63ad89e9}{getComposition}}(std::string(species.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}()));}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00603}00603\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00604}00604\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00605}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1138c86f7ccd39594601c2ec63ad89e9}{00605}}\ \ \ \ \ std::pair<std::unordered\_map<std::string,\ CompositionEntry>,\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_global_composition}{GlobalComposition}}>\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1138c86f7ccd39594601c2ec63ad89e9}{Composition::getComposition}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00606}00606\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00607}00607\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00608}00608\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00609}00609\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00610}00610\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \{\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}},\ \{\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}},\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\}\};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00611}00611\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00612}00612\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00613}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a66401fed7054172e9b1a2687e5cc8eff}{00613}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a66401fed7054172e9b1a2687e5cc8eff}{Composition::getMeanParticleMass}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00614}00614\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00615}00615\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00616}00616\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00617}00617\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00618}00618\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00619}00619\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00620}00620\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00621}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a98199f435cb553f5cf4f8e520fdb8a7a}{00621}}\ \ \ \ \ \textcolor{keywordtype}{double}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a98199f435cb553f5cf4f8e520fdb8a7a}{Composition::getMeanAtomicNumber}}()\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00622}00622\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00623}00623\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ must\ be\ finalized\ before\ getting\ the\ mean\ atomic\ mass\ number.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00624}00624\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ not\ finalized.\ Cannot\ retrieve\ mean\ atomic\ mass\ number.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00625}00625\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00626}00626\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00627}00627\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{double}\ zSum\ =\ 0.0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00628}00628\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00629}00629\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Loop\ through\ all\ registered\ species\ in\ the\ composition.}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00630}00630\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&val:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00631}00631\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Sum\ of\ (X\_i\ *\ Z\_i\ /\ A\_i)}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00632}00632\ \ \ \ \ \ \ \ \ \ \ \ \ zSum\ +=\ (val.mass\_fraction()\ *\ val.m\_isotope.z())/val.m\_isotope.a();}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00633}00633\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00634}00634\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00635}00635\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Calculate\ mean\ atomic\ number\ <Z>\ =\ <A>\ *\ sum(X\_i\ *\ Z\_i\ /\ A\_i)}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00636}00636\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ mean\_A\ =\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}}\ *\ zSum;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00637}00637\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ mean\_A;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00638}00638\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00639}00639\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00640}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a17635cd21744c7cf86cb1eb75152c816}{00640}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a17635cd21744c7cf86cb1eb75152c816}{Composition::subset}}(\textcolor{keyword}{const}\ std::vector<std::string>\&\ symbols,\ \textcolor{keyword}{const}\ std::string\&\ method)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00641}00641\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::array<std::string,\ 2>\ methods\ =\ \{\textcolor{stringliteral}{"{}norm"{}},\ \textcolor{stringliteral}{"{}none"{}}\};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00642}00642\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00643}00643\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (std::ranges::find(methods,\ method)\ ==\ methods.end())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00644}00644\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::string\ errorMessage\ =\ \textcolor{stringliteral}{"{}Invalid\ method:\ "{}}\ +\ method\ +\ \textcolor{stringliteral}{"{}.\ Valid\ methods\ are\ 'norm'\ and\ 'none'."{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00645}00645\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Invalid\ method:\ \{\}.\ Valid\ methods\ are\ norm\ and\ none."{}},\ method);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00646}00646\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_invalid_mixing_mode}{exceptions::InvalidMixingMode}}(errorMessage);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00647}00647\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00648}00648\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00649}00649\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ subsetComposition;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00650}00650\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ symbols)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00651}00651\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00652}00652\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Symbol\ \{\}\ is\ not\ in\ the\ composition."{}},\ symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00653}00653\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error}{exceptions::UnregisteredSymbolError}}(\textcolor{stringliteral}{"{}Symbol\ "{}}\ +\ symbol\ +\ \textcolor{stringliteral}{"{}\ is\ not\ in\ the\ composition."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00654}00654\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00655}00655\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ subsetComposition.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a1bc2e64f87c12befdc2bc767e7405661}{registerSymbol}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00656}00656\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00657}00657\ \ \ \ \ \ \ \ \ \ \ \ \ subsetComposition.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a493224656aa3ade68389250720ef09af}{setMassFraction}}(symbol,\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.at(symbol).mass\_fraction());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00658}00658\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00659}00659\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (method\ ==\ \textcolor{stringliteral}{"{}norm"{}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00660}00660\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ isNorm\ =\ subsetComposition.\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72d063a74a9d2197065884a2cea57a14}{finalize}}(\textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00661}00661\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!isNorm)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00662}00662\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Subset\ composition\ is\ invalid.\ (Unable\ to\ finalize\ with\ normalization)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00663}00663\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_failed_to_finalize_composition_error}{exceptions::FailedToFinalizeCompositionError}}(\textcolor{stringliteral}{"{}Subset\ composition\ is\ invalid.\ (Unable\ to\ finalize\ with\ normalization)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00664}00664\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00665}00665\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00666}00666\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ subsetComposition;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00667}00667\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00668}00668\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00669}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a0af981ed1074b26c237cf6cf35f82c9e}{00669}}\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a0af981ed1074b26c237cf6cf35f82c9e}{Composition::setCompositionMode}}(\textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00670}00670\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00671}00671\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Mode\ cannot\ be\ set\ unless\ composition\ is\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00672}00672\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Mode\ cannot\ be\ set\ unless\ composition\ is\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00673}00673\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00674}00674\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00675}00675\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ okay\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00676}00676\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00677}00677\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (massFracMode)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00678}00678\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ okay\ =\ entry.setMassFracMode(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a4a36c8d22ce61023e7bea1d9417577d4}{m\_meanParticleMass}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00679}00679\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00680}00680\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ okay\ =\ entry.setNumberFracMode(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_addae4484da7d5072ab66a721dbe04ced}{m\_specificNumberDensity}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00681}00681\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00682}00682\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!okay)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00683}00683\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ mode\ could\ not\ be\ set\ due\ to\ some\ unknown\ error."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00684}00684\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::runtime\_error(\textcolor{stringliteral}{"{}Composition\ mode\ could\ not\ be\ set\ due\ to\ an\ unknown\ error."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00685}00685\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00686}00686\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00687}00687\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a671f1ee8be00f4ff8c1d94fabb382380}{m\_massFracMode}}\ =\ massFracMode;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00688}00688\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00689}00689\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00690}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ac75dbc8377556c835455991c7c7fe206}{00690}}\ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition}{CanonicalComposition}}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ac75dbc8377556c835455991c7c7fe206}{Composition::getCanonicalComposition}}(\textcolor{keywordtype}{bool}\ harsh)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00691}00691\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00692}00692\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00693}00693\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00694}00694\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00695}00695\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition}{CanonicalComposition}}\ canonicalComposition;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00696}00696\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::array<std::string,\ 7>\ canonicalH\ =\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00697}00697\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}H-\/1"{}},\ \textcolor{stringliteral}{"{}H-\/2"{}},\ \textcolor{stringliteral}{"{}H-\/3"{}},\ \textcolor{stringliteral}{"{}H-\/4"{}},\ \textcolor{stringliteral}{"{}H-\/5"{}},\ \textcolor{stringliteral}{"{}H-\/6"{}},\ \textcolor{stringliteral}{"{}H-\/7"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00698}00698\ \ \ \ \ \ \ \ \ \};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00699}00699\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ std::array<std::string,\ 8>\ canonicalHe\ =\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00700}00700\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}He-\/3"{}},\ \textcolor{stringliteral}{"{}He-\/4"{}},\ \textcolor{stringliteral}{"{}He-\/5"{}},\ \textcolor{stringliteral}{"{}He-\/6"{}},\ \textcolor{stringliteral}{"{}He-\/7"{}},\ \textcolor{stringliteral}{"{}He-\/8"{}},\ \textcolor{stringliteral}{"{}He-\/9"{}},\ \textcolor{stringliteral}{"{}He-\/10"{}}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00701}00701\ \ \ \ \ \ \ \ \ \};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00702}00702\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ canonicalH)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00703}00703\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{hasSymbol}}(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00704}00704\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_abe5b01574242f8eaabd00c3d653291f7}{X}}\ +=\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00705}00705\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00706}00706\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00707}00707\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ canonicalHe)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00708}00708\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{hasSymbol}}(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00709}00709\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_a93927bfccc5d2b3906565d092ed4f7f4}{Y}}\ +=\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00710}00710\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00711}00711\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00712}00712\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00713}00713\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\&\ symbol\ :\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a84c7b72c2aee46b94492d404855dd3e0}{getRegisteredSymbols}}())\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00714}00714\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ isHSymbol\ =\ std::ranges::find(canonicalH,\ symbol)\ !=\ std::end(canonicalH);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00715}00715\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{bool}\ isHeSymbol\ =\ std::ranges::find(canonicalHe,\ symbol)\ !=\ std::end(canonicalHe);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00716}00716\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00717}00717\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (isHSymbol\ ||\ isHeSymbol)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00718}00718\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{continue};\ \textcolor{comment}{//\ Skip\ canonical\ H\ and\ He\ symbols}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00719}00719\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00720}00720\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00721}00721\ \ \ \ \ \ \ \ \ \ \ \ \ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_ae1981f5ddd36abd17a4a69fa1f43de18}{Z}}\ +=\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ad20bd541dd7c45274a2e586e6a0519a7}{getMassFraction}}(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00722}00722\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00723}00723\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00724}00724\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{double}\ Z\ =\ 1.0\ -\/\ (canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_abe5b01574242f8eaabd00c3d653291f7}{X}}\ +\ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_a93927bfccc5d2b3906565d092ed4f7f4}{Y}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00725}00725\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (std::abs(Z\ -\/\ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_ae1981f5ddd36abd17a4a69fa1f43de18}{Z}})\ >\ 1e-\/6)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00726}00726\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!harsh)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00727}00727\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_WARNING(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Validation\ composition\ Z\ (X-\/Y\ =\ \{\})\ is\ different\ than\ canonical\ composition\ Z\ (\{\})\ (∑a\_i\ where\ a\_i\ !=\ H/He)."{}},\ Z,\ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_ae1981f5ddd36abd17a4a69fa1f43de18}{Z}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00728}00728\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00729}00729\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00730}00730\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Validation\ composition\ Z\ (X-\/Y\ =\ \{\})\ is\ different\ than\ canonical\ composition\ Z\ (\{\})\ (∑a\_i\ where\ a\_i\ !=\ H/He)."{}},\ Z,\ canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_ae1981f5ddd36abd17a4a69fa1f43de18}{Z}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00731}00731\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::runtime\_error(\textcolor{stringliteral}{"{}Validation\ composition\ Z\ (X-\/Y\ =\ "{}}\ +\ std::to\_string(Z)\ +\ \textcolor{stringliteral}{"{})\ is\ different\ than\ canonical\ composition\ Z\ ("{}}\ +\ std::to\_string(canonicalComposition.\mbox{\hyperlink{structfourdst_1_1composition_1_1_canonical_composition_ae1981f5ddd36abd17a4a69fa1f43de18}{Z}})\ +\ \textcolor{stringliteral}{"{})\ (∑a\_i\ where\ a\_i\ !=\ H/He)."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00732}00732\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00733}00733\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00734}00734\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ canonicalComposition;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00735}00735\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00736}00736\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00737}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{00737}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a72a368f27094b03fdd9896844e075c94}{Composition::hasSymbol}}(\textcolor{keyword}{const}\ std::string\&\ symbol)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00738}00738\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00739}00739\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00740}00740\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00741}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_acb08478f7032ecc13cb02283a18187e9}{00741}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_acb08478f7032ecc13cb02283a18187e9}{Composition::contains}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1atomic_1_1_species}{fourdst::atomic::Species}}\ \&isotope)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00742}00742\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Check\ if\ the\ isotope's\ symbol\ is\ in\ the\ composition}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00743}00743\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (!\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa00cbc0933d8a22bb900ac21a338e5ac}{m\_finalized}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00744}00744\ \ \ \ \ \ \ \ \ \ \ \ \ LOG\_ERROR(\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_ab6c66f35e1fb05dd24aacaf90e115c5e}{m\_logger}},\ \textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00745}00745\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error}{exceptions::CompositionNotFinalizedError}}(\textcolor{stringliteral}{"{}Composition\ has\ not\ been\ finalized.\ Hint:\ Consider\ running\ .finalize()."{}});}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00746}00746\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00747}00747\ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ symbol\ =\ \textcolor{keyword}{static\_cast<}std::string\textcolor{keyword}{>}(isotope.\mbox{\hyperlink{structfourdst_1_1atomic_1_1_species_a1fcc01fc978b34ba2531117f10be6741}{name}}());}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00748}00748\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_aa7f2753b10e85ae3bbf0c3d600a973db}{m\_compositions}}.contains(symbol))\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00749}00749\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00750}00750\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00751}00751\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00752}00752\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00753}00753\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00755}00755\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00756}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a24a3bdeb8e8e55b54ecdee6dcb0d9561}{00756}}\ \ \ \ \ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a24a3bdeb8e8e55b54ecdee6dcb0d9561}{Composition::operator+}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\&\ other)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00757}00757\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a3aead72892606725a4149a5f65bd31ec}{mix}}(other,\ 0.5);}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00758}00758\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00759}00759\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00760}\mbox{\hyperlink{structfourdst_1_1composition_1_1_global_composition_a3c072a749c3648607771ac9105181f26}{00760}}\ \ \ \ \ std::ostream\&\ \mbox{\hyperlink{namespacefourdst_1_1composition_a8468dde1b148c0583b8a9f85b8d0ce9a}{operator<<}}(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_global_composition}{GlobalComposition}}\&\ comp)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00761}00761\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}Global\ Composition:\ \(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00762}00762\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)tSpecific\ Number\ Density:\ "{}}\ <<\ comp.\mbox{\hyperlink{structfourdst_1_1composition_1_1_global_composition_a0df6ecfe28d13cbffd0abcbfec9aee41}{specificNumberDensity}}\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00763}00763\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)tMean\ Particle\ Mass:\ "{}}\ <<\ comp.\mbox{\hyperlink{structfourdst_1_1composition_1_1_global_composition_a9c35810d965841a755da9ce4644a2f1b}{meanParticleMass}}\ <<\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00764}00764\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00765}00765\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00766}00766\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00767}\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ae7a6a113fc5914248eff5629716d6eb2}{00767}}\ \ \ \ \ std::ostream\&\ \mbox{\hyperlink{namespacefourdst_1_1composition_a8468dde1b148c0583b8a9f85b8d0ce9a}{operator<<}}(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a1cccb94c150dd1dcde860f55fbeaf2bd}{CompositionEntry}}\&\ entry)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00768}00768\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}<"{}}\ <<\ entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_ac273debdba6a1b3ac0f11698c399d38e}{m\_symbol}}\ <<\ \textcolor{stringliteral}{"{}\ :\ m\_frac\ =\ "{}}\ <<\ entry.\mbox{\hyperlink{structfourdst_1_1composition_1_1_composition_entry_a66cb086719d7f654869bd7b0cee87ffc}{mass\_fraction}}()\ <<\ \textcolor{stringliteral}{"{}>"{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00769}00769\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00770}00770\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00771}00771\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00772}\mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a36c2525d21cd932065bb2bb30bc57fb4}{00772}}\ \ \ \ \ std::ostream\&\ \mbox{\hyperlink{namespacefourdst_1_1composition_a8468dde1b148c0583b8a9f85b8d0ce9a}{operator<<}}(std::ostream\&\ os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{classfourdst_1_1composition_1_1_composition_a23b83b76ee025f6fc009184ee19bba88}{Composition}}\&\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}})\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00773}00773\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}Composition(finalized:\ "{}}\ <<\ (\mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_finalized\ ?\ \textcolor{stringliteral}{"{}true"{}}\ :\ \textcolor{stringliteral}{"{}false"{}})\ <<\ \textcolor{stringliteral}{"{},\ "{}}\ ;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00774}00774\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{size\_t}\ count\ =\ 0;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00775}00775\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\textcolor{keyword}{const}\ \textcolor{keyword}{auto}\ \&entry:\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_compositions\ |\ std::views::values)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00776}00776\ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ entry;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00777}00777\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (count\ <\ \mbox{\hyperlink{namespacefourdst_1_1composition}{composition}}.m\_compositions.size()\ -\/\ 1)\ \{}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00778}00778\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{},\ "{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00779}00779\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00780}00780\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00781}00781\ \ \ \ \ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{})"{}};}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00782}00782\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ os;}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00783}00783\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00784}00784\ }
\DoxyCodeLine{\Hypertarget{composition_8cpp_source_l00785}00785\ \}\ \textcolor{comment}{//\ namespace\ fourdst::composition}}

\end{DoxyCode}
