Files
GridFire/docs/html/solver_8cpp_source.html

402 lines
70 KiB
HTML
Raw Permalink Normal View History

<!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"/>
2025-07-24 11:10:45 -04:00
<title>GridFire: src/lib/solver/solver.cpp Source File</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">GridFire<span id="projectnumber">&#160;0.0.1a</span>
</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&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('solver_8cpp_source.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="headertitle"><div class="title">solver.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="solver_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include &quot;<a class="code" href="solver_8h.html">gridfire/solver/solver.h</a>&quot;</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#include &quot;<a class="code" href="engine__graph_8h.html">gridfire/engine/engine_graph.h</a>&quot;</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="preprocessor">#include &quot;<a class="code" href="network_8h.html">gridfire/network.h</a>&quot;</span></div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include &quot;<a class="code" href="error__engine_8h.html">gridfire/exceptions/error_engine.h</a>&quot;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include &quot;fourdst/composition/atomicSpecies.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include &quot;fourdst/composition/composition.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include &quot;fourdst/config/config.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include &quot;unsupported/Eigen/NonLinearOptimization&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include &lt;boost/numeric/odeint.hpp&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &lt;stdexcept&gt;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include &lt;iomanip&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include &quot;quill/LogMacros.h&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacegridfire_1_1solver.html">gridfire::solver</a> {</div>
<div class="foldopen" id="foldopen00022" data-start="{" data-end="}">
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a0e8a4b8ef656e0b084d11bea982e412a"> 22</a></span> <a class="code hl_struct" href="structgridfire_1_1_net_out.html">NetOut</a> <a class="code hl_function" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a0e8a4b8ef656e0b084d11bea982e412a">DirectNetworkSolver::evaluate</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structgridfire_1_1_net_in.html">NetIn</a> &amp;netIn) {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">namespace </span>ublas = boost::numeric::ublas;</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">namespace </span>odeint = boost::numeric::odeint;</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">using </span>fourdst::composition::Composition;</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9 = netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a5be0f5195a5cd1dd177b9fc5ab83a7be">temperature</a> / 1e9; <span class="comment">// Convert temperature from Kelvin to T9 (T9 = T / 1e9)</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">const</span> <span class="keyword">auto</span> absTol = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a2cc12e737a753a42b72a45be3fbfa8ab">m_config</a>.get&lt;<span class="keywordtype">double</span>&gt;(<span class="stringliteral">&quot;gridfire:solver:DirectNetworkSolver:absTol&quot;</span>, 1.0e-8);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">const</span> <span class="keyword">auto</span> relTol = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a2cc12e737a753a42b72a45be3fbfa8ab">m_config</a>.get&lt;<span class="keywordtype">double</span>&gt;(<span class="stringliteral">&quot;gridfire:solver:DirectNetworkSolver:relTol&quot;</span>, 1.0e-8);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> Composition equilibratedComposition = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.update(netIn);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">size_t</span> numSpecies = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies().size();</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> ublas::vector&lt;double&gt; Y(numSpecies + 1);</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_struct" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html">RHSManager</a> manager(<a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>, T9, netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a06f0dff9f8927b7cf2da3004c8fa1577">density</a>);</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_struct" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html">JacobianFunctor</a> jacobianFunctor(<a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>, T9, netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a06f0dff9f8927b7cf2da3004c8fa1577">density</a>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">auto</span> populateY = [&amp;](<span class="keyword">const</span> Composition&amp; comp) {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> numSpeciesInternal = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies().size();</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> Y.resize(numSpeciesInternal + 1);</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; numSpeciesInternal; i++) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keyword">const</span> <span class="keyword">auto</span>&amp; species = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies()[i];</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">if</span> (!comp.contains(species)) {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">double</span> lim = std::numeric_limits&lt;double&gt;::min();</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> LOG_DEBUG(<a class="code hl_variable" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a093aa89fd23c2fe03266e286871c7079">m_logger</a>, <span class="stringliteral">&quot;Species &#39;{}&#39; not found in composition. Setting abundance to {:0.3E}.&quot;</span>, species.name(), lim);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> Y(i) = lim; <span class="comment">// Species not in the composition, set to zero</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> } <span class="keywordflow">else</span> {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> Y(i) = comp.getMolarAbundance(species);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> }</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// TODO: a good starting point to make the temperature, density, and energy self consistent would be to turn this into an accumulator</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> Y(numSpeciesInternal) = 0.0; <span class="comment">// Specific energy rate, initialized to zero</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> };</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// This is a quick debug that can be turned on. For solar code input parameters (T~1.5e7K, ρ~1.5e3 g/cm^3) this should be near 8e-17</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="comment">// std::cout &lt;&lt; &quot;D/H: &quot; &lt;&lt; equilibratedComposition.getMolarAbundance(&quot;H-2&quot;) / equilibratedComposition.getMolarAbundance(&quot;H-1&quot;) &lt;&lt; std::endl;</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> populateY(equilibratedComposition);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">const</span> <span class="keyword">auto</span> stepper = odeint::make_controlled&lt;odeint::rosenbrock4&lt;double&gt;&gt;(absTol, relTol);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">double</span> current_time = 0.0;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">double</span> current_initial_timestep = netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a4e556f7bb18f46654b3445476734076a">dt0</a>;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">double</span> accumulated_energy = 0.0;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// size_t total_update_stages_triggered = 0;</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">while</span> (current_time &lt; netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a0a8d820cfeaa92ee31f253795c57e0d1">tMax</a>) {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">try</span> {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> odeint::integrate_adaptive(</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> stepper,</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> std::make_pair(manager, jacobianFunctor),</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> Y,</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> current_time,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a0a8d820cfeaa92ee31f253795c57e0d1">tMax</a>,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> current_initial_timestep,</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> [&amp;](<span class="keyword">const</span> <span class="keyword">auto</span>&amp; state, <span class="keywordtype">double</span> t) {</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> current_time = t;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> manager.observe(state, t);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> );</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> current_time = netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a0a8d820cfeaa92ee31f253795c57e0d1">tMax</a>;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> } <span class="keywordflow">catch</span> (<span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html">exceptions::StaleEngineTrigger</a> &amp;e) {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> LOG_INFO(<a class="code hl_variable" href="classgridfire_1_1solver_1_1_direct_network_solver.html#a093aa89fd23c2fe03266e286871c7079">m_logger</a>, <span class="stringliteral">&quot;Catching StaleEngineTrigger at t = {:0.3E} with T9 = {:0.3E}, rho = {:0.3E}. Triggering update stage (last stage took {} steps).&quot;</span>, current_time, T9, netIn.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a06f0dff9f8927b7cf2da3004c8fa1577">density</a>, e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a0b7c627c3e69390808bef352b3875408">totalSteps</a>());</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_struct" href="structgridfire_1_1exceptions_1_1_stale_engine_trigger_1_1state.html">exceptions::StaleEngineTrigger::state</a> staleState = e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a06eb9eb03750038c193c23c7f53668f5">getState</a>();</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> accumulated_energy += e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#aeebfb529118f8dfcaf1422ae1768f2bf">energy</a>(); <span class="comment">// Add the specific energy rate to the accumulated energy</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="comment">// total_update_stages_triggered++;</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> Composition temp_comp;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> std::vector&lt;double&gt; mass_fractions;</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">size_t</span> num_species_at_stop = e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a44ac2f7510ecf86cd5b556a842eee30c">numSpecies</a>();</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">if</span> (num_species_at_stop != <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies().size()) {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">throw</span> std::runtime_error(</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="stringliteral">&quot;StaleEngineError state has a different number of species than the engine. This should not happen.&quot;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> );</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> }</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> mass_fractions.reserve(num_species_at_stop);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; num_species_at_stop; ++i) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">const</span> <span class="keyword">auto</span>&amp; species = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies()[i];</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> temp_comp.registerSpecies(species);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> mass_fractions.push_back(e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a3183a0030b14253eb49d8304fb6665ea">getMolarAbundance</a>(i) * species.mass()); <span class="comment">// Convert from molar abundance to mass fraction</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> temp_comp.setMassFraction(<a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies(), mass_fractions);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> temp_comp.finalize(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <a class="code hl_struct" href="structgridfire_1_1_net_in.html">NetIn</a> netInTemp = netIn;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> netInTemp.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a5be0f5195a5cd1dd177b9fc5ab83a7be">temperature</a> = e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a2f5925b67562cebd08568fce76c739e9">temperature</a>();</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> netInTemp.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a06f0dff9f8927b7cf2da3004c8fa1577">density</a> = e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#ae8156ed7e659cb629da24a5b6734e2dc">density</a>();</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> netInTemp.<a class="code hl_variable" href="structgridfire_1_1_net_in.html#a13058f4929e72c1187abbebcddb8aed1">composition</a> = std::move(temp_comp);</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> Composition currentComposition = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.update(netInTemp);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> populateY(currentComposition);</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> Y(Y.size() - 1) = e.<a class="code hl_function" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#aeebfb529118f8dfcaf1422ae1768f2bf">energy</a>(); <span class="comment">// Set the specific energy rate from the stale state</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> numSpecies = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies().size();</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// current_initial_timestep = 0.001 * manager.m_last_step_time; // set the new timestep to the last successful timestep before repartitioning</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> }</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> accumulated_energy += Y(Y.size() - 1); <span class="comment">// Add the specific energy rate to the accumulated energy</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> std::vector&lt;double&gt; finalMassFractions(numSpecies);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; numSpecies; ++i) {</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">const</span> <span class="keywordtype">double</span> molarMass = <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies()[i].mass();</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> finalMassFractions[i] = Y(i) * molarMass; <span class="comment">// Convert from molar abundance to mass fraction</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordflow">if</span> (finalMassFractions[i] &lt; <a class="code hl_variable" href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06">MIN_ABUNDANCE_THRESHOLD</a>) {</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> finalMassFractions[i] = 0.0;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> }</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> }</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> std::vector&lt;std::string&gt; speciesNames;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> speciesNames.reserve(numSpecies);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; species : <a class="code hl_variable" href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">m_engine</a>.getNetworkSpecies()) {</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> speciesNames.push_back(std::string(species.name()));</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> Composition outputComposition(speciesNames);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> outputComposition.setMassFraction(speciesNames, finalMassFractions);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> outputComposition.finalize(<span class="keyword">true</span>);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <a class="code hl_struct" href="structgridfire_1_1_net_out.html">NetOut</a> netOut;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> netOut.<a class="code hl_variable" href="structgridfire_1_1_net_out.html#a073529511ae0e52f868b47cce0e8ac0a">composition</a> = std::move(outputComposition);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> netOut.<a class="code hl_variable" href="structgridfire_1_1_net_out.html#a43d5a861708992c949f616aa2a035ec6">energy</a> = accumulated_energy; <span class="comment">// Specific energy rate</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> netOut.<a class="code hl_variable" href="structgridfire_1_1_net_out.html#a51c16703132cf739ec2fd89eae7badd6">num_steps</a> = manager.<a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">m_num_steps</a>;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keywordflow">return</span> netOut;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> }</div>
</div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> </div>
<div class="foldopen" id="foldopen00152" data-start="{" data-end="}">
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aec8c0a0b2fbb71cebb40c263f64385b3"> 152</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aec8c0a0b2fbb71cebb40c263f64385b3">DirectNetworkSolver::RHSManager::operator()</a>(</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keyword">const</span> boost::numeric::ublas::vector&lt;double&gt; &amp;Y,</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> boost::numeric::ublas::vector&lt;double&gt; &amp;dYdt,</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">const</span> <span class="keywordtype">double</span> t</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> )<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> numSpecies = <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a035962dfdfc13d255def98befefcccd9">m_engine</a>.getNetworkSpecies().size();</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">if</span> (t != <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a17b83f2478395c934c4ec2c964e9d35e">m_cached_time</a> || !<a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#acfecb0ebb0429f112d503771764f27ec">m_cached_result</a>.has_value() || <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#acfecb0ebb0429f112d503771764f27ec">m_cached_result</a>.value().dydt.size() != numSpecies + 1) {</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a595aa16333693ee2bbcac35aa85a1c2a">compute_and_cache</a>(Y, t);</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keyword">const</span> <span class="keyword">auto</span>&amp;[dydt, nuclearEnergyGenerationRate] = <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#acfecb0ebb0429f112d503771764f27ec">m_cached_result</a>.value();</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> dYdt.resize(numSpecies + 1);</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> std::ranges::copy(dydt, dYdt.begin());</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> dYdt(numSpecies) = nuclearEnergyGenerationRate; <span class="comment">// Set the last element to the specific energy rate</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> }</div>
</div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
<div class="foldopen" id="foldopen00167" data-start="{" data-end="}">
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a226b007bfc9960b5c0bb7b88b4f122da"> 167</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a226b007bfc9960b5c0bb7b88b4f122da">DirectNetworkSolver::RHSManager::observe</a>(</div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keyword">const</span> boost::numeric::ublas::vector&lt;double&gt; &amp;state,</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keyword">const</span> <span class="keywordtype">double</span> t</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> )<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">double</span> dt = t - <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a49268e65b89444c3caf1e69323ce545b">m_last_observed_time</a>;</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a595aa16333693ee2bbcac35aa85a1c2a">compute_and_cache</a>(state, t);</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> LOG_INFO(</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a6cc605a83b5ac5ae048d1044be284ada">m_logger</a>,</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="stringliteral">&quot;(Step {}) Observed state at t = {:0.3E} (dt = {:0.3E})&quot;</span>,</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">m_num_steps</a>,</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> t,</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> dt</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> );</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> std::ostringstream oss;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> oss &lt;&lt; std::scientific &lt;&lt; std::setprecision(3);</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> oss &lt;&lt; <span class="stringliteral">&quot;(Step: &quot;</span> &lt;&lt; std::setw(10) &lt;&lt; <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">m_num_steps</a> &lt;&lt; <span class="stringliteral">&quot;) t = &quot;</span> &lt;&lt; t &lt;&lt; <span class="stringliteral">&quot; (dt = &quot;</span> &lt;&lt; dt &lt;&lt; <span class="stringliteral">&quot;, eps_nuc: &quot;</span> &lt;&lt; state(state.size() - 1) &lt;&lt; <span class="stringliteral">&quot; [erg])\n&quot;</span>;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> std::cout &lt;&lt; oss.str();</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a49268e65b89444c3caf1e69323ce545b">m_last_observed_time</a> = t;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a69d773a1cfe4804876dbf23de1f212c9">m_last_step_time</a> = dt;</div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> }</div>
</div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> </div>
<div class="foldopen" id="foldopen00189" data-start="{" data-end="}">
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a595aa16333693ee2bbcac35aa85a1c2a"> 189</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a595aa16333693ee2bbcac35aa85a1c2a">DirectNetworkSolver::RHSManager::compute_and_cache</a>(</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keyword">const</span> boost::numeric::ublas::vector&lt;double&gt; &amp;state,</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordtype">double</span> t</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> )<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> std::vector&lt;double&gt; y_vec(state.begin(), state.end() - 1);</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> std::ranges::replace_if(</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> y_vec,</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> [](<span class="keyword">const</span> <span class="keywordtype">double</span> yi){</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> <span class="keywordflow">return</span> yi &lt; 0.0;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> },</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> 0.0 <span class="comment">// Avoid negative abundances</span></div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> );</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keyword">const</span> <span class="keyword">auto</span> result = <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a035962dfdfc13d255def98befefcccd9">m_engine</a>.calculateRHSAndEnergy(y_vec, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a46e39ab9f9fd2f3822c72712173d7aef">m_T9</a>, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aa5d0316fa2fd7d817cc77303776ab446">m_rho</a>);</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keywordflow">if</span> (!result) {</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> LOG_INFO(<a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a6cc605a83b5ac5ae048d1044be284ada">m_logger</a>,</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> <span class="stringliteral">&quot;Triggering update stage due to stale engine detected at t = {:0.3E} with T9 = {:0.3E}, rho = {:0.3E}, y_vec (size: {})&quot;</span>,</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> t, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a46e39ab9f9fd2f3822c72712173d7aef">m_T9</a>, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aa5d0316fa2fd7d817cc77303776ab446">m_rho</a>, y_vec.size());</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="keywordflow">throw</span> <a class="code hl_class" href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html">exceptions::StaleEngineTrigger</a>({<a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a46e39ab9f9fd2f3822c72712173d7aef">m_T9</a>, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aa5d0316fa2fd7d817cc77303776ab446">m_rho</a>, y_vec, t, <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">m_num_steps</a>, state(state.size() - 1)});</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> }</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#acfecb0ebb0429f112d503771764f27ec">m_cached_result</a> = result.value();</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a17b83f2478395c934c4ec2c964e9d35e">m_cached_time</a> = t;</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">m_num_steps</a>++;</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> }</div>
</div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
<div class="foldopen" id="foldopen00215" data-start="{" data-end="}">
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"><a class="line" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#ad4fc0b406218aa2f567f5c61a4eda3c9"> 215</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#ad4fc0b406218aa2f567f5c61a4eda3c9">DirectNetworkSolver::JacobianFunctor::operator()</a>(</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span> <span class="keyword">const</span> boost::numeric::ublas::vector&lt;double&gt; &amp;Y,</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span> boost::numeric::ublas::matrix&lt;double&gt; &amp;J,</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> <span class="keywordtype">double</span> t,</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span> boost::numeric::ublas::vector&lt;double&gt; &amp;dfdt</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"> 220</span> )<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"> 221</span> <span class="keywordtype">size_t</span> numSpecies = <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#a56f8b2b222fb2a7dac190ead0babfdd0">m_engine</a>.getNetworkSpecies().size();</div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"> 222</span> J.resize(numSpecies+1, numSpecies+1);</div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span> J.clear();</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; numSpecies; ++i) {</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"> 225</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j &lt; numSpecies; ++j) {</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"> 226</span> J(i, j) = <a class="code hl_variable" href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#a56f8b2b222fb2a7dac190ead0babfdd0">m_engine</a>.getJacobianMatrixEntry(i, j);</div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> }</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> }</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> }</div>
</div>
2025-07-24 11:10:45 -04:00
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span>}</div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html">gridfire::exceptions::StaleEngineTrigger</a></div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00010">error_engine.h:10</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_a06eb9eb03750038c193c23c7f53668f5"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a06eb9eb03750038c193c23c7f53668f5">gridfire::exceptions::StaleEngineTrigger::getState</a></div><div class="ttdeci">state getState() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00027">error_engine.h:27</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_a0b7c627c3e69390808bef352b3875408"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a0b7c627c3e69390808bef352b3875408">gridfire::exceptions::StaleEngineTrigger::totalSteps</a></div><div class="ttdeci">size_t totalSteps() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00035">error_engine.h:35</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_a2f5925b67562cebd08568fce76c739e9"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a2f5925b67562cebd08568fce76c739e9">gridfire::exceptions::StaleEngineTrigger::temperature</a></div><div class="ttdeci">double temperature() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00050">error_engine.h:50</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_a3183a0030b14253eb49d8304fb6665ea"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a3183a0030b14253eb49d8304fb6665ea">gridfire::exceptions::StaleEngineTrigger::getMolarAbundance</a></div><div class="ttdeci">double getMolarAbundance(const size_t index) const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00043">error_engine.h:43</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_a44ac2f7510ecf86cd5b556a842eee30c"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#a44ac2f7510ecf86cd5b556a842eee30c">gridfire::exceptions::StaleEngineTrigger::numSpecies</a></div><div class="ttdeci">size_t numSpecies() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00031">error_engine.h:31</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_ae8156ed7e659cb629da24a5b6734e2dc"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#ae8156ed7e659cb629da24a5b6734e2dc">gridfire::exceptions::StaleEngineTrigger::density</a></div><div class="ttdeci">double density() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00054">error_engine.h:54</a></div></div>
<div class="ttc" id="aclassgridfire_1_1exceptions_1_1_stale_engine_trigger_html_aeebfb529118f8dfcaf1422ae1768f2bf"><div class="ttname"><a href="classgridfire_1_1exceptions_1_1_stale_engine_trigger.html#aeebfb529118f8dfcaf1422ae1768f2bf">gridfire::exceptions::StaleEngineTrigger::energy</a></div><div class="ttdeci">double energy() const</div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00039">error_engine.h:39</a></div></div>
<div class="ttc" id="aclassgridfire_1_1solver_1_1_direct_network_solver_html_a093aa89fd23c2fe03266e286871c7079"><div class="ttname"><a href="classgridfire_1_1solver_1_1_direct_network_solver.html#a093aa89fd23c2fe03266e286871c7079">gridfire::solver::DirectNetworkSolver::m_logger</a></div><div class="ttdeci">quill::Logger * m_logger</div><div class="ttdoc">Logger instance.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00180">solver.h:180</a></div></div>
<div class="ttc" id="aclassgridfire_1_1solver_1_1_direct_network_solver_html_a0e8a4b8ef656e0b084d11bea982e412a"><div class="ttname"><a href="classgridfire_1_1solver_1_1_direct_network_solver.html#a0e8a4b8ef656e0b084d11bea982e412a">gridfire::solver::DirectNetworkSolver::evaluate</a></div><div class="ttdeci">NetOut evaluate(const NetIn &amp;netIn) override</div><div class="ttdoc">Evaluates the network for a given timestep using direct integration.</div><div class="ttdef"><b>Definition</b> <a href="#l00022">solver.cpp:22</a></div></div>
<div class="ttc" id="aclassgridfire_1_1solver_1_1_direct_network_solver_html_a2cc12e737a753a42b72a45be3fbfa8ab"><div class="ttname"><a href="classgridfire_1_1solver_1_1_direct_network_solver.html#a2cc12e737a753a42b72a45be3fbfa8ab">gridfire::solver::DirectNetworkSolver::m_config</a></div><div class="ttdeci">Config &amp; m_config</div><div class="ttdoc">Configuration instance.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00181">solver.h:181</a></div></div>
<div class="ttc" id="aclassgridfire_1_1solver_1_1_network_solver_strategy_html_a724924d94eaf82b67d9988a55c3261e8"><div class="ttname"><a href="classgridfire_1_1solver_1_1_network_solver_strategy.html#a724924d94eaf82b67d9988a55c3261e8">gridfire::solver::NetworkSolverStrategy&lt; DynamicEngine &gt;::m_engine</a></div><div class="ttdeci">DynamicEngine &amp; m_engine</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00047">solver.h:47</a></div></div>
<div class="ttc" id="aengine__graph_8h_html"><div class="ttname"><a href="engine__graph_8h.html">engine_graph.h</a></div></div>
2025-07-24 11:10:45 -04:00
<div class="ttc" id="aerror__engine_8h_html"><div class="ttname"><a href="error__engine_8h.html">error_engine.h</a></div></div>
<div class="ttc" id="anamespacegridfire_1_1solver_html"><div class="ttname"><a href="namespacegridfire_1_1solver.html">gridfire::solver</a></div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00015">solver.h:15</a></div></div>
<div class="ttc" id="anamespacegridfire_html_a96c062f94713921e5d7568ecedcdcb06"><div class="ttname"><a href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06">gridfire::MIN_ABUNDANCE_THRESHOLD</a></div><div class="ttdeci">static constexpr double MIN_ABUNDANCE_THRESHOLD</div><div class="ttdoc">Minimum abundance threshold below which species are ignored.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8h_source.html#l00066">engine_graph.h:66</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="asolver_8h_html"><div class="ttname"><a href="solver_8h.html">solver.h</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html"><div class="ttname"><a href="structgridfire_1_1_net_in.html">gridfire::NetIn</a></div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00053">network.h:53</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html_a06f0dff9f8927b7cf2da3004c8fa1577"><div class="ttname"><a href="structgridfire_1_1_net_in.html#a06f0dff9f8927b7cf2da3004c8fa1577">gridfire::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#l00058">network.h:58</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html_a0a8d820cfeaa92ee31f253795c57e0d1"><div class="ttname"><a href="structgridfire_1_1_net_in.html#a0a8d820cfeaa92ee31f253795c57e0d1">gridfire::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#l00055">network.h:55</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html_a13058f4929e72c1187abbebcddb8aed1"><div class="ttname"><a href="structgridfire_1_1_net_in.html#a13058f4929e72c1187abbebcddb8aed1">gridfire::NetIn::composition</a></div><div class="ttdeci">fourdst::composition::Composition composition</div><div class="ttdoc">Composition of the network.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00054">network.h:54</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html_a4e556f7bb18f46654b3445476734076a"><div class="ttname"><a href="structgridfire_1_1_net_in.html#a4e556f7bb18f46654b3445476734076a">gridfire::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#l00056">network.h:56</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_in_html_a5be0f5195a5cd1dd177b9fc5ab83a7be"><div class="ttname"><a href="structgridfire_1_1_net_in.html#a5be0f5195a5cd1dd177b9fc5ab83a7be">gridfire::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#l00057">network.h:57</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_out_html"><div class="ttname"><a href="structgridfire_1_1_net_out.html">gridfire::NetOut</a></div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00065">network.h:65</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_out_html_a073529511ae0e52f868b47cce0e8ac0a"><div class="ttname"><a href="structgridfire_1_1_net_out.html#a073529511ae0e52f868b47cce0e8ac0a">gridfire::NetOut::composition</a></div><div class="ttdeci">fourdst::composition::Composition composition</div><div class="ttdoc">Composition of the network after evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00066">network.h:66</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_out_html_a43d5a861708992c949f616aa2a035ec6"><div class="ttname"><a href="structgridfire_1_1_net_out.html#a43d5a861708992c949f616aa2a035ec6">gridfire::NetOut::energy</a></div><div class="ttdeci">double energy</div><div class="ttdoc">Energy in ergs after evaluation.</div><div class="ttdef"><b>Definition</b> <a href="network_8h_source.html#l00068">network.h:68</a></div></div>
<div class="ttc" id="astructgridfire_1_1_net_out_html_a51c16703132cf739ec2fd89eae7badd6"><div class="ttname"><a href="structgridfire_1_1_net_out.html#a51c16703132cf739ec2fd89eae7badd6">gridfire::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#l00067">network.h:67</a></div></div>
2025-07-24 11:10:45 -04:00
<div class="ttc" id="astructgridfire_1_1exceptions_1_1_stale_engine_trigger_1_1state_html"><div class="ttname"><a href="structgridfire_1_1exceptions_1_1_stale_engine_trigger_1_1state.html">gridfire::exceptions::StaleEngineTrigger::state</a></div><div class="ttdef"><b>Definition</b> <a href="error__engine_8h_source.html#l00012">error_engine.h:12</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor_html"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html">gridfire::solver::DirectNetworkSolver::JacobianFunctor</a></div><div class="ttdoc">Functor for calculating the Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00143">solver.h:143</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor_html_a56f8b2b222fb2a7dac190ead0babfdd0"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#a56f8b2b222fb2a7dac190ead0babfdd0">gridfire::solver::DirectNetworkSolver::JacobianFunctor::m_engine</a></div><div class="ttdeci">DynamicEngine &amp; m_engine</div><div class="ttdoc">The engine used to evaluate the network.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00144">solver.h:144</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor_html_ad4fc0b406218aa2f567f5c61a4eda3c9"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_jacobian_functor.html#ad4fc0b406218aa2f567f5c61a4eda3c9">gridfire::solver::DirectNetworkSolver::JacobianFunctor::operator()</a></div><div class="ttdeci">void operator()(const boost::numeric::ublas::vector&lt; double &gt; &amp;Y, boost::numeric::ublas::matrix&lt; double &gt; &amp;J, double t, boost::numeric::ublas::vector&lt; double &gt; &amp;dfdt) const</div><div class="ttdoc">Calculates the Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="#l00215">solver.cpp:215</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html">gridfire::solver::DirectNetworkSolver::RHSManager</a></div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00088">solver.h:88</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a035962dfdfc13d255def98befefcccd9"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a035962dfdfc13d255def98befefcccd9">gridfire::solver::DirectNetworkSolver::RHSManager::m_engine</a></div><div class="ttdeci">DynamicEngine &amp; m_engine</div><div class="ttdoc">The engine used to evaluate the network.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00089">solver.h:89</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a17b83f2478395c934c4ec2c964e9d35e"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a17b83f2478395c934c4ec2c964e9d35e">gridfire::solver::DirectNetworkSolver::RHSManager::m_cached_time</a></div><div class="ttdeci">double m_cached_time</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00093">solver.h:93</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a226b007bfc9960b5c0bb7b88b4f122da"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a226b007bfc9960b5c0bb7b88b4f122da">gridfire::solver::DirectNetworkSolver::RHSManager::observe</a></div><div class="ttdeci">void observe(const boost::numeric::ublas::vector&lt; double &gt; &amp;state, double t) const</div><div class="ttdef"><b>Definition</b> <a href="#l00167">solver.cpp:167</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a46e39ab9f9fd2f3822c72712173d7aef"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a46e39ab9f9fd2f3822c72712173d7aef">gridfire::solver::DirectNetworkSolver::RHSManager::m_T9</a></div><div class="ttdeci">const double m_T9</div><div class="ttdoc">Temperature in units of 10^9 K.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00090">solver.h:90</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a49268e65b89444c3caf1e69323ce545b"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a49268e65b89444c3caf1e69323ce545b">gridfire::solver::DirectNetworkSolver::RHSManager::m_last_observed_time</a></div><div class="ttdeci">double m_last_observed_time</div><div class="ttdoc">Last time the state was observed.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00096">solver.h:96</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a595aa16333693ee2bbcac35aa85a1c2a"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a595aa16333693ee2bbcac35aa85a1c2a">gridfire::solver::DirectNetworkSolver::RHSManager::compute_and_cache</a></div><div class="ttdeci">void compute_and_cache(const boost::numeric::ublas::vector&lt; double &gt; &amp;state, double t) const</div><div class="ttdef"><b>Definition</b> <a href="#l00189">solver.cpp:189</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a69d773a1cfe4804876dbf23de1f212c9"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a69d773a1cfe4804876dbf23de1f212c9">gridfire::solver::DirectNetworkSolver::RHSManager::m_last_step_time</a></div><div class="ttdeci">double m_last_step_time</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00101">solver.h:101</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_a6cc605a83b5ac5ae048d1044be284ada"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#a6cc605a83b5ac5ae048d1044be284ada">gridfire::solver::DirectNetworkSolver::RHSManager::m_logger</a></div><div class="ttdeci">quill::Logger * m_logger</div><div class="ttdoc">Logger instance.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00099">solver.h:99</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_aa5d0316fa2fd7d817cc77303776ab446"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aa5d0316fa2fd7d817cc77303776ab446">gridfire::solver::DirectNetworkSolver::RHSManager::m_rho</a></div><div class="ttdeci">const double m_rho</div><div class="ttdoc">Density in g/cm^3.</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00091">solver.h:91</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_acfecb0ebb0429f112d503771764f27ec"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#acfecb0ebb0429f112d503771764f27ec">gridfire::solver::DirectNetworkSolver::RHSManager::m_cached_result</a></div><div class="ttdeci">std::optional&lt; StepDerivatives&lt; double &gt; &gt; m_cached_result</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00094">solver.h:94</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_ad9a07ff5cbe42a9455561903a0ae1708"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#ad9a07ff5cbe42a9455561903a0ae1708">gridfire::solver::DirectNetworkSolver::RHSManager::m_num_steps</a></div><div class="ttdeci">int m_num_steps</div><div class="ttdef"><b>Definition</b> <a href="solver_8h_source.html#l00100">solver.h:100</a></div></div>
<div class="ttc" id="astructgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager_html_aec8c0a0b2fbb71cebb40c263f64385b3"><div class="ttname"><a href="structgridfire_1_1solver_1_1_direct_network_solver_1_1_r_h_s_manager.html#aec8c0a0b2fbb71cebb40c263f64385b3">gridfire::solver::DirectNetworkSolver::RHSManager::operator()</a></div><div class="ttdeci">void operator()(const boost::numeric::ublas::vector&lt; double &gt; &amp;Y, boost::numeric::ublas::vector&lt; double &gt; &amp;dYdt, double t) const</div><div class="ttdoc">Calculates the time derivatives of the species abundances.</div><div class="ttdef"><b>Definition</b> <a href="#l00152">solver.cpp:152</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
2025-07-24 11:10:45 -04:00
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_c85d3e3c5052e9ad9ce18c6863244a25.html">lib</a></li><li class="navelem"><a class="el" href="dir_4fd0dc9a50f7a53e22cb356c650f915e.html">solver</a></li><li class="navelem"><a class="el" href="solver_8cpp.html">solver.cpp</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>