2025-07-01 11:40:58 -04:00
<!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 > GridFire: gridfire::utils Namespace 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" >
2025-11-04 14:04:26 -05:00
< div id = "projectname" > GridFire< span id = "projectnumber" >   v0.7.0-alpha< / span >
2025-07-01 11:40:58 -04:00
< / div >
< div id = "projectbrief" > General Purpose Nuclear Network< / 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& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
< / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& 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& 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& dn=expat.txt MIT */
$(function(){initNavTree('namespacegridfire_1_1utils.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" >
2025-11-04 14:04:26 -05:00
< a href = "#namespaces" > Namespaces< / a > |
2025-10-08 11:17:09 -04:00
< a href = "#nested-classes" > Classes< / a > |
2025-07-01 11:40:58 -04:00
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" > < div class = "title" > gridfire::utils Namespace Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< table class = "memberdecls" >
2025-11-04 14:04:26 -05:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "namespaces" name = "namespaces" > < / a >
Namespaces< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacegridfire_1_1utils_1_1hashing.html" > hashing< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
2025-10-08 11:17:09 -04:00
< 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" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classgridfire_1_1utils_1_1_column.html" > Column< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > class   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classgridfire_1_1utils_1_1_column_base.html" > ColumnBase< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
2025-07-01 11:40:58 -04:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
2025-11-04 14:04:26 -05:00
< tr class = "memitem:a30bc2aa491806a4ac2a9039e267db282" id = "r_a30bc2aa491806a4ac2a9039e267db282" > < td class = "memItemLeft" align = "right" valign = "top" > double  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a30bc2aa491806a4ac2a9039e267db282" > massFractionFromMolarAbundanceAndComposition< / a > (const fourdst::composition::Composition & composition, const fourdst::atomic::Species & species, const double Yi)< / td > < / tr >
< tr class = "separator:a30bc2aa491806a4ac2a9039e267db282" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a3e0dbd737724f2ead65046b07639c931" id = "r_a3e0dbd737724f2ead65046b07639c931" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< double >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a3e0dbd737724f2ead65046b07639c931" > massFractionFromMolarAbundanceAndMolarMass< / a > (const std::vector< double > & molarAbundances, const std::vector< double > & molarMasses) noexcept< / td > < / tr >
< tr class = "memdesc:a3e0dbd737724f2ead65046b07639c931" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Convert a vector of molar abundances into a vector of mass fractions. < br / > < / td > < / tr >
< tr class = "separator:a3e0dbd737724f2ead65046b07639c931" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1772aeeec2509ca45bc733b7615a7778" id = "r_a1772aeeec2509ca45bc733b7615a7778" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< double >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a1772aeeec2509ca45bc733b7615a7778" > molarMassVectorFromComposition< / a > (const fourdst::composition::Composition & composition)< / td > < / tr >
< tr class = "separator:a1772aeeec2509ca45bc733b7615a7778" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0dc0b71ddae108a47887458c2f3f780e" id = "r_a0dc0b71ddae108a47887458c2f3f780e" > < td class = "memItemLeft" align = "right" valign = "top" > uint_fast32_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a0dc0b71ddae108a47887458c2f3f780e" > hash_atomic< / a > (const uint16_t a, const uint8_t z) noexcept< / td > < / tr >
< tr class = "memdesc:a0dc0b71ddae108a47887458c2f3f780e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Generate a unique hash for an isotope given its mass number (A) and atomic number (Z). < br / > < / td > < / tr >
< tr class = "separator:a0dc0b71ddae108a47887458c2f3f780e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a011ac3184b4fcf21322868b1aaa4d2d1" id = "r_a011ac3184b4fcf21322868b1aaa4d2d1" > < td class = "memItemLeft" align = "right" valign = "top" > std::uint64_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a011ac3184b4fcf21322868b1aaa4d2d1" > hash_reaction< / a > (const < a class = "el" href = "classgridfire_1_1reaction_1_1_reaction.html" > reaction::Reaction< / a > & reaction) noexcept< / td > < / tr >
< tr class = "separator:a011ac3184b4fcf21322868b1aaa4d2d1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2025-10-08 11:17:09 -04:00
< tr class = "memitem:a05fda32d3fc4ab10060b8c4c251c2f3d" id = "r_a05fda32d3fc4ab10060b8c4c251c2f3d" > < td class = "memItemLeft" align = "right" valign = "top" > std::string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a05fda32d3fc4ab10060b8c4c251c2f3d" > formatNuclearTimescaleLogString< / a > (const < a class = "el" href = "classgridfire_1_1_dynamic_engine.html" > DynamicEngine< / a > & engine, const fourdst::composition::Composition & composition, double T9, double rho)< / td > < / tr >
< tr class = "memdesc:a05fda32d3fc4ab10060b8c4c251c2f3d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Formats a map of nuclear species timescales into a human-readable string. < br / > < / td > < / tr >
< tr class = "separator:a05fda32d3fc4ab10060b8c4c251c2f3d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6451ba6762273b91a8281043cfaa5d2a" id = "r_a6451ba6762273b91a8281043cfaa5d2a" > < td class = "memItemLeft" align = "right" valign = "top" > std::string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "#a6451ba6762273b91a8281043cfaa5d2a" > format_table< / a > (const std::string & tableName, const std::vector< std::unique_ptr< < a class = "el" href = "classgridfire_1_1utils_1_1_column_base.html" > ColumnBase< / a > > > & columns)< / td > < / tr >
< tr class = "separator:a6451ba6762273b91a8281043cfaa5d2a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2025-07-01 11:40:58 -04:00
< / table >
< h2 class = "groupheader" > Function Documentation< / h2 >
2025-10-08 11:17:09 -04:00
< a id = "a6451ba6762273b91a8281043cfaa5d2a" name = "a6451ba6762273b91a8281043cfaa5d2a" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a6451ba6762273b91a8281043cfaa5d2a" > ◆   < / a > < / span > format_table()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > std::string gridfire::utils::format_table < / td >
< td > (< / td >
< td class = "paramtype" > const std::string & < / td > < td class = "paramname" > < span class = "paramname" > < em > tableName< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const std::vector< std::unique_ptr< < a class = "el" href = "classgridfire_1_1utils_1_1_column_base.html" > ColumnBase< / a > > > & < / td > < td class = "paramname" > < span class = "paramname" > < em > columns< / em > < / span >   )< / 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" >
< / div >
< / div >
< a id = "a05fda32d3fc4ab10060b8c4c251c2f3d" name = "a05fda32d3fc4ab10060b8c4c251c2f3d" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a05fda32d3fc4ab10060b8c4c251c2f3d" > ◆   < / a > < / span > formatNuclearTimescaleLogString()< / h2 >
2025-07-01 11:40:58 -04:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > std::string gridfire::utils::formatNuclearTimescaleLogString < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "classgridfire_1_1_dynamic_engine.html" > DynamicEngine< / a > & < / td > < td class = "paramname" > < span class = "paramname" > < em > engine< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2025-10-08 11:17:09 -04:00
< td class = "paramtype" > const fourdst::composition::Composition & < / td > < td class = "paramname" > < span class = "paramname" > < em > composition< / em > < / span > , < / td >
2025-07-01 11:40:58 -04:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2025-10-08 11:17:09 -04:00
< td class = "paramtype" > double< / td > < td class = "paramname" > < span class = "paramname" > < em > T9< / em > < / span > , < / td >
2025-07-01 11:40:58 -04:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
2025-10-08 11:17:09 -04:00
< td class = "paramtype" > double< / td > < td class = "paramname" > < span class = "paramname" > < em > rho< / em > < / span >   )< / td >
2025-07-01 11:40:58 -04:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2025-07-01 15:06:22 -04:00
< p > Formats a map of nuclear species timescales into a human-readable string. < / p >
< p > This function takes a reaction network engine and the current plasma conditions to calculate the characteristic timescales for each species. It then formats this information into a neatly aligned ASCII table, which is suitable for logging or printing to the console.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > engine< / td > < td > A constant reference to a < code > < a class = "el" href = "classgridfire_1_1_dynamic_engine.html" title = "Abstract class for engines supporting Jacobian and stoichiometry operations." > DynamicEngine< / a > < / code > object, used to calculate the species timescales. < / td > < / tr >
2025-11-04 14:04:26 -05:00
< tr > < td class = "paramname" > composition< / td > < td > The current composition of the plasma < / td > < / tr >
2025-07-01 15:06:22 -04:00
< tr > < td class = "paramname" > T9< / td > < td > The temperature in units of 10^9 K. < / td > < / tr >
< tr > < td class = "paramname" > rho< / td > < td > The plasma density in g/cm^3. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A std::string containing the formatted table of species and their timescales.< / dd > < / dl >
< p > < b > Pre-conditions< / b > < / p > < ul >
< li > The < code > engine< / code > must be in a valid state.< / li >
< li > The size of the < code > Y< / code > vector must be consistent with the number of species expected by the < code > engine< / code > .< / li >
< / ul >
< p > < b > Algorithm< / b > < / p > < ol type = "1" >
< li > Calls the < code > getSpeciesTimescales< / code > method on the provided < code > engine< / code > to get the timescale for each species under the given conditions.< / li >
< li > Determines the maximum length of the species names to dynamically set the width of the "Species" column for proper alignment.< / li >
< li > Uses a < code > std::ostringstream< / code > to build the output string.< / li >
< li > Constructs a header for the table with titles "Species" and "Timescale (s)".< / li >
< li > Iterates through the map of timescales, adding a row to the table for each species.< / li >
< li > Timescales are formatted in scientific notation with 3 digits of precision.< / li >
< li > Special handling is included to print "inf" for infinite timescales.< / li >
< li > The final string, including header and footer lines, is returned.< / li >
< / ol >
< p > < b > Usage< / b > < / p > < div class = "fragment" > < div class = "line" > < span class = "comment" > // Assume ' my_engine' is a valid DynamicEngine object and Y, T9, rho are initialized.< / span > < / div >
2025-10-08 11:17:09 -04:00
< div class = "line" > std::string log_output = < a class = "code hl_function" href = "#a05fda32d3fc4ab10060b8c4c251c2f3d" > gridfire::utils::formatNuclearTimescaleLogString< / a > (my_engine, Y, T9, rho);< / div >
2025-07-01 15:06:22 -04:00
< div class = "line" > std::cout < < log_output;< / div >
< div class = "line" > < / div >
< div class = "line" > < span class = "comment" > // Example Output:< / span > < / div >
< div class = "line" > < span class = "comment" > // == Timescales (s) ==< / span > < / div >
< div class = "line" > < span class = "comment" > // Species Timescale (s)< / span > < / div >
< div class = "line" > < span class = "comment" > // ==========================< / span > < / div >
< div class = "line" > < span class = "comment" > // h1 1.234e+05< / span > < / div >
< div class = "line" > < span class = "comment" > // he4 inf< / span > < / div >
< div class = "line" > < span class = "comment" > // c12 8.765e-02< / span > < / div >
< div class = "line" > < span class = "comment" > // ==========================< / span > < / div >
2025-10-08 11:17:09 -04:00
< div class = "ttc" id = "anamespacegridfire_1_1utils_html_a05fda32d3fc4ab10060b8c4c251c2f3d" > < div class = "ttname" > < a href = "#a05fda32d3fc4ab10060b8c4c251c2f3d" > gridfire::utils::formatNuclearTimescaleLogString< / a > < / div > < div class = "ttdeci" > std::string formatNuclearTimescaleLogString(const DynamicEngine & engine, const fourdst::composition::Composition & composition, double T9, double rho)< / div > < div class = "ttdoc" > Formats a map of nuclear species timescales into a human-readable string.< / div > < div class = "ttdef" > < b > Definition< / b > logging.cpp:12< / div > < / div >
2025-07-01 15:06:22 -04:00
< / div > <!-- fragment -->
2025-11-04 14:04:26 -05:00
< / div >
< / div >
< a id = "a0dc0b71ddae108a47887458c2f3f780e" name = "a0dc0b71ddae108a47887458c2f3f780e" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0dc0b71ddae108a47887458c2f3f780e" > ◆   < / a > < / span > hash_atomic()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > uint_fast32_t gridfire::utils::hash_atomic < / td >
< td > (< / td >
< td class = "paramtype" > const uint16_t< / td > < td class = "paramname" > < span class = "paramname" > < em > a< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const uint8_t< / td > < td class = "paramname" > < span class = "paramname" > < em > z< / em > < / span >   )< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < span class = "mlabel noexcept" > noexcept< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Generate a unique hash for an isotope given its mass number (A) and atomic number (Z). < / p >
< p > This function combines the mass number and atomic number into a single 32-bit integer by shifting the mass number 8 bits to the left and OR'ing it with the atomic number. This ensures a unique representation for each isotope within physically possible ranges. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > a< / td > < td > The mass number (A) of the isotope. < / td > < / tr >
< tr > < td class = "paramname" > z< / td > < td > The atomic number (Z) of the isotope. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A unique 32-bit hash representing the isotope. This is computed as (A < < 8) | Z into an uint32_t. < / dd > < / dl >
< / div >
< / div >
< a id = "a011ac3184b4fcf21322868b1aaa4d2d1" name = "a011ac3184b4fcf21322868b1aaa4d2d1" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a011ac3184b4fcf21322868b1aaa4d2d1" > ◆   < / a > < / span > hash_reaction()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > std::uint64_t gridfire::utils::hash_reaction < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "classgridfire_1_1reaction_1_1_reaction.html" > reaction::Reaction< / a > & < / td > < td class = "paramname" > < span class = "paramname" > < em > reaction< / em > < / span > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < span class = "mlabel noexcept" > noexcept< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< / div >
< / div >
< a id = "a30bc2aa491806a4ac2a9039e267db282" name = "a30bc2aa491806a4ac2a9039e267db282" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a30bc2aa491806a4ac2a9039e267db282" > ◆   < / a > < / span > massFractionFromMolarAbundanceAndComposition()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > double gridfire::utils::massFractionFromMolarAbundanceAndComposition < / td >
< td > (< / td >
< td class = "paramtype" > const fourdst::composition::Composition & < / td > < td class = "paramname" > < span class = "paramname" > < em > composition< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const fourdst::atomic::Species & < / 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< / td > < td class = "paramname" > < span class = "paramname" > < em > Yi< / em > < / span >   )< / 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" >
< / div >
< / div >
< a id = "a3e0dbd737724f2ead65046b07639c931" name = "a3e0dbd737724f2ead65046b07639c931" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a3e0dbd737724f2ead65046b07639c931" > ◆   < / a > < / span > massFractionFromMolarAbundanceAndMolarMass()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< double > gridfire::utils::massFractionFromMolarAbundanceAndMolarMass < / td >
< td > (< / td >
< td class = "paramtype" > const std::vector< double > & < / td > < td class = "paramname" > < span class = "paramname" > < em > molarAbundances< / em > < / span > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const std::vector< double > & < / td > < td class = "paramname" > < span class = "paramname" > < em > molarMasses< / em > < / span >   )< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel inline" > inline< / span > < span class = "mlabel noexcept" > noexcept< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Convert a vector of molar abundances into a vector of mass fractions. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > molarAbundances< / td > < td > Vector of molar abundances < / td > < / tr >
< tr > < td class = "paramname" > molarMasses< / td > < td > Vector of molar masses< / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section note" > < dt > Note< / dt > < dd > The vectors molarAbundances and molarMasses must be parallel. This function does not provide any checks to ensure that the correct molar mass is being used with the correct molar abundance. < / dd > < / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A vector of molar masses such that each molar mass < 1 and the sum of all is = 1 < / dd > < / dl >
< / div >
< / div >
< a id = "a1772aeeec2509ca45bc733b7615a7778" name = "a1772aeeec2509ca45bc733b7615a7778" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1772aeeec2509ca45bc733b7615a7778" > ◆   < / a > < / span > molarMassVectorFromComposition()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< double > gridfire::utils::molarMassVectorFromComposition < / td >
< td > (< / td >
< td class = "paramtype" > const fourdst::composition::Composition & < / td > < td class = "paramname" > < span class = "paramname" > < em > composition< / 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" >
2025-07-01 11:40:58 -04:00
< / div >
< / div >
< / 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 = "namespacegridfire.html" > gridfire< / a > < / li > < li class = "navelem" > < a class = "el" href = "namespacegridfire_1_1utils.html" > utils< / 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 >