Files
libcomposition/docs/html/classfourdst_1_1composition_1_1_composition.html

3061 lines
205 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fourdst::libcomposition: fourdst::composition::Composition Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">fourdst::libcomposition<span id="projectnumber">&#160;v1.9.0</span>
</div>
<div id="projectbrief">Robust atomic species information library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classfourdst_1_1composition_1_1_composition.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classfourdst_1_1composition_1_1_composition-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">fourdst::composition::Composition Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Manages a collection of chemical species and their abundances.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="composition_8h_source.html">composition.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for fourdst::composition::Composition:</div>
<div class="dyncontent">
<div class="center">
<img src="classfourdst_1_1composition_1_1_composition.png" usemap="#fourdst::composition::Composition_map" alt=""/>
<map id="fourdst::composition::Composition_map" name="fourdst::composition::Composition_map">
<area href="class_composition_abstract.html" title="Abstract base class for chemical composition representations." alt="CompositionAbstract" shape="rect" coords="0,0,197,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a23b83b76ee025f6fc009184ee19bba88" id="r_a23b83b76ee025f6fc009184ee19bba88"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> ()=default</td></tr>
<tr class="memdesc:a23b83b76ee025f6fc009184ee19bba88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a23b83b76ee025f6fc009184ee19bba88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08c1d1fe9384c5255a6ba40e34b18315" id="r_a08c1d1fe9384c5255a6ba40e34b18315"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a08c1d1fe9384c5255a6ba40e34b18315">~Composition</a> () override=default</td></tr>
<tr class="memdesc:a08c1d1fe9384c5255a6ba40e34b18315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <br /></td></tr>
<tr class="separator:a08c1d1fe9384c5255a6ba40e34b18315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72d063a74a9d2197065884a2cea57a14" id="r_a72d063a74a9d2197065884a2cea57a14"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a72d063a74a9d2197065884a2cea57a14">finalize</a> (bool norm=false)</td></tr>
<tr class="memdesc:a72d063a74a9d2197065884a2cea57a14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finalizes the composition, making it ready for querying. <br /></td></tr>
<tr class="separator:a72d063a74a9d2197065884a2cea57a14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3cc2099efd7db8eec3d9af2294b75fa" id="r_ae3cc2099efd7db8eec3d9af2294b75fa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae3cc2099efd7db8eec3d9af2294b75fa">Composition</a> (const std::vector&lt; std::string &gt; &amp;symbols)</td></tr>
<tr class="memdesc:ae3cc2099efd7db8eec3d9af2294b75fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols. <br /></td></tr>
<tr class="separator:ae3cc2099efd7db8eec3d9af2294b75fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d6fbe5c8142b358641bbe7ffde51053" id="r_a2d6fbe5c8142b358641bbe7ffde51053"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d6fbe5c8142b358641bbe7ffde51053">Composition</a> (const std::set&lt; std::string &gt; &amp;symbols)</td></tr>
<tr class="memdesc:a2d6fbe5c8142b358641bbe7ffde51053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a set. <br /></td></tr>
<tr class="separator:a2d6fbe5c8142b358641bbe7ffde51053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4d4cc5875cba931a91faee13f55594e" id="r_af4d4cc5875cba931a91faee13f55594e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af4d4cc5875cba931a91faee13f55594e">Composition</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;fractions, bool massFracMode=true)</td></tr>
<tr class="memdesc:af4d4cc5875cba931a91faee13f55594e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs and finalizes a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> with the given symbols and fractions. <br /></td></tr>
<tr class="separator:af4d4cc5875cba931a91faee13f55594e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21369a80378d4c90438a34f0e4a275ca" id="r_a21369a80378d4c90438a34f0e4a275ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a21369a80378d4c90438a34f0e4a275ca">Composition</a> (const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;composition)</td></tr>
<tr class="memdesc:a21369a80378d4c90438a34f0e4a275ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from another <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. <br /></td></tr>
<tr class="separator:a21369a80378d4c90438a34f0e4a275ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ec1e23cfecef764cb831171fed62fc2" id="r_a4ec1e23cfecef764cb831171fed62fc2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ec1e23cfecef764cb831171fed62fc2">operator=</a> (<a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> const &amp;other)</td></tr>
<tr class="memdesc:a4ec1e23cfecef764cb831171fed62fc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <br /></td></tr>
<tr class="separator:a4ec1e23cfecef764cb831171fed62fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bc2e64f87c12befdc2bc767e7405661" id="r_a1bc2e64f87c12befdc2bc767e7405661"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a> (const std::string &amp;symbol, bool massFracMode=true)</td></tr>
<tr class="memdesc:a1bc2e64f87c12befdc2bc767e7405661"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a new symbol for inclusion in the composition. <br /></td></tr>
<tr class="separator:a1bc2e64f87c12befdc2bc767e7405661"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b422156600823276a9606bfa07ad4db" id="r_a9b422156600823276a9606bfa07ad4db"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9b422156600823276a9606bfa07ad4db">registerSymbol</a> (const std::vector&lt; std::string &gt; &amp;symbols, bool massFracMode=true)</td></tr>
<tr class="memdesc:a9b422156600823276a9606bfa07ad4db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers multiple new symbols. <br /></td></tr>
<tr class="separator:a9b422156600823276a9606bfa07ad4db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ce00f73cc133bb1bac2b030b93ab480" id="r_a4ce00f73cc133bb1bac2b030b93ab480"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ce00f73cc133bb1bac2b030b93ab480">registerSpecies</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species, bool massFracMode=true)</td></tr>
<tr class="memdesc:a4ce00f73cc133bb1bac2b030b93ab480"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a new species by extracting its symbol. <br /></td></tr>
<tr class="separator:a4ce00f73cc133bb1bac2b030b93ab480"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a057f2bf2e86bcc3c649c0ddf18cf3826" id="r_a057f2bf2e86bcc3c649c0ddf18cf3826"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a057f2bf2e86bcc3c649c0ddf18cf3826">registerSpecies</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;species, bool massFracMode=true)</td></tr>
<tr class="memdesc:a057f2bf2e86bcc3c649c0ddf18cf3826"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a vector of new species. <br /></td></tr>
<tr class="separator:a057f2bf2e86bcc3c649c0ddf18cf3826"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f10f38878ba4be121d6d77a8b1f4d7a" id="r_a3f10f38878ba4be121d6d77a8b1f4d7a"><td class="memItemLeft" align="right" valign="top">std::set&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3f10f38878ba4be121d6d77a8b1f4d7a">getRegisteredSymbols</a> () const override</td></tr>
<tr class="memdesc:a3f10f38878ba4be121d6d77a8b1f4d7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the registered symbols. <br /></td></tr>
<tr class="separator:a3f10f38878ba4be121d6d77a8b1f4d7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af61ebe73a8b5926eb23037bb078fa87a" id="r_af61ebe73a8b5926eb23037bb078fa87a"><td class="memItemLeft" align="right" valign="top">std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af61ebe73a8b5926eb23037bb078fa87a">getRegisteredSpecies</a> () const override</td></tr>
<tr class="memdesc:af61ebe73a8b5926eb23037bb078fa87a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of all species that are registered in the composition. <br /></td></tr>
<tr class="separator:af61ebe73a8b5926eb23037bb078fa87a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a493224656aa3ade68389250720ef09af" id="r_a493224656aa3ade68389250720ef09af"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a493224656aa3ade68389250720ef09af">setMassFraction</a> (const std::string &amp;symbol, const double &amp;mass_fraction)</td></tr>
<tr class="memdesc:a493224656aa3ade68389250720ef09af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the mass fraction for a given symbol. <br /></td></tr>
<tr class="separator:a493224656aa3ade68389250720ef09af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66ce1012c12b0a83629eb09d451b68e3" id="r_a66ce1012c12b0a83629eb09d451b68e3"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a66ce1012c12b0a83629eb09d451b68e3">setMassFraction</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;mass_fractions)</td></tr>
<tr class="memdesc:a66ce1012c12b0a83629eb09d451b68e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the mass fraction for multiple symbols. <br /></td></tr>
<tr class="separator:a66ce1012c12b0a83629eb09d451b68e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6c94269a5d16349c98860f3015b734a" id="r_aa6c94269a5d16349c98860f3015b734a"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa6c94269a5d16349c98860f3015b734a">setMassFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species, const double &amp;mass_fraction)</td></tr>
<tr class="memdesc:aa6c94269a5d16349c98860f3015b734a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the mass fraction for a given species. <br /></td></tr>
<tr class="separator:aa6c94269a5d16349c98860f3015b734a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbae020d46c74708a7974c1ca755bb62" id="r_abbae020d46c74708a7974c1ca755bb62"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abbae020d46c74708a7974c1ca755bb62">setMassFraction</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;species, const std::vector&lt; double &gt; &amp;mass_fractions)</td></tr>
<tr class="memdesc:abbae020d46c74708a7974c1ca755bb62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the mass fraction for multiple species. <br /></td></tr>
<tr class="separator:abbae020d46c74708a7974c1ca755bb62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d4d748f3ee25e68751fb143717ed080" id="r_a7d4d748f3ee25e68751fb143717ed080"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7d4d748f3ee25e68751fb143717ed080">setNumberFraction</a> (const std::string &amp;symbol, const double &amp;number_fraction)</td></tr>
<tr class="memdesc:a7d4d748f3ee25e68751fb143717ed080"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number fraction for a given symbol. <br /></td></tr>
<tr class="separator:a7d4d748f3ee25e68751fb143717ed080"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48014a0a725ebd91ad1193c063b5b26f" id="r_a48014a0a725ebd91ad1193c063b5b26f"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a48014a0a725ebd91ad1193c063b5b26f">setNumberFraction</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;number_fractions)</td></tr>
<tr class="memdesc:a48014a0a725ebd91ad1193c063b5b26f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number fraction for multiple symbols. <br /></td></tr>
<tr class="separator:a48014a0a725ebd91ad1193c063b5b26f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa822bb48a948d101fef759ffbefe31b" id="r_aaa822bb48a948d101fef759ffbefe31b"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aaa822bb48a948d101fef759ffbefe31b">setNumberFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species, const double &amp;number_fraction)</td></tr>
<tr class="memdesc:aaa822bb48a948d101fef759ffbefe31b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number fraction for a given species. <br /></td></tr>
<tr class="separator:aaa822bb48a948d101fef759ffbefe31b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc068778a1ef33cad67f5ca028b49bb8" id="r_adc068778a1ef33cad67f5ca028b49bb8"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adc068778a1ef33cad67f5ca028b49bb8">setNumberFraction</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;species, const std::vector&lt; double &gt; &amp;number_fractions)</td></tr>
<tr class="memdesc:adc068778a1ef33cad67f5ca028b49bb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number fraction for multiple species. <br /></td></tr>
<tr class="separator:adc068778a1ef33cad67f5ca028b49bb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aead72892606725a4149a5f65bd31ec" id="r_a3aead72892606725a4149a5f65bd31ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3aead72892606725a4149a5f65bd31ec">mix</a> (const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;other, double fraction) const</td></tr>
<tr class="memdesc:a3aead72892606725a4149a5f65bd31ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mixes this composition with another to produce a new composition. <br /></td></tr>
<tr class="separator:a3aead72892606725a4149a5f65bd31ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae07019ab6e02394e6ea353e0b98a417" id="r_aae07019ab6e02394e6ea353e0b98a417"><td class="memItemLeft" align="right" valign="top">std::unordered_map&lt; std::string, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aae07019ab6e02394e6ea353e0b98a417">getMassFraction</a> () const override</td></tr>
<tr class="memdesc:aae07019ab6e02394e6ea353e0b98a417"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fractions of all species in the composition. <br /></td></tr>
<tr class="separator:aae07019ab6e02394e6ea353e0b98a417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5d8d21632fca2b35b0898f2b205cd10" id="r_ae5d8d21632fca2b35b0898f2b205cd10"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae5d8d21632fca2b35b0898f2b205cd10">getMassFraction</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:ae5d8d21632fca2b35b0898f2b205cd10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fraction for a given symbol. <br /></td></tr>
<tr class="separator:ae5d8d21632fca2b35b0898f2b205cd10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeae9d6d3f742cd8b59b58abcb228a44d" id="r_aeae9d6d3f742cd8b59b58abcb228a44d"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aeae9d6d3f742cd8b59b58abcb228a44d">getMassFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:aeae9d6d3f742cd8b59b58abcb228a44d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fraction for a given isotope. <br /></td></tr>
<tr class="separator:aeae9d6d3f742cd8b59b58abcb228a44d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f71d4d8f0297c576fd62fabd490305" id="r_a34f71d4d8f0297c576fd62fabd490305"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a34f71d4d8f0297c576fd62fabd490305">getNumberFraction</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:a34f71d4d8f0297c576fd62fabd490305"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fraction for a given symbol. <br /></td></tr>
<tr class="separator:a34f71d4d8f0297c576fd62fabd490305"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a178d7393ee8b5d496925dcd901c03d23" id="r_a178d7393ee8b5d496925dcd901c03d23"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a178d7393ee8b5d496925dcd901c03d23">getNumberFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a178d7393ee8b5d496925dcd901c03d23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fraction for a given isotope. <br /></td></tr>
<tr class="separator:a178d7393ee8b5d496925dcd901c03d23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae46fb8c3020dadd69080a7acd2054ea1" id="r_ae46fb8c3020dadd69080a7acd2054ea1"><td class="memItemLeft" align="right" valign="top">std::unordered_map&lt; std::string, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae46fb8c3020dadd69080a7acd2054ea1">getNumberFraction</a> () const override</td></tr>
<tr class="memdesc:ae46fb8c3020dadd69080a7acd2054ea1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fractions of all species in the composition. <br /></td></tr>
<tr class="separator:ae46fb8c3020dadd69080a7acd2054ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add67a92d73e3a57a2bbdb52bc9ca3bfe" id="r_add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#add67a92d73e3a57a2bbdb52bc9ca3bfe">getMolarAbundance</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the molar abundance (X_i / A_i) for a given symbol. <br /></td></tr>
<tr class="separator:add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c70279d36826e0e1026da3fa892ffc" id="r_a28c70279d36826e0e1026da3fa892ffc"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a28c70279d36826e0e1026da3fa892ffc">getMolarAbundance</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a28c70279d36826e0e1026da3fa892ffc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the molar abundance for a given isotope. <br /></td></tr>
<tr class="separator:a28c70279d36826e0e1026da3fa892ffc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a092d3536b04167ea2e6e3a3b1446c377" id="r_a092d3536b04167ea2e6e3a3b1446c377"><td class="memItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a>, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a092d3536b04167ea2e6e3a3b1446c377">getComposition</a> (const std::string &amp;symbol) const</td></tr>
<tr class="memdesc:a092d3536b04167ea2e6e3a3b1446c377"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the composition entry and global composition data for a given symbol. <br /></td></tr>
<tr class="separator:a092d3536b04167ea2e6e3a3b1446c377"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe5f1086027044c84ff35a366b2e8e2d" id="r_afe5f1086027044c84ff35a366b2e8e2d"><td class="memItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a>, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afe5f1086027044c84ff35a366b2e8e2d">getComposition</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species) const</td></tr>
<tr class="memdesc:afe5f1086027044c84ff35a366b2e8e2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the composition entry and global composition data for a given species. <br /></td></tr>
<tr class="separator:afe5f1086027044c84ff35a366b2e8e2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1138c86f7ccd39594601c2ec63ad89e9" id="r_a1138c86f7ccd39594601c2ec63ad89e9"><td class="memItemLeft" align="right" valign="top">std::pair&lt; std::unordered_map&lt; std::string, <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a> &gt;, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1138c86f7ccd39594601c2ec63ad89e9">getComposition</a> () const</td></tr>
<tr class="memdesc:a1138c86f7ccd39594601c2ec63ad89e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets all composition entries and the global composition data. <br /></td></tr>
<tr class="separator:a1138c86f7ccd39594601c2ec63ad89e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a796386824d1358527fed7c6b537935d8" id="r_a796386824d1358527fed7c6b537935d8"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a796386824d1358527fed7c6b537935d8">getMeanParticleMass</a> () const override</td></tr>
<tr class="memdesc:a796386824d1358527fed7c6b537935d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the mean particle mass of the composition. <br /></td></tr>
<tr class="separator:a796386824d1358527fed7c6b537935d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7dd8f7d69727acfacf1bf58c4083a27" id="r_af7dd8f7d69727acfacf1bf58c4083a27"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af7dd8f7d69727acfacf1bf58c4083a27">getMeanAtomicNumber</a> () const override</td></tr>
<tr class="memdesc:af7dd8f7d69727acfacf1bf58c4083a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the mean atomic number of the composition. <br /></td></tr>
<tr class="separator:af7dd8f7d69727acfacf1bf58c4083a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62dcfcf8f824d6af7903a9a9c3d5721e" id="r_a62dcfcf8f824d6af7903a9a9c3d5721e"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a62dcfcf8f824d6af7903a9a9c3d5721e">getElectronAbundance</a> () const override</td></tr>
<tr class="memdesc:a62dcfcf8f824d6af7903a9a9c3d5721e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the electron abundance of the composition. <br /></td></tr>
<tr class="separator:a62dcfcf8f824d6af7903a9a9c3d5721e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17635cd21744c7cf86cb1eb75152c816" id="r_a17635cd21744c7cf86cb1eb75152c816"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a17635cd21744c7cf86cb1eb75152c816">subset</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::string &amp;method=&quot;norm&quot;) const</td></tr>
<tr class="memdesc:a17635cd21744c7cf86cb1eb75152c816"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object containing a subset of species from this one. <br /></td></tr>
<tr class="separator:a17635cd21744c7cf86cb1eb75152c816"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac01ae1967c266d8187bc6e104c8a0d19" id="r_ac01ae1967c266d8187bc6e104c8a0d19"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac01ae1967c266d8187bc6e104c8a0d19">hasSymbol</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:ac01ae1967c266d8187bc6e104c8a0d19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a symbol is registered in the composition. <br /></td></tr>
<tr class="separator:ac01ae1967c266d8187bc6e104c8a0d19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55dfadad6cf5fb249356edad1733a813" id="r_a55dfadad6cf5fb249356edad1733a813"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a55dfadad6cf5fb249356edad1733a813">hasSpecies</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a55dfadad6cf5fb249356edad1733a813"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a species is registered in the composition. <br /></td></tr>
<tr class="separator:a55dfadad6cf5fb249356edad1733a813"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7efe2cd3a69b743bf2086941b6dfd965" id="r_a7efe2cd3a69b743bf2086941b6dfd965"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7efe2cd3a69b743bf2086941b6dfd965">contains</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;isotope) const override</td></tr>
<tr class="memdesc:a7efe2cd3a69b743bf2086941b6dfd965"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a given isotope is present in the composition. <br /></td></tr>
<tr class="separator:a7efe2cd3a69b743bf2086941b6dfd965"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0af981ed1074b26c237cf6cf35f82c9e" id="r_a0af981ed1074b26c237cf6cf35f82c9e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0af981ed1074b26c237cf6cf35f82c9e">setCompositionMode</a> (bool massFracMode)</td></tr>
<tr class="memdesc:a0af981ed1074b26c237cf6cf35f82c9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the composition mode (mass fraction vs. number fraction). <br /></td></tr>
<tr class="separator:a0af981ed1074b26c237cf6cf35f82c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75dbc8377556c835455991c7c7fe206" id="r_ac75dbc8377556c835455991c7c7fe206"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html">CanonicalComposition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac75dbc8377556c835455991c7c7fe206">getCanonicalComposition</a> (bool harsh=false) const</td></tr>
<tr class="memdesc:ac75dbc8377556c835455991c7c7fe206"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current canonical composition (X, Y, Z). <br /></td></tr>
<tr class="separator:ac75dbc8377556c835455991c7c7fe206"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85169b763138ab72047e43e07af978fb" id="r_a85169b763138ab72047e43e07af978fb"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a85169b763138ab72047e43e07af978fb">getMassFractionVector</a> () const override</td></tr>
<tr class="memdesc:a85169b763138ab72047e43e07af978fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the mass fraction stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:a85169b763138ab72047e43e07af978fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49d2eba540f28324c6b7145a5b6cabfd" id="r_a49d2eba540f28324c6b7145a5b6cabfd"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a49d2eba540f28324c6b7145a5b6cabfd">getNumberFractionVector</a> () const override</td></tr>
<tr class="memdesc:a49d2eba540f28324c6b7145a5b6cabfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the number fractions stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:a49d2eba540f28324c6b7145a5b6cabfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed665c07c42b40682da453576621399" id="r_abed665c07c42b40682da453576621399"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abed665c07c42b40682da453576621399">getMolarAbundanceVector</a> () const override</td></tr>
<tr class="memdesc:abed665c07c42b40682da453576621399"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the molar abundances stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:abed665c07c42b40682da453576621399"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d94f62402bb90b5d12679faeaa8c5d7" id="r_a0d94f62402bb90b5d12679faeaa8c5d7"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0d94f62402bb90b5d12679faeaa8c5d7">getSpeciesIndex</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:a0d94f62402bb90b5d12679faeaa8c5d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the index in the sorted vector representation for a given symbol <br /></td></tr>
<tr class="separator:a0d94f62402bb90b5d12679faeaa8c5d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d220b42fa06d7d3a43944ee2b8f6a5f" id="r_a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3d220b42fa06d7d3a43944ee2b8f6a5f">getSpeciesIndex</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the index in the sorted vector representation for a given symbol <br /></td></tr>
<tr class="separator:a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4f854ded38f5e6fcd157a74a57cbf0c" id="r_ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae4f854ded38f5e6fcd157a74a57cbf0c">getSpeciesAtIndex</a> (size_t index) const override</td></tr>
<tr class="memdesc:ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the species at a given index in the sorted vector representation. <br /></td></tr>
<tr class="separator:ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24a3bdeb8e8e55b54ecdee6dcb0d9561" id="r_a24a3bdeb8e8e55b54ecdee6dcb0d9561"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a24a3bdeb8e8e55b54ecdee6dcb0d9561">operator+</a> (const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;other) const</td></tr>
<tr class="memdesc:a24a3bdeb8e8e55b54ecdee6dcb0d9561"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overloads the + operator to mix two compositions with a 50/50 fraction. <br /></td></tr>
<tr class="separator:a24a3bdeb8e8e55b54ecdee6dcb0d9561"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1701644ff1c83c220dc04eb58d1621b" id="r_ab1701644ff1c83c220dc04eb58d1621b"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab1701644ff1c83c220dc04eb58d1621b">begin</a> ()</td></tr>
<tr class="memdesc:ab1701644ff1c83c220dc04eb58d1621b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the beginning of the composition map. <br /></td></tr>
<tr class="separator:ab1701644ff1c83c220dc04eb58d1621b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf41a833e8b704daf4f581fca5c8cb9b" id="r_adf41a833e8b704daf4f581fca5c8cb9b"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adf41a833e8b704daf4f581fca5c8cb9b">begin</a> () const</td></tr>
<tr class="memdesc:adf41a833e8b704daf4f581fca5c8cb9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a const iterator to the beginning of the composition map. <br /></td></tr>
<tr class="separator:adf41a833e8b704daf4f581fca5c8cb9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeaf6f1213e78cb1fe8a8317f0a8adc2" id="r_adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adeaf6f1213e78cb1fe8a8317f0a8adc2">end</a> ()</td></tr>
<tr class="memdesc:adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the end of the composition map. <br /></td></tr>
<tr class="separator:adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed2f5676f8f742199f01e4d1e9664bdd" id="r_aed2f5676f8f742199f01e4d1e9664bdd"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aed2f5676f8f742199f01e4d1e9664bdd">end</a> () const</td></tr>
<tr class="memdesc:aed2f5676f8f742199f01e4d1e9664bdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a const iterator to the end of the composition map. <br /></td></tr>
<tr class="separator:aed2f5676f8f742199f01e4d1e9664bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_composition_abstract"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_class_composition_abstract')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_composition_abstract.html">CompositionAbstract</a></td></tr>
<tr class="memitem:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract" id="r_aaae3d6215b7433cb9871664852a95d1b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_composition_abstract.html#aaae3d6215b7433cb9871664852a95d1b">~CompositionAbstract</a> ()=default</td></tr>
<tr class="memdesc:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor. <br /></td></tr>
<tr class="separator:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:addf03ba8b988970d341884d487aa94d5" id="r_addf03ba8b988970d341884d487aa94d5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#addf03ba8b988970d341884d487aa94d5">isValidComposition</a> (const std::vector&lt; double &gt; &amp;fractions) const</td></tr>
<tr class="memdesc:addf03ba8b988970d341884d487aa94d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the given fractions are valid (sum to ~1.0). <br /></td></tr>
<tr class="separator:addf03ba8b988970d341884d487aa94d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86982685c34db4a8f079ddafc25c594e" id="r_a86982685c34db4a8f079ddafc25c594e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a86982685c34db4a8f079ddafc25c594e">validateComposition</a> (const std::vector&lt; double &gt; &amp;fractions) const</td></tr>
<tr class="memdesc:a86982685c34db4a8f079ddafc25c594e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validates the given fractions, throwing an exception on failure. <br /></td></tr>
<tr class="separator:a86982685c34db4a8f079ddafc25c594e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a869dbae3db9d09c57b2df56a813a55fb" id="r_a869dbae3db9d09c57b2df56a813a55fb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a869dbae3db9d09c57b2df56a813a55fb">finalizeMassFracMode</a> (bool norm)</td></tr>
<tr class="memdesc:a869dbae3db9d09c57b2df56a813a55fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finalizes the composition in mass fraction mode. <br /></td></tr>
<tr class="separator:a869dbae3db9d09c57b2df56a813a55fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a461ab4e9cb5975cf865db5f16f03ddfe" id="r_a461ab4e9cb5975cf865db5f16f03ddfe"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a461ab4e9cb5975cf865db5f16f03ddfe">finalizeNumberFracMode</a> (bool norm)</td></tr>
<tr class="memdesc:a461ab4e9cb5975cf865db5f16f03ddfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finalizes the composition in number fraction mode. <br /></td></tr>
<tr class="separator:a461ab4e9cb5975cf865db5f16f03ddfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-methods" name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a8fdac26e6298008aaeaa5b15f7fe244f" id="r_a8fdac26e6298008aaeaa5b15f7fe244f"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a8fdac26e6298008aaeaa5b15f7fe244f">isValidSymbol</a> (const std::string &amp;symbol)</td></tr>
<tr class="memdesc:a8fdac26e6298008aaeaa5b15f7fe244f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if the given symbol is valid by checking against the global species database. <br /></td></tr>
<tr class="separator:a8fdac26e6298008aaeaa5b15f7fe244f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a1f96b2c567364368ea5ee6f0826f3091" id="r_a1f96b2c567364368ea5ee6f0826f3091"><td class="memItemLeft" align="right" valign="top">config::Config &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1f96b2c567364368ea5ee6f0826f3091">m_config</a> = config::Config::getInstance()</td></tr>
<tr class="separator:a1f96b2c567364368ea5ee6f0826f3091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b2128948f01630cd2968488b450ce5" id="r_a40b2128948f01630cd2968488b450ce5"><td class="memItemLeft" align="right" valign="top">logging::LogManager &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a40b2128948f01630cd2968488b450ce5">m_logManager</a> = logging::LogManager::getInstance()</td></tr>
<tr class="separator:a40b2128948f01630cd2968488b450ce5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6c66f35e1fb05dd24aacaf90e115c5e" id="r_ab6c66f35e1fb05dd24aacaf90e115c5e"><td class="memItemLeft" align="right" valign="top">quill::Logger *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab6c66f35e1fb05dd24aacaf90e115c5e">m_logger</a> = m_logManager.getLogger(&quot;log&quot;)</td></tr>
<tr class="separator:ab6c66f35e1fb05dd24aacaf90e115c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa00cbc0933d8a22bb900ac21a338e5ac" id="r_aa00cbc0933d8a22bb900ac21a338e5ac"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa00cbc0933d8a22bb900ac21a338e5ac">m_finalized</a> = false</td></tr>
<tr class="memdesc:aa00cbc0933d8a22bb900ac21a338e5ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the composition is finalized. <br /></td></tr>
<tr class="separator:aa00cbc0933d8a22bb900ac21a338e5ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addae4484da7d5072ab66a721dbe04ced" id="r_addae4484da7d5072ab66a721dbe04ced"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#addae4484da7d5072ab66a721dbe04ced">m_specificNumberDensity</a> = 0.0</td></tr>
<tr class="memdesc:addae4484da7d5072ab66a721dbe04ced"><td class="mdescLeft">&#160;</td><td class="mdescRight">The specific number density of the composition (\sum_{i} X_i m_i. Where X_i is the number fraction of the ith species and m_i is the mass of the ith species). <br /></td></tr>
<tr class="separator:addae4484da7d5072ab66a721dbe04ced"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a36c8d22ce61023e7bea1d9417577d4" id="r_a4a36c8d22ce61023e7bea1d9417577d4"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4a36c8d22ce61023e7bea1d9417577d4">m_meanParticleMass</a> = 0.0</td></tr>
<tr class="memdesc:a4a36c8d22ce61023e7bea1d9417577d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The mean particle mass of the composition (\sum_{i} \frac{n_i}{m_i}. where n_i is the number fraction of the ith species and m_i is the mass of the ith species). <br /></td></tr>
<tr class="separator:a4a36c8d22ce61023e7bea1d9417577d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a671f1ee8be00f4ff8c1d94fabb382380" id="r_a671f1ee8be00f4ff8c1d94fabb382380"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a671f1ee8be00f4ff8c1d94fabb382380">m_massFracMode</a> = true</td></tr>
<tr class="memdesc:a671f1ee8be00f4ff8c1d94fabb382380"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if mass fraction mode, false if number fraction mode. <br /></td></tr>
<tr class="separator:a671f1ee8be00f4ff8c1d94fabb382380"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39bfcb7d81d723cbd9d021abd533b4d6" id="r_a39bfcb7d81d723cbd9d021abd533b4d6"><td class="memItemLeft" align="right" valign="top">std::set&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a39bfcb7d81d723cbd9d021abd533b4d6">m_registeredSymbols</a></td></tr>
<tr class="memdesc:a39bfcb7d81d723cbd9d021abd533b4d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The registered symbols. <br /></td></tr>
<tr class="separator:a39bfcb7d81d723cbd9d021abd533b4d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7f2753b10e85ae3bbf0c3d600a973db" id="r_aa7f2753b10e85ae3bbf0c3d600a973db"><td class="memItemLeft" align="right" valign="top">std::unordered_map&lt; std::string, <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa7f2753b10e85ae3bbf0c3d600a973db">m_compositions</a></td></tr>
<tr class="memdesc:aa7f2753b10e85ae3bbf0c3d600a973db"><td class="mdescLeft">&#160;</td><td class="mdescRight">The compositions. <br /></td></tr>
<tr class="separator:aa7f2753b10e85ae3bbf0c3d600a973db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02cd9d9608da082a200fdfa86d14bf5d" id="r_a02cd9d9608da082a200fdfa86d14bf5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a02cd9d9608da082a200fdfa86d14bf5d">m_cache</a></td></tr>
<tr class="memdesc:a02cd9d9608da082a200fdfa86d14bf5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cache for computed properties to avoid redundant calculations. <br /></td></tr>
<tr class="separator:a02cd9d9608da082a200fdfa86d14bf5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a36c2525d21cd932065bb2bb30bc57fb4" id="r_a36c2525d21cd932065bb2bb30bc57fb4"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a36c2525d21cd932065bb2bb30bc57fb4">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;composition)</td></tr>
<tr class="memdesc:a36c2525d21cd932065bb2bb30bc57fb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overloaded output stream operator for <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. <br /></td></tr>
<tr class="separator:a36c2525d21cd932065bb2bb30bc57fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages a collection of chemical species and their abundances. </p>
<p>This class is a primary interface for defining and manipulating material compositions. It can operate in two modes: mass fraction or number fraction.</p>
<p><b>Key Rules and Workflow:</b></p><ol type="1">
<li><b>Registration:</b> Before setting an abundance for a species, its symbol (e.g., "He-4") must be registered using <code><a class="el" href="#a1bc2e64f87c12befdc2bc767e7405661" title="Registers a new symbol for inclusion in the composition.">registerSymbol()</a></code> or <code><a class="el" href="#a4ce00f73cc133bb1bac2b030b93ab480" title="Registers a new species by extracting its symbol.">registerSpecies()</a></code>. All registered species must conform to the same abundance mode (mass or number fraction).</li>
<li><b>Setting Abundances:</b> Use <code><a class="el" href="#a493224656aa3ade68389250720ef09af" title="Sets the mass fraction for a given symbol.">setMassFraction()</a></code> or <code><a class="el" href="#a7d4d748f3ee25e68751fb143717ed080" title="Sets the number fraction for a given symbol.">setNumberFraction()</a></code> to define the composition.</li>
<li><b>Finalization:</b> Before querying any compositional data (e.g., <code><a class="el" href="#aae07019ab6e02394e6ea353e0b98a417" title="Gets the mass fractions of all species in the composition.">getMassFraction()</a></code>, <code><a class="el" href="#a796386824d1358527fed7c6b537935d8" title="Compute the mean particle mass of the composition.">getMeanParticleMass()</a></code>), the composition must be <b>finalized</b> by calling <code><a class="el" href="#a72d063a74a9d2197065884a2cea57a14" title="Finalizes the composition, making it ready for querying.">finalize()</a></code>. This step validates the composition (abundances sum to ~1.0) and computes global properties.</li>
<li><b>Modification:</b> Any modification to abundances after finalization will un-finalize the composition, requiring another call to <code><a class="el" href="#a72d063a74a9d2197065884a2cea57a14" title="Finalizes the composition, making it ready for querying.">finalize()</a></code> before data can be retrieved again.</li>
<li><b>Construction:</b> A pre-finalized composition can be created by providing symbols and valid, normalized abundances to the constructor.</li>
</ol>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">This</td><td>class throws various exceptions from <code><a class="el" href="namespacefourdst_1_1composition_1_1exceptions.html">fourdst::composition::exceptions</a></code> for invalid operations, such as using unregistered symbols, providing invalid abundances, or accessing data from a non-finalized composition.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Mass Fraction Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;He-4&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a493224656aa3ade68389250720ef09af">setMassFraction</a>(<span class="stringliteral">&quot;H-1&quot;</span>, 0.75);</div>
<div class="line">comp.<a class="code hl_function" href="#a493224656aa3ade68389250720ef09af">setMassFraction</a>(<span class="stringliteral">&quot;He-4&quot;</span>, 0.25);</div>
<div class="line"><span class="keywordflow">if</span> (comp.<a class="code hl_function" href="#a72d063a74a9d2197065884a2cea57a14">finalize</a>()) {</div>
<div class="line"> <span class="keywordtype">double</span> he_mass_frac = comp.<a class="code hl_function" href="#aae07019ab6e02394e6ea353e0b98a417">getMassFraction</a>(<span class="stringliteral">&quot;He-4&quot;</span>); <span class="comment">// Returns 0.25</span></div>
<div class="line">}</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a1bc2e64f87c12befdc2bc767e7405661"><div class="ttname"><a href="#a1bc2e64f87c12befdc2bc767e7405661">fourdst::composition::Composition::registerSymbol</a></div><div class="ttdeci">void registerSymbol(const std::string &amp;symbol, bool massFracMode=true)</div><div class="ttdoc">Registers a new symbol for inclusion in the composition.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00255">composition.cpp:255</a></div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a23b83b76ee025f6fc009184ee19bba88"><div class="ttname"><a href="#a23b83b76ee025f6fc009184ee19bba88">fourdst::composition::Composition::Composition</a></div><div class="ttdeci">Composition()=default</div><div class="ttdoc">Default constructor.</div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a493224656aa3ade68389250720ef09af"><div class="ttname"><a href="#a493224656aa3ade68389250720ef09af">fourdst::composition::Composition::setMassFraction</a></div><div class="ttdeci">double setMassFraction(const std::string &amp;symbol, const double &amp;mass_fraction)</div><div class="ttdoc">Sets the mass fraction for a given symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00343">composition.cpp:343</a></div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a72d063a74a9d2197065884a2cea57a14"><div class="ttname"><a href="#a72d063a74a9d2197065884a2cea57a14">fourdst::composition::Composition::finalize</a></div><div class="ttdeci">bool finalize(bool norm=false)</div><div class="ttdoc">Finalizes the composition, making it ready for querying.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00445">composition.cpp:445</a></div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_aae07019ab6e02394e6ea353e0b98a417"><div class="ttname"><a href="#aae07019ab6e02394e6ea353e0b98a417">fourdst::composition::Composition::getMassFraction</a></div><div class="ttdeci">std::unordered_map&lt; std::string, double &gt; getMassFraction() const override</div><div class="ttdoc">Gets the mass fractions of all species in the composition.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00601">composition.cpp:601</a></div></div>
</div><!-- fragment --></dd></dl>
<dl class="section user"><dt>Number Fraction Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>, <span class="keyword">false</span>); <span class="comment">// Register in number fraction mode</span></div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;He-4&quot;</span>, <span class="keyword">false</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a7d4d748f3ee25e68751fb143717ed080">setNumberFraction</a>(<span class="stringliteral">&quot;H-1&quot;</span>, 0.9);</div>
<div class="line">comp.<a class="code hl_function" href="#a7d4d748f3ee25e68751fb143717ed080">setNumberFraction</a>(<span class="stringliteral">&quot;He-4&quot;</span>, 0.1);</div>
<div class="line"><span class="keywordflow">if</span> (comp.<a class="code hl_function" href="#a72d063a74a9d2197065884a2cea57a14">finalize</a>()) {</div>
<div class="line"> <span class="keywordtype">double</span> he_num_frac = comp.<a class="code hl_function" href="#a34f71d4d8f0297c576fd62fabd490305">getNumberFraction</a>(<span class="stringliteral">&quot;He-4&quot;</span>); <span class="comment">// Returns 0.1</span></div>
<div class="line">}</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a34f71d4d8f0297c576fd62fabd490305"><div class="ttname"><a href="#a34f71d4d8f0297c576fd62fabd490305">fourdst::composition::Composition::getNumberFraction</a></div><div class="ttdeci">double getNumberFraction(const std::string &amp;symbol) const override</div><div class="ttdoc">Gets the number fraction for a given symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00610">composition.cpp:610</a></div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a7d4d748f3ee25e68751fb143717ed080"><div class="ttname"><a href="#a7d4d748f3ee25e68751fb143717ed080">fourdst::composition::Composition::setNumberFraction</a></div><div class="ttdeci">double setNumberFraction(const std::string &amp;symbol, const double &amp;number_fraction)</div><div class="ttdoc">Sets the number fraction for a given symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00374">composition.cpp:374</a></div></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00255">255</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a23b83b76ee025f6fc009184ee19bba88" name="a23b83b76ee025f6fc009184ee19bba88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23b83b76ee025f6fc009184ee19bba88">&#9670;&#160;</a></span>Composition() <span class="overload">[1/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel default">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
</div>
</div>
<a id="a08c1d1fe9384c5255a6ba40e34b18315" name="a08c1d1fe9384c5255a6ba40e34b18315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08c1d1fe9384c5255a6ba40e34b18315">&#9670;&#160;</a></span>~Composition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::~Composition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel override">override</span><span class="mlabel default">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default destructor. </p>
</div>
</div>
<a id="ae3cc2099efd7db8eec3d9af2294b75fa" name="ae3cc2099efd7db8eec3d9af2294b75fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3cc2099efd7db8eec3d9af2294b75fa">&#9670;&#160;</a></span>Composition() <span class="overload">[2/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. The composition will be in mass fraction mode by default. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if any symbol is invalid. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(symbols);</div>
<div class="line">comp.setMassFraction(<span class="stringliteral">&quot;H-1&quot;</span>, 0.11);</div>
<div class="line">comp.setMassFraction(<span class="stringliteral">&quot;O-16&quot;</span>, 0.89);</div>
<div class="line">comp.finalize();</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html"><div class="ttname"><a href="classfourdst_1_1composition_1_1_composition.html">fourdst::composition::Composition</a></div><div class="ttdoc">Manages a collection of chemical species and their abundances.</div><div class="ttdef"><b>Definition</b> <a href="composition_8h_source.html#l00255">composition.h:255</a></div></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00187">187</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a2d6fbe5c8142b358641bbe7ffde51053" name="a2d6fbe5c8142b358641bbe7ffde51053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d6fbe5c8142b358641bbe7ffde51053">&#9670;&#160;</a></span>Composition() <span class="overload">[3/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::set&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a set. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. The composition will be in mass fraction mode by default. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if any symbol is invalid. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line">std::set&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(symbols);</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00195">195</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="af4d4cc5875cba931a91faee13f55594e" name="af4d4cc5875cba931a91faee13f55594e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4d4cc5875cba931a91faee13f55594e">&#9670;&#160;</a></span>Composition() <span class="overload">[4/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>fractions</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs and finalizes a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> with the given symbols and fractions. </p>
<p>This constructor provides a convenient way to create a fully-formed, finalized composition in one step. The provided fractions must be valid and sum to 1.0. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to initialize the composition with. </td></tr>
<tr><td class="paramname">fractions</td><td>The fractions (mass or number) corresponding to the symbols. </td></tr>
<tr><td class="paramname">massFracMode</td><td>True if <code>fractions</code> are mass fractions, false if they are number fractions. [Default: true] </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number of symbols and fractions do not match, or if the fractions do not sum to ~1.0. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if any symbol is invalid. </td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>The composition is immediately finalized. </dd></dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line">std::vector&lt;double&gt; mass_fractions = {0.1119, 0.8881};</div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp(symbols, mass_fractions); <span class="comment">// Finalized on construction</span></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00203">203</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a21369a80378d4c90438a34f0e4a275ca" name="a21369a80378d4c90438a34f0e4a275ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21369a80378d4c90438a34f0e4a275ca">&#9670;&#160;</a></span>Composition() <span class="overload">[5/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>composition</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from another <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">composition</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to copy. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00234">234</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab1701644ff1c83c220dc04eb58d1621b" name="ab1701644ff1c83c220dc04eb58d1621b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1701644ff1c83c220dc04eb58d1621b">&#9670;&#160;</a></span>begin() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::begin </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the beginning of the composition map. </p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the beginning. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00864">864</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="adf41a833e8b704daf4f581fca5c8cb9b" name="adf41a833e8b704daf4f581fca5c8cb9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf41a833e8b704daf4f581fca5c8cb9b">&#9670;&#160;</a></span>begin() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::begin </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a const iterator to the beginning of the composition map. </p>
<dl class="section return"><dt>Returns</dt><dd>A const iterator to the beginning. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00872">872</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a7efe2cd3a69b743bf2086941b6dfd965" name="a7efe2cd3a69b743bf2086941b6dfd965"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7efe2cd3a69b743bf2086941b6dfd965">&#9670;&#160;</a></span>contains()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::contains </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>isotope</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a given isotope is present in the composition. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">isotope</td><td>The isotope to check for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the isotope is in the composition, false otherwise. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a10778c866d515826cb1ba1d9e88f7d8f">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l01038">1038</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="adeaf6f1213e78cb1fe8a8317f0a8adc2" name="adeaf6f1213e78cb1fe8a8317f0a8adc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adeaf6f1213e78cb1fe8a8317f0a8adc2">&#9670;&#160;</a></span>end() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::end </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the end of the composition map. </p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the end. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00880">880</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aed2f5676f8f742199f01e4d1e9664bdd" name="aed2f5676f8f742199f01e4d1e9664bdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed2f5676f8f742199f01e4d1e9664bdd">&#9670;&#160;</a></span>end() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::end </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a const iterator to the end of the composition map. </p>
<dl class="section return"><dt>Returns</dt><dd>A const iterator to the end. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00888">888</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a72d063a74a9d2197065884a2cea57a14" name="a72d063a74a9d2197065884a2cea57a14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72d063a74a9d2197065884a2cea57a14">&#9670;&#160;</a></span>finalize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::finalize </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>norm</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finalizes the composition, making it ready for querying. </p>
<p>This method checks if the sum of all fractions (mass or number) is approximately 1.0. It also computes global properties like mean particle mass. This <b>must</b> be called before any <code>get...</code> method can be used. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">norm</td><td>If true, the composition will be normalized to sum to 1 before validation. [Default: false] </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the composition is valid and successfully finalized, false otherwise. </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>If successful, <code>m_finalized</code> is true and global properties are computed. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00445">445</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a869dbae3db9d09c57b2df56a813a55fb" name="a869dbae3db9d09c57b2df56a813a55fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a869dbae3db9d09c57b2df56a813a55fb">&#9670;&#160;</a></span>finalizeMassFracMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::finalizeMassFracMode </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>norm</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finalizes the composition in mass fraction mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">norm</td><td>If true, the composition will be normalized to sum to 1. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the composition is successfully finalized, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00453">453</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a461ab4e9cb5975cf865db5f16f03ddfe" name="a461ab4e9cb5975cf865db5f16f03ddfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a461ab4e9cb5975cf865db5f16f03ddfe">&#9670;&#160;</a></span>finalizeNumberFracMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::finalizeNumberFracMode </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>norm</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finalizes the composition in number fraction mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">norm</td><td>If true, the composition will be normalized to sum to 1. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the composition is successfully finalized, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00489">489</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ac75dbc8377556c835455991c7c7fe206" name="ac75dbc8377556c835455991c7c7fe206"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac75dbc8377556c835455991c7c7fe206">&#9670;&#160;</a></span>getCanonicalComposition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html">CanonicalComposition</a> fourdst::composition::Composition::getCanonicalComposition </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>harsh</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the current canonical composition (X, Y, Z). </p>
<p>Calculates the total mass fractions for H, He, and metals. </p><dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">harsh</td><td>If true, this will throw an error if <code>1 - (X + Y)</code> is not equal to the directly summed <code>Z</code> (within a tolerance). If false, it will only log a warning. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The <code><a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html" title="Represents the canonical (X, Y, Z) composition of stellar material.">CanonicalComposition</a></code> struct. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname">std::runtime_error</td><td>if <code>harsh</code> is true and the canonical composition is not self-consistent. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00785">785</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a1138c86f7ccd39594601c2ec63ad89e9" name="a1138c86f7ccd39594601c2ec63ad89e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1138c86f7ccd39594601c2ec63ad89e9">&#9670;&#160;</a></span>getComposition() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::pair&lt; std::unordered_map&lt; std::string, <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a> &gt;, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt; fourdst::composition::Composition::getComposition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets all composition entries and the global composition data. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>A pair containing an unordered map of all CompositionEntries and the <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html" title="Represents global properties of a finalized composition.">GlobalComposition</a>. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00682">682</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="afe5f1086027044c84ff35a366b2e8e2d" name="afe5f1086027044c84ff35a366b2e8e2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe5f1086027044c84ff35a366b2e8e2d">&#9670;&#160;</a></span>getComposition() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::pair&lt; <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a>, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt; fourdst::composition::Composition::getComposition </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the composition entry and global composition data for a given species. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to get the composition for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair containing the <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html" title="Represents a single entry (an isotope) within a composition.">CompositionEntry</a> and <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html" title="Represents global properties of a finalized composition.">GlobalComposition</a> for the given species. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the species is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00676">676</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a092d3536b04167ea2e6e3a3b1446c377" name="a092d3536b04167ea2e6e3a3b1446c377"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a092d3536b04167ea2e6e3a3b1446c377">&#9670;&#160;</a></span>getComposition() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::pair&lt; <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a>, <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html">GlobalComposition</a> &gt; fourdst::composition::Composition::getComposition </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the composition entry and global composition data for a given symbol. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the composition for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pair containing the <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html" title="Represents a single entry (an isotope) within a composition.">CompositionEntry</a> and <a class="el" href="structfourdst_1_1composition_1_1_global_composition.html" title="Represents global properties of a finalized composition.">GlobalComposition</a> for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00662">662</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a62dcfcf8f824d6af7903a9a9c3d5721e" name="a62dcfcf8f824d6af7903a9a9c3d5721e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62dcfcf8f824d6af7903a9a9c3d5721e">&#9670;&#160;</a></span>getElectronAbundance()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getElectronAbundance </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the electron abundance of the composition. </p>
<p>Ye is defined as the sum over all species of (Z_i * X_i / A_i), where Z_i is the atomic number, X_i is the mass fraction, and A_i is the atomic mass of species i. </p><dl class="section return"><dt>Returns</dt><dd>Ye (electron abundance). </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a25e0bfc7ef1861be6b80bc67bbed096f">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00716">716</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="aae07019ab6e02394e6ea353e0b98a417" name="aae07019ab6e02394e6ea353e0b98a417"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae07019ab6e02394e6ea353e0b98a417">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unordered_map&lt; std::string, double &gt; fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fractions of all species in the composition. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An unordered map of symbols to their mass fractions. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a9f45d416a557c77f71d6a0fccd405543">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00601">601</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="aeae9d6d3f742cd8b59b58abcb228a44d" name="aeae9d6d3f742cd8b59b58abcb228a44d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeae9d6d3f742cd8b59b58abcb228a44d">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fraction for a given isotope. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotope to get the mass fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mass fraction for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a401e8298ed93b7963624e8a17eb17b55">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00595">595</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae5d8d21632fca2b35b0898f2b205cd10" name="ae5d8d21632fca2b35b0898f2b205cd10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5d8d21632fca2b35b0898f2b205cd10">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fraction for a given symbol. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the mass fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mass fraction for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ae0044d30efddccacc9fe7c8e58003066">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00568">568</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a85169b763138ab72047e43e07af978fb" name="a85169b763138ab72047e43e07af978fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85169b763138ab72047e43e07af978fb">&#9670;&#160;</a></span>getMassFractionVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getMassFractionVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the mass fraction stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of mass fractions sorted by species mass (lightest to heaviest). </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a7e4ec98a256dbfd42d194fb4318d869a">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00840">840</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="af7dd8f7d69727acfacf1bf58c4083a27" name="af7dd8f7d69727acfacf1bf58c4083a27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7dd8f7d69727acfacf1bf58c4083a27">&#9670;&#160;</a></span>getMeanAtomicNumber()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMeanAtomicNumber </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the mean atomic number of the composition. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Mean atomic number &lt;Z&gt;. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ac2736dfc4a2fc0e94b875585f21e6cc4">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00698">698</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a796386824d1358527fed7c6b537935d8" name="a796386824d1358527fed7c6b537935d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a796386824d1358527fed7c6b537935d8">&#9670;&#160;</a></span>getMeanParticleMass()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMeanParticleMass </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the mean particle mass of the composition. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Mean particle mass in atomic mass units (g/mol). </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ac52886e3e6b2c7d0f79338d9e872cf3a">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00690">690</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a28c70279d36826e0e1026da3fa892ffc" name="a28c70279d36826e0e1026da3fa892ffc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28c70279d36826e0e1026da3fa892ffc">&#9670;&#160;</a></span>getMolarAbundance() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMolarAbundance </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the molar abundance for a given isotope. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotope to get the molar abundance for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The molar abundance for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a4cfc9e37370caae275c0f801b700e37b">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00656">656</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="add67a92d73e3a57a2bbdb52bc9ca3bfe" name="add67a92d73e3a57a2bbdb52bc9ca3bfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add67a92d73e3a57a2bbdb52bc9ca3bfe">&#9670;&#160;</a></span>getMolarAbundance() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the molar abundance (X_i / A_i) for a given symbol. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the molar abundance for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The molar abundance for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a71fb459bf4375af2fe33c8a7c0747ce0">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00641">641</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="abed665c07c42b40682da453576621399" name="abed665c07c42b40682da453576621399"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abed665c07c42b40682da453576621399">&#9670;&#160;</a></span>getMolarAbundanceVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getMolarAbundanceVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the molar abundances stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of molar abundances sorted by species mass (lightest to heaviest). </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a266ce894ebf533a62f63ad246fa21d96">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00891">891</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae46fb8c3020dadd69080a7acd2054ea1" name="ae46fb8c3020dadd69080a7acd2054ea1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae46fb8c3020dadd69080a7acd2054ea1">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unordered_map&lt; std::string, double &gt; fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fractions of all species in the composition. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>An unordered map of symbols to their number fractions. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ac1f2f30cdb2d1b9db76512c25c25618c">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00633">633</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a178d7393ee8b5d496925dcd901c03d23" name="a178d7393ee8b5d496925dcd901c03d23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a178d7393ee8b5d496925dcd901c03d23">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fraction for a given isotope. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotope to get the number fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number fraction for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a27d1d91203adb736454aa9b9936fc8c3">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00627">627</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a34f71d4d8f0297c576fd62fabd490305" name="a34f71d4d8f0297c576fd62fabd490305"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34f71d4d8f0297c576fd62fabd490305">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fraction for a given symbol. </p>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the number fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number fraction for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ae6026b1335230c6dfbd897ec8dfda295">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00610">610</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a49d2eba540f28324c6b7145a5b6cabfd" name="a49d2eba540f28324c6b7145a5b6cabfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49d2eba540f28324c6b7145a5b6cabfd">&#9670;&#160;</a></span>getNumberFractionVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getNumberFractionVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the number fractions stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of number fractions sorted by species mass (lightest to heaviest). </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a221dadad44f913b7f364508f5138303f">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00866">866</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="af61ebe73a8b5926eb23037bb078fa87a" name="af61ebe73a8b5926eb23037bb078fa87a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af61ebe73a8b5926eb23037bb078fa87a">&#9670;&#160;</a></span>getRegisteredSpecies()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; fourdst::composition::Composition::getRegisteredSpecies </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a set of all species that are registered in the composition. </p>
<dl class="section return"><dt>Returns</dt><dd>A set of <code><a class="el" href="structfourdst_1_1atomic_1_1_species.html" title="Represents an atomic species (isotope) with its fundamental physical properties.">atomic::Species</a></code> objects registered in the composition. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a6bf81edc0d21d34dbb8badc4ebdc0e17">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00313">313</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3f10f38878ba4be121d6d77a8b1f4d7a" name="a3f10f38878ba4be121d6d77a8b1f4d7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f10f38878ba4be121d6d77a8b1f4d7a">&#9670;&#160;</a></span>getRegisteredSymbols()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::set&lt; std::string &gt; fourdst::composition::Composition::getRegisteredSymbols </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the registered symbols. </p>
<dl class="section return"><dt>Returns</dt><dd>A set of registered symbols. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a4834d6b6caf5acced57989680e87be03">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00309">309</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae4f854ded38f5e6fcd157a74a57cbf0c" name="ae4f854ded38f5e6fcd157a74a57cbf0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4f854ded38f5e6fcd157a74a57cbf0c">&#9670;&#160;</a></span>getSpeciesAtIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> fourdst::composition::Composition::getSpeciesAtIndex </td>
<td>(</td>
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>index</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the species at a given index in the sorted vector representation. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>The index in the sorted vector representation for which to return the species. Must be in [0, N-1] where N is the number of registered species. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname">std::out_of_range</td><td>if the index is out of range. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The species at the given index in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#aaee3651c1672b2763181e966e4525ba6">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00993">993</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3d220b42fa06d7d3a43944ee2b8f6a5f" name="a3d220b42fa06d7d3a43944ee2b8f6a5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d220b42fa06d7d3a43944ee2b8f6a5f">&#9670;&#160;</a></span>getSpeciesIndex() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t fourdst::composition::Composition::getSpeciesIndex </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the index in the sorted vector representation for a given symbol </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd>
<dd>
symbol must be registered in the composition </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>the species to look up the index for. Note that this is the index species data will be at if you were to call <a class="el" href="#abed665c07c42b40682da453576621399" title="Get a uniform vector representation of the molar abundances stored in the composition object sorted s...">getMolarAbundanceVector()</a>, <a class="el" href="#a85169b763138ab72047e43e07af978fb" title="Get a uniform vector representation of the mass fraction stored in the composition object sorted such...">getMassFractionVector()</a>, or <a class="el" href="#a49d2eba540f28324c6b7145a5b6cabfd" title="Get a uniform vector representation of the number fractions stored in the composition object sorted s...">getNumberFractionVector()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered in the composition </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the symbol in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ab41311a8c20a9556d087a604da735767">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00955">955</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a0d94f62402bb90b5d12679faeaa8c5d7" name="a0d94f62402bb90b5d12679faeaa8c5d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d94f62402bb90b5d12679faeaa8c5d7">&#9670;&#160;</a></span>getSpeciesIndex() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t fourdst::composition::Composition::getSpeciesIndex </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the index in the sorted vector representation for a given symbol </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized. </dd>
<dd>
symbol must be registered in the composition </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>the symbol to look up the index for. Note that this is the index species data will be at if you were to call <a class="el" href="#abed665c07c42b40682da453576621399" title="Get a uniform vector representation of the molar abundances stored in the composition object sorted s...">getMolarAbundanceVector()</a>, <a class="el" href="#a85169b763138ab72047e43e07af978fb" title="Get a uniform vector representation of the mass fraction stored in the composition object sorted such...">getMassFractionVector()</a>, or <a class="el" href="#a49d2eba540f28324c6b7145a5b6cabfd" title="Get a uniform vector representation of the number fractions stored in the composition object sorted s...">getNumberFractionVector()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered in the composition </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the symbol in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a1e5195debe590960aa064289733958ba">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00917">917</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a55dfadad6cf5fb249356edad1733a813" name="a55dfadad6cf5fb249356edad1733a813"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55dfadad6cf5fb249356edad1733a813">&#9670;&#160;</a></span>hasSpecies()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::hasSpecies </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a species is registered in the composition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to check. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the species is registered, false otherwise. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a7f66ab9ddc975b946f46f368f13eba1b">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l01029">1029</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ac01ae1967c266d8187bc6e104c8a0d19" name="ac01ae1967c266d8187bc6e104c8a0d19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac01ae1967c266d8187bc6e104c8a0d19">&#9670;&#160;</a></span>hasSymbol()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::hasSymbol </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a symbol is registered in the composition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to check. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the symbol is registered, false otherwise. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a26a3d396a4c435dc3c20553dc5bad7df">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l01023">1023</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="addf03ba8b988970d341884d487aa94d5" name="addf03ba8b988970d341884d487aa94d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addf03ba8b988970d341884d487aa94d5">&#9670;&#160;</a></span>isValidComposition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::isValidComposition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>fractions</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if the given fractions are valid (sum to ~1.0). </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fractions</td><td>The fractions to check. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the fractions are valid, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00334">334</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a8fdac26e6298008aaeaa5b15f7fe244f" name="a8fdac26e6298008aaeaa5b15f7fe244f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fdac26e6298008aaeaa5b15f7fe244f">&#9670;&#160;</a></span>isValidSymbol()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::isValidSymbol </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel static">static</span><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if the given symbol is valid by checking against the global species database. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to check. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the symbol is valid, false otherwise. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00321">321</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3aead72892606725a4149a5f65bd31ec" name="a3aead72892606725a4149a5f65bd31ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aead72892606725a4149a5f65bd31ec">&#9670;&#160;</a></span>mix()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> fourdst::composition::Composition::mix </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>other</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double</td> <td class="paramname"><span class="paramname"><em>fraction</em></span>&#160;) const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Mixes this composition with another to produce a new composition. </p>
<p>The mixing is performed linearly on the mass fractions. The formula for each species is: <code>new_X_i = fraction * this_X_i + (1 - fraction) * other_X_i</code>. The resulting composition is automatically finalized. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>The other composition to mix with. </td></tr>
<tr><td class="paramname">fraction</td><td>The mixing fraction. A value of 1.0 means the new composition is 100% <code>this</code>, 0.0 means 100% <code>other</code>. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new, finalized <code><a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a></code> object representing the mixture. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Both <code>this</code> and <code>other</code> compositions must be finalized. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if either composition is not finalized. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the fraction is not between 0 and 1. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00533">533</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a24a3bdeb8e8e55b54ecdee6dcb0d9561" name="a24a3bdeb8e8e55b54ecdee6dcb0d9561"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24a3bdeb8e8e55b54ecdee6dcb0d9561">&#9670;&#160;</a></span>operator+()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> fourdst::composition::Composition::operator+ </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>other</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Overloads the + operator to mix two compositions with a 50/50 fraction. </p>
<p>OVERLOADS.</p>
<p>This is a convenience operator that calls <code>mix(other, 0.5)</code>. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>The other composition to mix with. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new, mixed composition. </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>Both compositions must be finalized. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">See</td><td><code><a class="el" href="#a3aead72892606725a4149a5f65bd31ec" title="Mixes this composition with another to produce a new composition.">mix()</a></code> for exceptions. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l01054">1054</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a4ec1e23cfecef764cb831171fed62fc2" name="a4ec1e23cfecef764cb831171fed62fc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ec1e23cfecef764cb831171fed62fc2">&#9670;&#160;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp; fourdst::composition::Composition::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> const &amp;</td> <td class="paramname"><span class="paramname"><em>other</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to assign from. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to this <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00243">243</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a4ce00f73cc133bb1bac2b030b93ab480" name="a4ce00f73cc133bb1bac2b030b93ab480"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ce00f73cc133bb1bac2b030b93ab480">&#9670;&#160;</a></span>registerSpecies() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSpecies </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a new species by extracting its symbol. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to register. </td></tr>
<tr><td class="paramname">massFracMode</td><td>True for mass fraction mode, false for number fraction mode. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if the species' symbol is invalid. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the mode conflicts. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="species_8h.html">fourdst/composition/species.h</a>&quot;</span> <span class="comment">// Assuming species like H1 are defined here</span></div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a4ce00f73cc133bb1bac2b030b93ab480">registerSpecies</a>(<a class="code hl_variable" href="namespacefourdst_1_1atomic.html#a3f619cc8f8b2cd718a4082c6adb0de90">fourdst::atomic::species</a>.at(<span class="stringliteral">&quot;H-1&quot;</span>));</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a4ce00f73cc133bb1bac2b030b93ab480"><div class="ttname"><a href="#a4ce00f73cc133bb1bac2b030b93ab480">fourdst::composition::Composition::registerSpecies</a></div><div class="ttdeci">void registerSpecies(const fourdst::atomic::Species &amp;species, bool massFracMode=true)</div><div class="ttdoc">Registers a new species by extracting its symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00293">composition.cpp:293</a></div></div>
<div class="ttc" id="anamespacefourdst_1_1atomic_html_a3f619cc8f8b2cd718a4082c6adb0de90"><div class="ttname"><a href="namespacefourdst_1_1atomic.html#a3f619cc8f8b2cd718a4082c6adb0de90">fourdst::atomic::species</a></div><div class="ttdeci">static const std::unordered_map&lt; std::string, const Species &amp; &gt; species</div><div class="ttdoc">Map of species names to their corresponding Species objects.</div><div class="ttdef"><b>Definition</b> <a href="species_8h_source.html#l03579">species.h:3579</a></div></div>
<div class="ttc" id="aspecies_8h_html"><div class="ttname"><a href="species_8h.html">species.h</a></div></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00293">293</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a057f2bf2e86bcc3c649c0ddf18cf3826" name="a057f2bf2e86bcc3c649c0ddf18cf3826"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a057f2bf2e86bcc3c649c0ddf18cf3826">&#9670;&#160;</a></span>registerSpecies() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSpecies </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a vector of new species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The vector of species to register. </td></tr>
<tr><td class="paramname">massFracMode</td><td>True for mass fraction mode, false for number fraction mode. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if any species' symbol is invalid. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the mode conflicts. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="species_8h.html">fourdst/composition/species.h</a>&quot;</span></div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">std::vector&lt;fourdst::atomic::Species&gt; my_species = { ... };</div>
<div class="line">comp.<a class="code hl_function" href="#a4ce00f73cc133bb1bac2b030b93ab480">registerSpecies</a>(my_species, <span class="keyword">false</span>); <span class="comment">// Number fraction mode</span></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00300">300</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a1bc2e64f87c12befdc2bc767e7405661" name="a1bc2e64f87c12befdc2bc767e7405661"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bc2e64f87c12befdc2bc767e7405661">&#9670;&#160;</a></span>registerSymbol() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSymbol </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a new symbol for inclusion in the composition. </p>
<p>A symbol must be registered before its abundance can be set. The first registration sets the mode (mass/number fraction) for the entire composition. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to register (e.g., "Fe-56"). </td></tr>
<tr><td class="paramname">massFracMode</td><td>True for mass fraction mode, false for number fraction mode. This is only effective for the first symbol registered. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if attempting to register with a mode that conflicts with the existing mode. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>); <span class="comment">// Now in mass fraction mode</span></div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;He-4&quot;</span>); <span class="comment">// Must also be mass fraction mode</span></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00255">255</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a9b422156600823276a9606bfa07ad4db" name="a9b422156600823276a9606bfa07ad4db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b422156600823276a9606bfa07ad4db">&#9670;&#160;</a></span>registerSymbol() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSymbol </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers multiple new symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
<tr><td class="paramname">massFracMode</td><td>True for mass fraction mode, false for number fraction mode. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_symbol_error.html" title="Exception thrown when a symbol used in a composition is invalid.">exceptions::InvalidSymbolError</a></td><td>if any symbol is invalid. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the mode conflicts with an already set mode. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(symbols);</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00284">284</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a0af981ed1074b26c237cf6cf35f82c9e" name="a0af981ed1074b26c237cf6cf35f82c9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0af981ed1074b26c237cf6cf35f82c9e">&#9670;&#160;</a></span>setCompositionMode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setCompositionMode </td>
<td>(</td>
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>massFracMode</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the composition mode (mass fraction vs. number fraction). </p>
<p>This function converts all entries in the composition to the specified mode. </p><dl class="section pre"><dt>Precondition</dt><dd>The composition must be finalized before the mode can be switched. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">massFracMode</td><td>True to switch to mass fraction mode, false for number fraction mode. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_not_finalized_error.html" title="Exception thrown when an operation is attempted on a composition that has not been finalized.">exceptions::CompositionNotFinalizedError</a></td><td>if the composition is not finalized. </td></tr>
<tr><td class="paramname">std::runtime_error</td><td>if the conversion fails for an unknown reason. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00762">762</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="aa6c94269a5d16349c98860f3015b734a" name="aa6c94269a5d16349c98860f3015b734a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6c94269a5d16349c98860f3015b734a">&#9670;&#160;</a></span>setMassFraction() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::setMassFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>mass_fraction</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the mass fraction for a given species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to set the mass fraction for. </td></tr>
<tr><td class="paramname">mass_fraction</td><td>The mass fraction to set. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous mass fraction that was set for the species. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the species is not registered. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the composition is in number fraction mode. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the mass fraction is not between 0 and 1. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00411">411</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a493224656aa3ade68389250720ef09af" name="a493224656aa3ade68389250720ef09af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a493224656aa3ade68389250720ef09af">&#9670;&#160;</a></span>setMassFraction() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::setMassFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>mass_fraction</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the mass fraction for a given symbol. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to set the mass fraction for. </td></tr>
<tr><td class="paramname">mass_fraction</td><td>The mass fraction to set (must be in [0, 1]). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous mass fraction that was set for the symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the composition is in number fraction mode. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the mass fraction is not between 0 and 1. </td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>The composition is marked as not finalized. </dd></dl>
<dl class="section user"><dt>Usage Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a1bc2e64f87c12befdc2bc767e7405661">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a493224656aa3ade68389250720ef09af">setMassFraction</a>(<span class="stringliteral">&quot;H-1&quot;</span>, 0.7);</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00343">343</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="abbae020d46c74708a7974c1ca755bb62" name="abbae020d46c74708a7974c1ca755bb62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbae020d46c74708a7974c1ca755bb62">&#9670;&#160;</a></span>setMassFraction() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::setMassFraction </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>mass_fractions</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the mass fraction for multiple species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The vector of species to set the mass fractions for. </td></tr>
<tr><td class="paramname">mass_fractions</td><td>The vector of mass fractions corresponding to the species. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector of the previous mass fractions that were set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">See</td><td><code>setMassFraction(const std::vector&lt;std::string&gt;&amp;, const std::vector&lt;double&gt;&amp;)</code> for exceptions. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00418">418</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a66ce1012c12b0a83629eb09d451b68e3" name="a66ce1012c12b0a83629eb09d451b68e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66ce1012c12b0a83629eb09d451b68e3">&#9670;&#160;</a></span>setMassFraction() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::setMassFraction </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>mass_fractions</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the mass fraction for multiple symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to set the mass fractions for. </td></tr>
<tr><td class="paramname">mass_fractions</td><td>The mass fractions corresponding to the symbols. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector of the previous mass fractions that were set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if symbol and fraction counts differ. </td></tr>
<tr><td class="paramname">See</td><td><code>setMassFraction(const std::string&amp;, const double&amp;)</code> for other exceptions. </td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>The composition is marked as not finalized. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00362">362</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="aaa822bb48a948d101fef759ffbefe31b" name="aaa822bb48a948d101fef759ffbefe31b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa822bb48a948d101fef759ffbefe31b">&#9670;&#160;</a></span>setNumberFraction() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::setNumberFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>number_fraction</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number fraction for a given species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to set the number fraction for. </td></tr>
<tr><td class="paramname">number_fraction</td><td>The number fraction to set for the species. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous number fraction that was set for the species. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the species is not registered. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the composition is in mass fraction mode. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number fraction is not between 0 and 1. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00428">428</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a7d4d748f3ee25e68751fb143717ed080" name="a7d4d748f3ee25e68751fb143717ed080"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d4d748f3ee25e68751fb143717ed080">&#9670;&#160;</a></span>setNumberFraction() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::setNumberFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>number_fraction</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number fraction for a given symbol. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to set the number fraction for. </td></tr>
<tr><td class="paramname">number_fraction</td><td>The number fraction to set (must be in [0, 1]). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The previous number fraction that was set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_composition_mode_error.html" title="Exception thrown due to a conflict in composition modes at the entry level.">exceptions::CompositionModeError</a></td><td>if the composition is in mass fraction mode. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number fraction is not between 0 and 1. </td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>The composition is marked as not finalized. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00374">374</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="adc068778a1ef33cad67f5ca028b49bb8" name="adc068778a1ef33cad67f5ca028b49bb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc068778a1ef33cad67f5ca028b49bb8">&#9670;&#160;</a></span>setNumberFraction() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::setNumberFraction </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">fourdst::atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>number_fractions</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number fraction for multiple species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The vector of species to set the number fractions for. </td></tr>
<tr><td class="paramname">number_fractions</td><td>The vector of number fractions corresponding to the species. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The vector of the previous number fractions that were set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">See</td><td><code>setNumberFraction(const std::vector&lt;std::string&gt;&amp;, const std::vector&lt;double&gt;&amp;)</code> for exceptions. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00435">435</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a48014a0a725ebd91ad1193c063b5b26f" name="a48014a0a725ebd91ad1193c063b5b26f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48014a0a725ebd91ad1193c063b5b26f">&#9670;&#160;</a></span>setNumberFraction() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::setNumberFraction </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>number_fractions</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number fraction for multiple symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to set the number fractions for. </td></tr>
<tr><td class="paramname">number_fractions</td><td>The number fractions corresponding to the symbols. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A vector of the previous number fractions that were set. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if symbol and fraction counts differ. </td></tr>
<tr><td class="paramname">See</td><td><code>setNumberFraction(const std::string&amp;, const double&amp;)</code> for other exceptions. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00396">396</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a17635cd21744c7cf86cb1eb75152c816" name="a17635cd21744c7cf86cb1eb75152c816"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17635cd21744c7cf86cb1eb75152c816">&#9670;&#160;</a></span>subset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> fourdst::composition::Composition::subset </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>method</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;norm&quot;</span>&#160;) const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object containing a subset of species from this one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to include in the subset. </td></tr>
<tr><td class="paramname">method</td><td>The method for handling the abundances of the new subset. Can be "norm" (normalize abundances to sum to 1) or "none" (keep original abundances). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new <code><a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a></code> object containing the subset. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any requested symbol is not in the original composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_mixing_mode.html" title="Exception thrown for an invalid or unsupported mixing mode.">exceptions::InvalidMixingMode</a></td><td>if an invalid method is provided. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_failed_to_finalize_composition_error.html" title="Exception thrown when the finalization process of a composition fails.">exceptions::FailedToFinalizeCompositionError</a></td><td>if normalization fails. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00734">734</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a86982685c34db4a8f079ddafc25c594e" name="a86982685c34db4a8f079ddafc25c594e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86982685c34db4a8f079ddafc25c594e">&#9670;&#160;</a></span>validateComposition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::validateComposition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>fractions</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Validates the given fractions, throwing an exception on failure. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fractions</td><td>The fractions to validate. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the fractions are invalid. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00327">327</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Symbol Documentation</h2>
<a id="a36c2525d21cd932065bb2bb30bc57fb4" name="a36c2525d21cd932065bb2bb30bc57fb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36c2525d21cd932065bb2bb30bc57fb4">&#9670;&#160;</a></span>operator&lt;&lt;</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::ostream &amp; operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype">std::ostream &amp;</td> <td class="paramname"><span class="paramname"><em>os</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>composition</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel friend">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Overloaded output stream operator for <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>The output stream. </td></tr>
<tr><td class="paramname">composition</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to output. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The output stream. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l01078">1078</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a02cd9d9608da082a200fdfa86d14bf5d" name="a02cd9d9608da082a200fdfa86d14bf5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02cd9d9608da082a200fdfa86d14bf5d">&#9670;&#160;</a></span>m_cache</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a> fourdst::composition::Composition::m_cache</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel mutable">mutable</span><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Cache for computed properties to avoid redundant calculations. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00297">297</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aa7f2753b10e85ae3bbf0c3d600a973db" name="aa7f2753b10e85ae3bbf0c3d600a973db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7f2753b10e85ae3bbf0c3d600a973db">&#9670;&#160;</a></span>m_compositions</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unordered_map&lt;std::string, <a class="el" href="structfourdst_1_1composition_1_1_composition_entry.html">CompositionEntry</a>&gt; fourdst::composition::Composition::m_compositions</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The compositions. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00295">295</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a1f96b2c567364368ea5ee6f0826f3091" name="a1f96b2c567364368ea5ee6f0826f3091"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f96b2c567364368ea5ee6f0826f3091">&#9670;&#160;</a></span>m_config</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">config::Config&amp; fourdst::composition::Composition::m_config = config::Config::getInstance()</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00285">285</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aa00cbc0933d8a22bb900ac21a338e5ac" name="aa00cbc0933d8a22bb900ac21a338e5ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa00cbc0933d8a22bb900ac21a338e5ac">&#9670;&#160;</a></span>m_finalized</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::m_finalized = false</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>True if the composition is finalized. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00289">289</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="ab6c66f35e1fb05dd24aacaf90e115c5e" name="ab6c66f35e1fb05dd24aacaf90e115c5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6c66f35e1fb05dd24aacaf90e115c5e">&#9670;&#160;</a></span>m_logger</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">quill::Logger* fourdst::composition::Composition::m_logger = m_logManager.getLogger(&quot;log&quot;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00287">287</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a40b2128948f01630cd2968488b450ce5" name="a40b2128948f01630cd2968488b450ce5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40b2128948f01630cd2968488b450ce5">&#9670;&#160;</a></span>m_logManager</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">logging::LogManager&amp; fourdst::composition::Composition::m_logManager = logging::LogManager::getInstance()</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00286">286</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a671f1ee8be00f4ff8c1d94fabb382380" name="a671f1ee8be00f4ff8c1d94fabb382380"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a671f1ee8be00f4ff8c1d94fabb382380">&#9670;&#160;</a></span>m_massFracMode</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::m_massFracMode = true</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>True if mass fraction mode, false if number fraction mode. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00292">292</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a4a36c8d22ce61023e7bea1d9417577d4" name="a4a36c8d22ce61023e7bea1d9417577d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a36c8d22ce61023e7bea1d9417577d4">&#9670;&#160;</a></span>m_meanParticleMass</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::m_meanParticleMass = 0.0</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The mean particle mass of the composition (\sum_{i} \frac{n_i}{m_i}. where n_i is the number fraction of the ith species and m_i is the mass of the ith species). </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00291">291</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a39bfcb7d81d723cbd9d021abd533b4d6" name="a39bfcb7d81d723cbd9d021abd533b4d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39bfcb7d81d723cbd9d021abd533b4d6">&#9670;&#160;</a></span>m_registeredSymbols</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::set&lt;std::string&gt; fourdst::composition::Composition::m_registeredSymbols</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The registered symbols. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00294">294</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="addae4484da7d5072ab66a721dbe04ced" name="addae4484da7d5072ab66a721dbe04ced"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addae4484da7d5072ab66a721dbe04ced">&#9670;&#160;</a></span>m_specificNumberDensity</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::m_specificNumberDensity = 0.0</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The specific number density of the composition (\sum_{i} X_i m_i. Where X_i is the number fraction of the ith species and m_i is the mass of the ith species). </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00290">290</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/composition/include/fourdst/composition/<a class="el" href="composition_8h_source.html">composition.h</a></li>
<li>src/composition/lib/<a class="el" href="composition_8cpp_source.html">composition.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacefourdst.html">fourdst</a></li><li class="navelem"><a class="el" href="namespacefourdst_1_1composition.html">composition</a></li><li class="navelem"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>