Files
SERiF/docs/html/index.html

437 lines
54 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>SERiF: 4DSSE: A 4D Stellar Structure and Evolution Code</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">SERiF<span id="projectnumber">&#160;0.0.1a</span>
</div>
<div id="projectbrief">3+1D Stellar Structure and Evolution</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('index.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><div class="header">
<div class="headertitle"><div class="title">4DSSE: A 4D Stellar Structure and Evolution Code </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="intro_sec"></a>
Introduction</h1>
<p>Welcome to the documentation for 4DSSE (4D Stellar Structure and Evolution), a new code designed for simulating stellar phenomena in three spatial dimensions plus time. This project is currently under active development.</p>
<p>The primary goal of 4DSSE is to provide a flexible and extensible framework for advanced stellar modeling, incorporating modern numerical techniques and physics modules.</p>
<h1><a class="anchor" id="build_sec"></a>
Building 4DSSE</h1>
<p>The project uses Meson as its build system. MFEM is a core dependency and will be automatically downloaded and built if not found.</p>
<p><b>Prerequisites:</b></p><ul>
<li>A C++ compiler (supporting C++17 or later)</li>
<li>Meson (Install via pip: <code>pip install meson</code>)</li>
<li>Python 3</li>
</ul>
<p><b>Build Steps:</b></p>
<ol type="1">
<li><b>Clone the repository (if you haven't already):</b> <code>bash git clone &lt;repository-url&gt; cd 4dsse </code></li>
<li><b>Using the <code>mk</code> script (recommended for ease of use):</b><ul>
<li>To build the project: <code>bash ./mk </code></li>
<li>To build without tests: <code>bash ./mk --noTest </code></li>
</ul>
</li>
<li><b>Using the <code>4DSSEConsole.sh</code> script:</b> This script provides a simple interface for building and debugging. <code>bash ./4DSSEConsole.sh </code> Follow the on-screen prompts.</li>
<li><b>Manual Meson build:</b><ul>
<li>Setup the build directory (e.g., <code>build</code>): <code>bash meson setup build </code></li>
<li>Compile the project: <code>bash meson compile -C build </code></li>
<li>To run tests (if built with tests enabled): <code>bash meson test -C build </code></li>
</ul>
</li>
</ol>
<p>The compiled executables and libraries will typically be found in the <code>build</code> directory.</p>
<h1><a class="anchor" id="usage_sec"></a>
High-Level Usage Examples</h1>
<p>Below are some high-level examples of how to use key components of 4DSSE.</p>
<h2><a class="anchor" id="usage_polysolver"></a>
Solving for a Polytrope</h2>
<p>The <code><a class="el" href="class_poly_solver.html" title="Solves the Lane-Emden equation for a polytropic star using a mixed finite element method.">PolySolver</a></code> class handles the setup and solution of the Lane-Emden equation for polytropic stellar models.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="poly_solver_8h.html">polySolver.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span> <span class="comment">// For global configuration</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="probe_8h.html">probe.h</a>&quot;</span> <span class="comment">// For logging</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="comment">// Initialize configuration and logging</span></div>
<div class="line"> Config::getInstance().loadConfig(<span class="stringliteral">&quot;path/to/your/config.yaml&quot;</span>);</div>
<div class="line"> <a class="code hl_function" href="class_probe_1_1_log_manager.html#adddabc01655308e7e62d8d3bd1b15386">Probe::LogManager::getInstance</a>().<a class="code hl_function" href="class_probe_1_1_log_manager.html#a5a12a541a9a7ca7f848ff385fb729c1d">getLogger</a>(<span class="stringliteral">&quot;main_log&quot;</span>); <span class="comment">// Initialize a logger</span></div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">try</span> {</div>
<div class="line"> <span class="comment">// Create a PolySolver for polytropic index n=1.5 and FE order 2</span></div>
<div class="line"> <a class="code hl_class" href="class_poly_solver.html">PolySolver</a> solver(1.5, 2);</div>
<div class="line"> solver.solve(); <span class="comment">// Solve the system</span></div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Access the solution</span></div>
<div class="line"> mfem::GridFunction&amp; theta_solution = solver.getSolution();</div>
<div class="line"> <span class="comment">// ... process or visualize theta_solution ...</span></div>
<div class="line"> </div>
<div class="line"> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;An error occurred: &quot;</span> &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line"> <span class="keywordflow">return</span> 1;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_poly_solver_html"><div class="ttname"><a href="class_poly_solver.html">PolySolver</a></div><div class="ttdoc">Solves the Lane-Emden equation for a polytropic star using a mixed finite element method.</div><div class="ttdef"><b>Definition</b> <a href="poly_solver_8h_source.html#l00200">polySolver.h:200</a></div></div>
<div class="ttc" id="aclass_probe_1_1_log_manager_html_a5a12a541a9a7ca7f848ff385fb729c1d"><div class="ttname"><a href="class_probe_1_1_log_manager.html#a5a12a541a9a7ca7f848ff385fb729c1d">Probe::LogManager::getLogger</a></div><div class="ttdeci">quill::Logger * getLogger(const std::string &amp;loggerName)</div><div class="ttdoc">Get a logger by name.</div><div class="ttdef"><b>Definition</b> <a href="probe_8cpp_source.html#l00219">probe.cpp:219</a></div></div>
<div class="ttc" id="aclass_probe_1_1_log_manager_html_adddabc01655308e7e62d8d3bd1b15386"><div class="ttname"><a href="class_probe_1_1_log_manager.html#adddabc01655308e7e62d8d3bd1b15386">Probe::LogManager::getInstance</a></div><div class="ttdeci">static LogManager &amp; getInstance()</div><div class="ttdoc">Get the singleton instance of LogManager.</div><div class="ttdef"><b>Definition</b> <a href="probe_8h_source.html#l00103">probe.h:103</a></div></div>
<div class="ttc" id="aconfig_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div></div>
<div class="ttc" id="apoly_solver_8h_html"><div class="ttname"><a href="poly_solver_8h.html">polySolver.h</a></div></div>
<div class="ttc" id="aprobe_8h_html"><div class="ttname"><a href="probe_8h.html">probe.h</a></div></div>
<div class="ttc" id="atest_d_object_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdef"><b>Definition</b> <a href="test_d_object_8cpp_source.html#l00007">testDObject.cpp:7</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_composition"></a>
Managing Chemical Compositions</h2>
<p>The <code>Composition</code> class allows for defining and managing chemical compositions.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="composition_8h.html">composition.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="keywordflow">try</span> {</div>
<div class="line"> <span class="comment">// Define symbols and their mass fractions</span></div>
<div class="line"> std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>}; <span class="comment">// Use specific isotopes</span></div>
<div class="line"> std::vector&lt;double&gt; mass_fractions = {0.75, 0.25};</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Create and finalize the composition</span></div>
<div class="line"> <a class="code hl_class" href="classcomposition_1_1_composition.html">composition::Composition</a> comp(symbols, mass_fractions);</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Get mass fraction of a specific element</span></div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Mass fraction of H-1: &quot;</span> &lt;&lt; comp.getMassFraction(<span class="stringliteral">&quot;H-1&quot;</span>) &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Get global properties</span></div>
<div class="line"> <span class="keyword">auto</span> global_props = comp.getComposition().second;</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Mean particle mass: &quot;</span> &lt;&lt; global_props.meanParticleMass &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Composition error: &quot;</span> &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclasscomposition_1_1_composition_html"><div class="ttname"><a href="classcomposition_1_1_composition.html">composition::Composition</a></div><div class="ttdef"><b>Definition</b> <a href="composition_8h_source.html#l00211">composition.h:211</a></div></div>
<div class="ttc" id="acomposition_8h_html"><div class="ttname"><a href="composition_8h.html">composition.h</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_network"></a>
Nuclear Reaction Networks</h2>
<p>The <code>Network</code> and <code>Approx8Network</code> classes provide interfaces for nuclear reaction network calculations.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="network_8h.html">network.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="approx8_8h.html">approx8.h</a>&quot;</span> <span class="comment">// Specific network implementation</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <a class="code hl_class" href="classnn_approx8_1_1_approx8_network.html">nnApprox8::Approx8Network</a> approx8_net; <span class="comment">// Using the Approx8 network</span></div>
<div class="line"> approx8_net.<a class="code hl_function" href="classnn_approx8_1_1_approx8_network.html#a11523cc90db255a50a9cecc0d794e5f8">setStiff</a>(<span class="keyword">true</span>); <span class="comment">// Example: use stiff solver</span></div>
<div class="line"> </div>
<div class="line"> <a class="code hl_struct" href="structnuclear_network_1_1_net_in.html">nuclearNetwork::NetIn</a> input;</div>
<div class="line"> input.<a class="code hl_variable" href="structnuclear_network_1_1_net_in.html#a4390cc59d2a9bd0d265163aa6e38c6c2">composition</a> = {0.7, 0.0, 0.28, 0.01, 0.005, 0.004, 0.0005, 0.0005}; <span class="comment">// H1, He3, He4, C12, N14, O16, Ne20, Mg24</span></div>
<div class="line"> input.<a class="code hl_variable" href="structnuclear_network_1_1_net_in.html#a9b9cbf0364977eca8425b191e34a7a97">temperature</a> = 1.5e7; <span class="comment">// K</span></div>
<div class="line"> input.<a class="code hl_variable" href="structnuclear_network_1_1_net_in.html#a987cb42b169b0e503515a8c62e242b97">density</a> = 150.0; <span class="comment">// g/cm^3</span></div>
<div class="line"> input.<a class="code hl_variable" href="structnuclear_network_1_1_net_in.html#ac204ff59b403cdbfef84cf8bb57e8eb2">tmax</a> = 1.0e10; <span class="comment">// s</span></div>
<div class="line"> input.<a class="code hl_variable" href="structnuclear_network_1_1_net_in.html#aa55b1d6cd458b69afb89cb096e661d9b">dt0</a> = 1.0e6; <span class="comment">// s</span></div>
<div class="line"> <span class="comment">// input.energy can also be set if needed</span></div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">try</span> {</div>
<div class="line"> <a class="code hl_struct" href="structnuclear_network_1_1_net_out.html">nuclearNetwork::NetOut</a> output = approx8_net.<a class="code hl_function" href="classnn_approx8_1_1_approx8_network.html#a31b8a20338d18123eca6e644f6e72366">evaluate</a>(input);</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Number of steps: &quot;</span> &lt;&lt; output.<a class="code hl_variable" href="structnuclear_network_1_1_net_out.html#aee71b459be94519bac05986cfb47210a">num_steps</a> &lt;&lt; std::endl;</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Final H-1 mass fraction (approx): &quot;</span> &lt;&lt; output.<a class="code hl_variable" href="structnuclear_network_1_1_net_out.html#a84c19198ae5cb48527b2d19f61fa160f">composition</a>[<a class="code hl_variable" href="structnn_approx8_1_1_net.html#a86ed8213cf2fffe5dcd7f06bdb6a6186">nnApprox8::Net::ih1</a>] &lt;&lt; std::endl;</div>
<div class="line"> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Network evaluation error: &quot;</span> &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aapprox8_8h_html"><div class="ttname"><a href="approx8_8h.html">approx8.h</a></div><div class="ttdoc">Header file for the Approx8 nuclear reaction network.</div></div>
<div class="ttc" id="aclassnn_approx8_1_1_approx8_network_html"><div class="ttname"><a href="classnn_approx8_1_1_approx8_network.html">nnApprox8::Approx8Network</a></div><div class="ttdoc">Class for the Approx8 nuclear reaction network.</div><div class="ttdef"><b>Definition</b> <a href="approx8_8h_source.html#l00297">approx8.h:297</a></div></div>
<div class="ttc" id="aclassnn_approx8_1_1_approx8_network_html_a11523cc90db255a50a9cecc0d794e5f8"><div class="ttname"><a href="classnn_approx8_1_1_approx8_network.html#a11523cc90db255a50a9cecc0d794e5f8">nnApprox8::Approx8Network::setStiff</a></div><div class="ttdeci">void setStiff(bool stiff)</div><div class="ttdoc">Sets whether the solver should use a stiff method.</div><div class="ttdef"><b>Definition</b> <a href="approx8_8cpp_source.html#l00505">approx8.cpp:505</a></div></div>
<div class="ttc" id="aclassnn_approx8_1_1_approx8_network_html_a31b8a20338d18123eca6e644f6e72366"><div class="ttname"><a href="classnn_approx8_1_1_approx8_network.html#a31b8a20338d18123eca6e644f6e72366">nnApprox8::Approx8Network::evaluate</a></div><div class="ttdeci">virtual nuclearNetwork::NetOut evaluate(const nuclearNetwork::NetIn &amp;netIn)</div><div class="ttdoc">Evaluates the nuclear network.</div><div class="ttdef"><b>Definition</b> <a href="approx8_8cpp_source.html#l00447">approx8.cpp:447</a></div></div>
<div class="ttc" id="anetwork_8h_html"><div class="ttname"><a href="network_8h.html">network.h</a></div></div>
<div class="ttc" id="astructnn_approx8_1_1_net_html_a86ed8213cf2fffe5dcd7f06bdb6a6186"><div class="ttname"><a href="structnn_approx8_1_1_net.html#a86ed8213cf2fffe5dcd7f06bdb6a6186">nnApprox8::Net::ih1</a></div><div class="ttdeci">static const int ih1</div><div class="ttdef"><b>Definition</b> <a href="approx8_8h_source.html#l00065">approx8.h:65</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html">nuclearNetwork::NetIn</a></div><div class="ttdoc">Input structure for the network evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00048">network.h:48</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html_a4390cc59d2a9bd0d265163aa6e38c6c2"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html#a4390cc59d2a9bd0d265163aa6e38c6c2">nuclearNetwork::NetIn::composition</a></div><div class="ttdeci">std::vector&lt; double &gt; composition</div><div class="ttdoc">Composition of the network.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00049">network.h:49</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html_a987cb42b169b0e503515a8c62e242b97"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html#a987cb42b169b0e503515a8c62e242b97">nuclearNetwork::NetIn::density</a></div><div class="ttdeci">double density</div><div class="ttdoc">Density in g/cm^3.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00053">network.h:53</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html_a9b9cbf0364977eca8425b191e34a7a97"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html#a9b9cbf0364977eca8425b191e34a7a97">nuclearNetwork::NetIn::temperature</a></div><div class="ttdeci">double temperature</div><div class="ttdoc">Temperature in Kelvin.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00052">network.h:52</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html_aa55b1d6cd458b69afb89cb096e661d9b"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html#aa55b1d6cd458b69afb89cb096e661d9b">nuclearNetwork::NetIn::dt0</a></div><div class="ttdeci">double dt0</div><div class="ttdoc">Initial time step.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00051">network.h:51</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_in_html_ac204ff59b403cdbfef84cf8bb57e8eb2"><div class="ttname"><a href="structnuclear_network_1_1_net_in.html#ac204ff59b403cdbfef84cf8bb57e8eb2">nuclearNetwork::NetIn::tmax</a></div><div class="ttdeci">double tmax</div><div class="ttdoc">Maximum time.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00050">network.h:50</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_out_html"><div class="ttname"><a href="structnuclear_network_1_1_net_out.html">nuclearNetwork::NetOut</a></div><div class="ttdoc">Output structure for the network evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00071">network.h:71</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_out_html_a84c19198ae5cb48527b2d19f61fa160f"><div class="ttname"><a href="structnuclear_network_1_1_net_out.html#a84c19198ae5cb48527b2d19f61fa160f">nuclearNetwork::NetOut::composition</a></div><div class="ttdeci">std::vector&lt; double &gt; composition</div><div class="ttdoc">Composition of the network after evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00072">network.h:72</a></div></div>
<div class="ttc" id="astructnuclear_network_1_1_net_out_html_aee71b459be94519bac05986cfb47210a"><div class="ttname"><a href="structnuclear_network_1_1_net_out.html#aee71b459be94519bac05986cfb47210a">nuclearNetwork::NetOut::num_steps</a></div><div class="ttdeci">int num_steps</div><div class="ttdoc">Number of steps taken in the evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00073">network.h:73</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_constants"></a>
Accessing Physical Constants</h2>
<p>The <code><a class="el" href="class_constants.html" title="Class to manage a collection of constants.">Constants</a></code> singleton provides access to a database of physical constants.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="const_8h.html">const.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <a class="code hl_class" href="class_constants.html">Constants</a>&amp; consts = <a class="code hl_function" href="class_constants.html#ab302ea5420378c55a9e5f116d19ae0e2">Constants::getInstance</a>();</div>
<div class="line"> <span class="keywordflow">if</span> (consts.<a class="code hl_function" href="class_constants.html#ae276dfdc0ffe75a53e3842e33ab52630">isLoaded</a>()) {</div>
<div class="line"> <a class="code hl_struct" href="struct_constant.html">Constant</a> G = consts.<a class="code hl_function" href="class_constants.html#a36ddd7fe6857d1bbf6d1c84d4ed7bc19">get</a>(<span class="stringliteral">&quot;Gravitational constant&quot;</span>);</div>
<div class="line"> std::cout &lt;&lt; G.<a class="code hl_variable" href="struct_constant.html#a8d8d2a81e9a8f36dfa02b4d23a5be55c">name</a> &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; G.<a class="code hl_variable" href="struct_constant.html#a3bda8d7fadd6fb2510fd39962a065a02">value</a> &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; G.<a class="code hl_variable" href="struct_constant.html#a2c46956a2d2b0ebf78ff99c5971130d2">unit</a> &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> <a class="code hl_struct" href="struct_constant.html">Constant</a> c = consts[<span class="stringliteral">&quot;Speed of light in vacuum&quot;</span>]; <span class="comment">// Can also use operator[]</span></div>
<div class="line"> std::cout &lt;&lt; c.name &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; c.value &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; c.unit &lt;&lt; std::endl;</div>
<div class="line"> } <span class="keywordflow">else</span> {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Failed to load constants.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_constants_html"><div class="ttname"><a href="class_constants.html">Constants</a></div><div class="ttdoc">Class to manage a collection of constants.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00066">const.h:66</a></div></div>
<div class="ttc" id="aclass_constants_html_a36ddd7fe6857d1bbf6d1c84d4ed7bc19"><div class="ttname"><a href="class_constants.html#a36ddd7fe6857d1bbf6d1c84d4ed7bc19">Constants::get</a></div><div class="ttdeci">Constant get(const std::string &amp;key) const</div><div class="ttdoc">Get a constant by key.</div><div class="ttdef"><b>Definition</b> <a href="const_8cpp_source.html#l00041">const.cpp:41</a></div></div>
<div class="ttc" id="aclass_constants_html_ab302ea5420378c55a9e5f116d19ae0e2"><div class="ttname"><a href="class_constants.html#ab302ea5420378c55a9e5f116d19ae0e2">Constants::getInstance</a></div><div class="ttdeci">static Constants &amp; getInstance()</div><div class="ttdoc">get instance of constants singelton</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00102">const.h:102</a></div></div>
<div class="ttc" id="aclass_constants_html_ae276dfdc0ffe75a53e3842e33ab52630"><div class="ttname"><a href="class_constants.html#ae276dfdc0ffe75a53e3842e33ab52630">Constants::isLoaded</a></div><div class="ttdeci">bool isLoaded()</div><div class="ttdoc">Check if constants are loaded.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00111">const.h:111</a></div></div>
<div class="ttc" id="aconst_8h_html"><div class="ttname"><a href="const_8h.html">const.h</a></div></div>
<div class="ttc" id="astruct_constant_html"><div class="ttname"><a href="struct_constant.html">Constant</a></div><div class="ttdoc">Structure to hold a constant&#39;s details.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00034">const.h:34</a></div></div>
<div class="ttc" id="astruct_constant_html_a2c46956a2d2b0ebf78ff99c5971130d2"><div class="ttname"><a href="struct_constant.html#a2c46956a2d2b0ebf78ff99c5971130d2">Constant::unit</a></div><div class="ttdeci">const std::string unit</div><div class="ttdoc">Unit of the constant.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00038">const.h:38</a></div></div>
<div class="ttc" id="astruct_constant_html_a3bda8d7fadd6fb2510fd39962a065a02"><div class="ttname"><a href="struct_constant.html#a3bda8d7fadd6fb2510fd39962a065a02">Constant::value</a></div><div class="ttdeci">const double value</div><div class="ttdoc">Value of the constant.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00036">const.h:36</a></div></div>
<div class="ttc" id="astruct_constant_html_a8d8d2a81e9a8f36dfa02b4d23a5be55c"><div class="ttname"><a href="struct_constant.html#a8d8d2a81e9a8f36dfa02b4d23a5be55c">Constant::name</a></div><div class="ttdeci">const std::string name</div><div class="ttdoc">Name of the constant.</div><div class="ttdef"><b>Definition</b> <a href="const_8h_source.html#l00035">const.h:35</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_config"></a>
Configuration Management</h2>
<p>The <code><a class="el" href="class_config.html" title="Singleton class to manage configuration settings loaded from a YAML file.">Config</a></code> singleton manages settings from a YAML configuration file.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <a class="code hl_class" href="class_config.html">Config</a>&amp; config = Config::getInstance();</div>
<div class="line"> <span class="keywordflow">if</span> (config.loadConfig(<span class="stringliteral">&quot;path/to/your/config.yaml&quot;</span>)) {</div>
<div class="line"> <span class="comment">// Get a string value, with a default if not found</span></div>
<div class="line"> std::string outputPath = config.get&lt;std::string&gt;(<span class="stringliteral">&quot;Output:Path&quot;</span>, <span class="stringliteral">&quot;./output/&quot;</span>);</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Output path: &quot;</span> &lt;&lt; outputPath &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Get an integer value</span></div>
<div class="line"> <span class="keywordtype">int</span> maxIter = config.get&lt;<span class="keywordtype">int</span>&gt;(<span class="stringliteral">&quot;Solver:MaxIterations&quot;</span>, 100);</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Max iterations: &quot;</span> &lt;&lt; maxIter &lt;&lt; std::endl;</div>
<div class="line"> } <span class="keywordflow">else</span> {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Failed to load configuration.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_config_html"><div class="ttname"><a href="class_config.html">Config</a></div><div class="ttdoc">Singleton class to manage configuration settings loaded from a YAML file.</div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_logging"></a>
Logging</h2>
<p>The <code><a class="el" href="class_probe_1_1_log_manager.html" title="Class to manage logging operations.">Probe::LogManager</a></code> provides a way to manage and use loggers.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="probe_8h.html">probe.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="config_8h.html">config.h</a>&quot;</span> <span class="comment">// Often used to configure logging</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="comment">// Assuming config is loaded and might define log file, level etc.</span></div>
<div class="line"> <span class="comment">// Config::getInstance().loadConfig(&quot;config.yaml&quot;);</span></div>
<div class="line"> </div>
<div class="line"> <a class="code hl_class" href="class_probe_1_1_log_manager.html">Probe::LogManager</a>&amp; logManager = <a class="code hl_function" href="class_probe_1_1_log_manager.html#adddabc01655308e7e62d8d3bd1b15386">Probe::LogManager::getInstance</a>();</div>
<div class="line"> quill::Logger* mainLogger = logManager.<a class="code hl_function" href="class_probe_1_1_log_manager.html#a5a12a541a9a7ca7f848ff385fb729c1d">getLogger</a>(<span class="stringliteral">&quot;main_app_log&quot;</span>); <span class="comment">// Get or create logger</span></div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Example: Create a new file logger if not configured through a central mechanism</span></div>
<div class="line"> <span class="comment">// quill::Logger* fileLogger = logManager.newFileLogger(&quot;app_trace.log&quot;, &quot;trace_log&quot;);</span></div>
<div class="line"> </div>
<div class="line"> LOG_INFO(mainLogger, <span class="stringliteral">&quot;Application started. Version: {}&quot;</span>, <span class="stringliteral">&quot;1.0.0&quot;</span>);</div>
<div class="line"> <span class="comment">// ... application logic ...</span></div>
<div class="line"> LOG_ERROR(mainLogger, <span class="stringliteral">&quot;An unexpected error occurred in module X.&quot;</span>);</div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_probe_1_1_log_manager_html"><div class="ttname"><a href="class_probe_1_1_log_manager.html">Probe::LogManager</a></div><div class="ttdoc">Class to manage logging operations.</div><div class="ttdef"><b>Definition</b> <a href="probe_8h_source.html#l00079">probe.h:79</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_eos"></a>
Equation of State (EOS)</h2>
<p>The <code><a class="el" href="class_eos_i_o.html" title="Handles the input/output operations for EOS tables.">EosIO</a></code> class loads EOS tables, and the <code>helmholtz</code> namespace provides functions to use them, for example, the Helmholtz EOS.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="eos_i_o_8h.html">eosIO.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="helm_8h.html">helm.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="keywordflow">try</span> {</div>
<div class="line"> <span class="comment">// Load the Helmholtz EOS table</span></div>
<div class="line"> <a class="code hl_class" href="class_eos_i_o.html">EosIO</a> helm_eos_io(<span class="stringliteral">&quot;path/to/helm_table.dat&quot;</span>); <span class="comment">// Replace with actual path</span></div>
<div class="line"> <a class="code hl_typedef" href="eos_i_o_8h.html#a1aa7735934336ab2646c539c4370dcd5">EOSTable</a>&amp; table_variant = helm_eos_io.getTable();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Assuming it&#39;s a HELMTable, get it (add error checking in real code)</span></div>
<div class="line"> <span class="keyword">auto</span>* helm_table_ptr = std::get_if&lt;std::unique_ptr&lt;helmholtz::HELMTable&gt;&gt;(&amp;table_variant);</div>
<div class="line"> <span class="keywordflow">if</span> (!helm_table_ptr || !(*helm_table_ptr) || !(*helm_table_ptr)-&gt;loaded) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Failed to load or access HELM table.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> <span class="keywordflow">return</span> 1;</div>
<div class="line"> }</div>
<div class="line"> <span class="keyword">const</span> <a class="code hl_struct" href="structhelmholtz_1_1_h_e_l_m_table.html">helmholtz::HELMTable</a>&amp; table = **helm_table_ptr;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Define input conditions</span></div>
<div class="line"> <a class="code hl_struct" href="structhelmholtz_1_1_e_o_s_input.html">helmholtz::EOSInput</a> input;</div>
<div class="line"> input.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s_input.html#aaf02a656d4891857970b6bdf366a325c">T</a> = 1.0e7; <span class="comment">// Temperature in K</span></div>
<div class="line"> input.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s_input.html#ac049842880c38e1024929f14606b84d8">rho</a> = 100.0; <span class="comment">// Density in g/cm^3</span></div>
<div class="line"> input.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s_input.html#ad0bf9309ddc7f784eca932a02f0af8b8">abar</a> = 1.0; <span class="comment">// Mean atomic mass (e.g., for pure hydrogen)</span></div>
<div class="line"> input.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s_input.html#a982c267134079bb6315f274a5bee2209">zbar</a> = 1.0; <span class="comment">// Mean atomic number (e.g., for pure hydrogen)</span></div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Get EOS results</span></div>
<div class="line"> <a class="code hl_struct" href="structhelmholtz_1_1_e_o_s.html">helmholtz::EOS</a> results = <a class="code hl_function" href="namespacehelmholtz.html#ad2176033ca3ac4e5dc65f281477b94c2">helmholtz::get_helm_EOS</a>(input, table);</div>
<div class="line"> </div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Total Pressure (Ptot): &quot;</span> &lt;&lt; results.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s.html#ae05c873c3ee103414fef99367e17d381">ptot</a> &lt;&lt; <span class="stringliteral">&quot; dyne/cm^2&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Total Energy (Etot): &quot;</span> &lt;&lt; results.<a class="code hl_variable" href="structhelmholtz_1_1_e_o_s.html#a1aa2caf18b3701c6f9515fd9f56d9a97">etot</a> &lt;&lt; <span class="stringliteral">&quot; erg/g&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;EOS error: &quot;</span> &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line"> <span class="keywordflow">return</span> 1;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_eos_i_o_html"><div class="ttname"><a href="class_eos_i_o.html">EosIO</a></div><div class="ttdoc">Handles the input/output operations for EOS tables.</div><div class="ttdef"><b>Definition</b> <a href="eos_i_o_8h_source.html#l00049">eosIO.h:49</a></div></div>
<div class="ttc" id="aeos_i_o_8h_html"><div class="ttname"><a href="eos_i_o_8h.html">eosIO.h</a></div></div>
<div class="ttc" id="aeos_i_o_8h_html_a1aa7735934336ab2646c539c4370dcd5"><div class="ttname"><a href="eos_i_o_8h.html#a1aa7735934336ab2646c539c4370dcd5">EOSTable</a></div><div class="ttdeci">std::variant&lt; std::unique_ptr&lt; helmholtz::HELMTable &gt; &gt; EOSTable</div><div class="ttdef"><b>Definition</b> <a href="eos_i_o_8h_source.html#l00031">eosIO.h:31</a></div></div>
<div class="ttc" id="ahelm_8h_html"><div class="ttname"><a href="helm_8h.html">helm.h</a></div></div>
<div class="ttc" id="anamespacehelmholtz_html_ad2176033ca3ac4e5dc65f281477b94c2"><div class="ttname"><a href="namespacehelmholtz.html#ad2176033ca3ac4e5dc65f281477b94c2">helmholtz::get_helm_EOS</a></div><div class="ttdeci">EOS get_helm_EOS(EOSInput &amp;q, const HELMTable &amp;table)</div><div class="ttdoc">Calculate the Helmholtz EOS components.</div><div class="ttdef"><b>Definition</b> <a href="helm_8cpp_source.html#l00236">helm.cpp:236</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_html"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s.html">helmholtz::EOS</a></div><div class="ttdoc">Structure to hold the output parameters and derivatives of the EOS calculation.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00311">helm.h:312</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_html_a1aa2caf18b3701c6f9515fd9f56d9a97"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s.html#a1aa2caf18b3701c6f9515fd9f56d9a97">helmholtz::EOS::etot</a></div><div class="ttdeci">double etot</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00316">helm.h:316</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_html_ae05c873c3ee103414fef99367e17d381"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s.html#ae05c873c3ee103414fef99367e17d381">helmholtz::EOS::ptot</a></div><div class="ttdeci">double ptot</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00315">helm.h:315</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_input_html"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s_input.html">helmholtz::EOSInput</a></div><div class="ttdoc">Structure to hold the input parameters for the EOS calculation.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00289">helm.h:290</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_input_html_a982c267134079bb6315f274a5bee2209"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s_input.html#a982c267134079bb6315f274a5bee2209">helmholtz::EOSInput::zbar</a></div><div class="ttdeci">double zbar</div><div class="ttdoc">Mean atomic number.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00294">helm.h:294</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_input_html_aaf02a656d4891857970b6bdf366a325c"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s_input.html#aaf02a656d4891857970b6bdf366a325c">helmholtz::EOSInput::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">Temperature.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00291">helm.h:291</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_input_html_ac049842880c38e1024929f14606b84d8"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s_input.html#ac049842880c38e1024929f14606b84d8">helmholtz::EOSInput::rho</a></div><div class="ttdeci">double rho</div><div class="ttdoc">Density.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00292">helm.h:292</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_e_o_s_input_html_ad0bf9309ddc7f784eca932a02f0af8b8"><div class="ttname"><a href="structhelmholtz_1_1_e_o_s_input.html#ad0bf9309ddc7f784eca932a02f0af8b8">helmholtz::EOSInput::abar</a></div><div class="ttdeci">double abar</div><div class="ttdoc">Mean atomic mass.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00293">helm.h:293</a></div></div>
<div class="ttc" id="astructhelmholtz_1_1_h_e_l_m_table_html"><div class="ttname"><a href="structhelmholtz_1_1_h_e_l_m_table.html">helmholtz::HELMTable</a></div><div class="ttdoc">Structure to hold the Helmholtz EOS table data.</div><div class="ttdef"><b>Definition</b> <a href="helm_8h_source.html#l00064">helm.h:65</a></div></div>
</div><!-- fragment --><h2><a class="anchor" id="usage_meshio"></a>
Mesh Handling</h2>
<p>The <code><a class="el" href="class_mesh_i_o.html" title="Class for handling mesh input/output operations.">MeshIO</a></code> class facilitates loading and managing computational meshes.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="mesh_i_o_8h.html">meshIO.h</a>&quot;</span></div>
<div class="line"><span class="preprocessor">#include &quot;mfem.hpp&quot;</span> <span class="comment">// For mfem::Mesh</span></div>
<div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> <a class="code hl_function" href="test_d_object_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>() {</div>
<div class="line"> <span class="keywordflow">try</span> {</div>
<div class="line"> <span class="comment">// Initialize MeshIO with a mesh file and a scale factor</span></div>
<div class="line"> <a class="code hl_class" href="class_mesh_i_o.html">MeshIO</a> mesh_handler(<span class="stringliteral">&quot;path/to/your/mesh.msh&quot;</span>, 1.0); <span class="comment">// Replace with actual path</span></div>
<div class="line"> </div>
<div class="line"> <span class="keywordflow">if</span> (mesh_handler.IsLoaded()) {</div>
<div class="line"> mfem::Mesh&amp; mesh = mesh_handler.GetMesh();</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Mesh loaded successfully with &quot;</span> &lt;&lt; mesh.GetNE() &lt;&lt; <span class="stringliteral">&quot; elements.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Optionally, rescale the mesh</span></div>
<div class="line"> <span class="comment">// mesh_handler.LinearRescale(2.0);</span></div>
<div class="line"> <span class="comment">// std::cout &lt;&lt; &quot;Mesh rescaled. New bounding box: &quot;;</span></div>
<div class="line"> <span class="comment">// mfem::Vector min, max;</span></div>
<div class="line"> <span class="comment">// mesh.GetBoundingBox(min, max);</span></div>
<div class="line"> <span class="comment">// min.Print(std::cout); max.Print(std::cout);</span></div>
<div class="line"> } <span class="keywordflow">else</span> {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;Failed to load mesh.&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception&amp; e) {</div>
<div class="line"> std::cerr &lt;&lt; <span class="stringliteral">&quot;MeshIO error: &quot;</span> &lt;&lt; e.what() &lt;&lt; std::endl;</div>
<div class="line"> }</div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
<div class="ttc" id="aclass_mesh_i_o_html"><div class="ttname"><a href="class_mesh_i_o.html">MeshIO</a></div><div class="ttdoc">Class for handling mesh input/output operations.</div><div class="ttdef"><b>Definition</b> <a href="mesh_i_o_8h_source.html#l00029">meshIO.h:30</a></div></div>
<div class="ttc" id="amesh_i_o_8h_html"><div class="ttname"><a href="mesh_i_o_8h.html">meshIO.h</a></div></div>
</div><!-- fragment --><h1><a class="anchor" id="modules_sec"></a>
Key Modules and Components</h1>
<p>4DSSE is organized into several key modules:</p>
<ul>
<li><b>Polytrope Solver (<code><a class="el" href="poly_solver_8h.html">polySolver.h</a></code>, <code><a class="el" href="polytrope_operator_8h.html">polytropeOperator.h</a></code>):</b> Provides tools to solve the Lane-Emden equation for polytropic stellar structures using a mixed finite element method. <code><a class="el" href="class_polytrope_operator.html" title="Represents the coupled nonlinear operator for the polytropic system.">PolytropeOperator</a></code> defines the nonlinear system and its Jacobian, while <code><a class="el" href="class_poly_solver.html" title="Solves the Lane-Emden equation for a polytropic star using a mixed finite element method.">PolySolver</a></code> orchestrates the solution process. The <code><a class="el" href="class_schur_compliment.html" title="Represents the Schur complement operator used in the solution process.">SchurCompliment</a></code> and <code><a class="el" href="class_g_m_r_e_s_inverter.html" title="Provides an approximate inverse of the SchurCompliment operator using GMRES.">GMRESInverter</a></code> classes are helper components for the linear algebra involved.</li>
<li><b>Equation of State (EOS) (<code><a class="el" href="helm_8h.html">helm.h</a></code>, <code><a class="el" href="eos_i_o_8h.html">eosIO.h</a></code>):</b> Manages Equation of State data. <code><a class="el" href="helm_8h.html">helm.h</a></code> provides an implementation of the Helmholtz EOS (Timmes &amp; Swesty 2000), including structures for table data (<code>HELMTable</code>), input parameters (<code>EOSInput</code>), and output results (<code>EOS</code>). It also defines functions for reading tables and calculating EOS quantities. <code><a class="el" href="eos_i_o_8h.html">eosIO.h</a></code> provides the <code><a class="el" href="class_eos_i_o.html" title="Handles the input/output operations for EOS tables.">EosIO</a></code> class for loading EOS tables from files, currently supporting the HELM table format.</li>
<li><b>Chemical Composition (<code><a class="el" href="composition_8h.html">composition.h</a></code>, <code>atomicSpecies.h</code>):</b> Manages chemical compositions, allowing representation in mass or number fractions. It interfaces with <code>atomicSpecies.h</code> which provides a database of atomic species properties (based on AME2020).</li>
<li><b>Nuclear Reaction Networks (<code><a class="el" href="network_8h.html">network.h</a></code>, <code><a class="el" href="approx8_8h.html" title="Header file for the Approx8 nuclear reaction network.">approx8.h</a></code>):</b> Defines a base <code>Network</code> class for nuclear reaction network calculations. <code><a class="el" href="approx8_8h.html" title="Header file for the Approx8 nuclear reaction network.">approx8.h</a></code> provides a specific implementation, <code>Approx8Network</code>, for an 8-isotope network (H1, He3, He4, C12, N14, O16, Ne20, Mg24) based on Frank Timmes' "aprox8". It includes functions for individual reaction rates and uses Boost.Numeric.Odeint for solving the ODE system.</li>
<li><b>Physical <a class="el" href="class_constants.html" title="Class to manage a collection of constants.">Constants</a> (<code><a class="el" href="const_8h.html">const.h</a></code>):</b> A singleton class <code><a class="el" href="class_constants.html" title="Class to manage a collection of constants.">Constants</a></code> that loads and provides access to a wide range of physical constants with their values, uncertainties, units, and references.</li>
<li><b>Configuration Management (<code><a class="el" href="config_8h.html">config.h</a></code>):</b> A singleton class <code><a class="el" href="class_config.html" title="Singleton class to manage configuration settings loaded from a YAML file.">Config</a></code> for loading and accessing application settings from YAML configuration files.</li>
<li><b>Probing and Logging (<code><a class="el" href="probe_8h.html">probe.h</a></code>):</b> The <code><a class="el" href="namespace_probe.html" title="The Probe namespace contains utility functions for debugging and logging.">Probe</a></code> namespace offers utility functions for debugging, such as GLVis visualization (<code>glVisView</code>), and a <code>LogManager</code> for handling application-wide logging using the Quill library.</li>
<li><b>Mesh I/O (<code><a class="el" href="mesh_i_o_8h.html">meshIO.h</a></code>):</b> The <code><a class="el" href="class_mesh_i_o.html" title="Class for handling mesh input/output operations.">MeshIO</a></code> class handles loading and basic manipulation (e.g., scaling) of computational meshes using MFEM's <code>mfem::Mesh</code>. It ensures that meshes are correctly loaded and accessible.</li>
<li><b>Integrators (<code><a class="el" href="integrators_8h.html" title="A collection of utilities for working with MFEM and solving the lane-emden equation.">integrators.h</a></code>):</b> (Details inferred) Likely contains custom MFEM integrators or coefficients used in the finite element formulations.</li>
<li><b>Custom Types (<code><a class="el" href="4_d_s_t_a_r_types_8h.html">4DSTARTypes.h</a></code>):</b> Defines project-specific data type aliases within the <code><a class="el" href="namespace_s_s_e.html">SSE</a></code> namespace, primarily for simplifying common <code>std::pair</code> combinations involving <code>mfem::Array&lt;int&gt;</code> and <code>mfem::Array&lt;double&gt;</code>. These include <code><a class="el" href="namespace_s_s_e.html#a49c89754543e0562250f33c3716689d8">SSE::MFEMArrayPair</a></code> and <code><a class="el" href="namespace_s_s_e.html#a615e866fff824677bba4a6f23d15b446">SSE::MFEMArrayPairSet</a></code>, often used for managing collections of MFEM degree-of-freedom lists and their corresponding values, especially for boundary conditions.</li>
</ul>
<h1><a class="anchor" id="future_dev"></a>
Future Development</h1>
<p>Future work will focus on expanding the physics modules (e.g., equation of state, opacity), improving numerical solvers, and enhancing the parallelization capabilities for large-scale simulations.</p>
<h1><a class="anchor" id="contact_sec"></a>
Contact and Contributions</h1>
<p>For questions, bug reports, or contributions, please refer to the project's repository or contact the development team. (Details to be added) </p>
</div></div><!-- PageDoc -->
<a href="doxygen_crawl.html"></a>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<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>