<ahref="classgridfire_1_1_graph_engine-members.html">List of all members</a></div>
<divclass="headertitle"><divclass="title">gridfire::GraphEngine Class Reference<spanclass="mlabels"><spanclass="mlabel final">final</span></span></div></div>
</div><!--header-->
<divclass="contents">
<p>A reaction network engine that uses a graph-based representation.
<areahref="classgridfire_1_1_dynamic_engine.html"title="Abstract class for engines supporting Jacobian and stoichiometry operations."alt="gridfire::DynamicEngine"shape="rect"coords="0,56,147,80"/>
<areahref="classgridfire_1_1_engine.html"title="Abstract base class for a reaction network engine."alt="gridfire::Engine"shape="rect"coords="0,0,147,24"/>
<trclass="memdesc:a9f74786ff930ab72664b31f29d05a30c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructs a <aclass="el"href="classgridfire_1_1_graph_engine.html"title="A reaction network engine that uses a graph-based representation.">GraphEngine</a> from a composition. <br/></td></tr>
<trclass="memdesc:a1e7e851dfa21d41c2dc533ba56fc4c7b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Constructs a <aclass="el"href="classgridfire_1_1_graph_engine.html"title="A reaction network engine that uses a graph-based representation.">GraphEngine</a> from a set of reactions. <br/></td></tr>
<trclass="memdesc:a8b3baf29829c7ae0a61430ea70632bbf"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates the right-hand side (dY/dt) and energy generation rate. <br/></td></tr>
<trclass="memdesc:ae347ff0316e532e0298ec8c913908105"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Generates the Jacobian matrix for the current state. <br/></td></tr>
<trclass="memdesc:aed726d36ee2b3796beff6067a1e4db38"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Generates the stoichiometry matrix for the network. <br/></td></tr>
<trclass="memdesc:a9245642b741f215e52861d00e756fb3f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates the molar reaction flow for a given reaction. <br/></td></tr>
<trclass="memdesc:a0ed390f3e598ebba4e245ac90bb78767"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the list of species in the network. <br/></td></tr>
<trclass="memdesc:ad45650d10fc5dff1673ae3f806d067da"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the set of logical reactions in the network. <br/></td></tr>
<trclass="memitem:a303e6093591cde91430f866a04a8be7c"id="r_a303e6093591cde91430f866a04a8be7c"><tdclass="memItemLeft"align="right"valign="top">double </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="#a303e6093591cde91430f866a04a8be7c">getJacobianMatrixEntry</a> (const int i, const int j) const override</td></tr>
<trclass="memdesc:a303e6093591cde91430f866a04a8be7c"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets an entry from the previously generated Jacobian matrix. <br/></td></tr>
<trclass="memitem:a6b5feaf788bade212b7c8df7ac8c8152"id="r_a6b5feaf788bade212b7c8df7ac8c8152"><tdclass="memItemLeft"align="right"valign="top">int </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="#a6b5feaf788bade212b7c8df7ac8c8152">getStoichiometryMatrixEntry</a> (const int speciesIndex, const int reactionIndex) const override</td></tr>
<trclass="memdesc:a6b5feaf788bade212b7c8df7ac8c8152"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets an entry from the stoichiometry matrix. <br/></td></tr>
<trclass="memdesc:a26215593544c3a52597194602e4e25dd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Computes timescales for all species in the network. <br/></td></tr>
<trclass="memdesc:a51b4cedf9b00de79fb6eef243631b04d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Update the internal state of the engine. <br/></td></tr>
<trclass="memdesc:aa6202cee0c3c481eda77cc9a91bc126b"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Checks if a given species is involved in the network. <br/></td></tr>
<trclass="memdesc:adac8c7d62bae76e17fc060e86dadd929"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Exports the network to a DOT file for visualization. <br/></td></tr>
<trclass="memdesc:a832e2fe066381811a3e0464806ff5e95"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Exports the network to a CSV file for analysis. <br/></td></tr>
<trclass="memdesc:a8110e687844f921438bb517e1d8ce62f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set the electron screening model. <br/></td></tr>
<trclass="memdesc:a697f2004e0d02c59e83c7890742d7c9a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Get the current electron screening model. <br/></td></tr>
<trclass="inherit_header pub_methods_classgridfire_1_1_engine"><tdcolspan="2"onclick="javascript:dynsection.toggleInherit('pub_methods_classgridfire_1_1_engine')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classgridfire_1_1_engine.html">gridfire::Engine</a></td></tr>
<trclass="memitem:a8c29d8bbde407e913be5eb77efb2c0c9"id="r_a8c29d8bbde407e913be5eb77efb2c0c9"><tdclass="memItemLeft"align="right"valign="top">static std::unordered_map< fourdst::atomic::Species, int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="#a8c29d8bbde407e913be5eb77efb2c0c9">getNetReactionStoichiometry</a> (const <aclass="el"href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>&reaction)</td></tr>
<trclass="memdesc:a8c29d8bbde407e913be5eb77efb2c0c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Gets the net stoichiometry for a given reaction. <br/></td></tr>
<trclass="memdesc:acdce8d87e23a2cd1504bc9472e538c0f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Synchronizes the internal maps. <br/></td></tr>
<trclass="memdesc:aedf42d83bfcc28313b6b6454034d2efa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Collects the unique species in the network. <br/></td></tr>
<trclass="memdesc:a26602e1b3c610780a47b5a6511d6d567"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Populates the reaction ID map. <br/></td></tr>
<trclass="memdesc:a47202c43342b96480070874bffce1391"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Populates the species-to-index map. <br/></td></tr>
<trclass="memdesc:a5a5458ed01923124f2d7e1f04f32f138"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Reserves space for the Jacobian matrix. <br/></td></tr>
<trclass="memdesc:a95563f6bc86007d9ee053a0f1e15b889"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Records the AD tape for the right-hand side of the ODE. <br/></td></tr>
<trclass="memdesc:acf4cfccea20f5cb31c9886bf233a28be"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Validates mass and charge conservation across all reactions. <br/></td></tr>
<trclass="memdesc:aeeafeab40a5f4dbfae78bdc87e25e93f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Validates the composition against the current reaction set. <br/></td></tr>
<trclass="memitem:a5e96b5a0b34c8932f0e14eabda57f1a4"><tdclass="memTemplItemLeft"align="right"valign="top">T </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="#a5e96b5a0b34c8932f0e14eabda57f1a4">calculateMolarReactionFlow</a> (const <aclass="el"href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>&reaction, const std::vector< T >&Y, const T T9, const T rho) const</td></tr>
<trclass="memdesc:a5e96b5a0b34c8932f0e14eabda57f1a4"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates the molar reaction flow for a given reaction. <br/></td></tr>
<trclass="memitem:af41df9ce979b6410e12642cb093916c9"><tdclass="memTemplItemLeft"align="right"valign="top"><aclass="el"href="structgridfire_1_1_step_derivatives.html">StepDerivatives</a>< T > </td><tdclass="memTemplItemRight"valign="bottom"><aclass="el"href="#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a> (const std::vector< T >&Y_in, T T9, T rho) const</td></tr>
<trclass="memdesc:af41df9ce979b6410e12642cb093916c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates all derivatives (dY/dt) and the energy generation rate. <br/></td></tr>
<trclass="memdesc:aaf4d54e4b774ab8ec8eabec006579d31"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates all derivatives (dY/dt) and the energy generation rate (double precision). <br/></td></tr>
<trclass="memdesc:a71a3d1181b90c3becdc5d9a3da05b9c9"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Calculates all derivatives (dY/dt) and the energy generation rate (automatic differentiation). <br/></td></tr>
<trclass="memdesc:acb7c4f5108b0efeae48ad15598e808c3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Set of REACLIB reactions in the network. <br/></td></tr>
<trclass="memdesc:a5d6cc63b99b467c2a976d1fbaaa1dfa3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Map from reaction ID to REACLIBReaction. //PERF: This makes copies of REACLIBReaction and could be a performance bottleneck. <br/></td></tr>
<trclass="memdesc:a92d26068ba139e47d335f5fe9e2814cc"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Vector of unique species in the network. <br/></td></tr>
<trclass="memdesc:a30e09ed0bce6aa5fc89beaa316a7b827"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Map from species name to Species object. <br/></td></tr>
<trclass="memdesc:ad8237c252145a75092202d00f5e1ddf7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Map from species to their index in the stoichiometry matrix. <br/></td></tr>
<trclass="memitem:ad1cb5fd32efc37668e2d9ecf0c72ad24"id="r_ad1cb5fd32efc37668e2d9ecf0c72ad24"><tdclass="memItemLeft"align="right"valign="top">boost::numeric::ublas::compressed_matrix< int > </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="#ad1cb5fd32efc37668e2d9ecf0c72ad24">m_stoichiometryMatrix</a></td></tr>
<trclass="memdesc:ad1cb5fd32efc37668e2d9ecf0c72ad24"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Stoichiometry matrix (species x reactions). <br/></td></tr>
<trclass="memdesc:a2e22b111f6d00ecc9e3804a71f1ce876"><tdclass="mdescLeft"> </td><tdclass="mdescRight">CppAD function for the right-hand side of the ODE. <br/></td></tr>
<trclass="memdesc:a52edc3e88f1e8fc497e1e63972d63c80"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Screening type for the reaction network. Default to no screening. <br/></td></tr>
<trclass="memdesc:a191cff35402d3c97c82c5c966a39d0de"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Flag to enable or disable using precomputed reactions for efficiency. Mathematically, this should not change the results. Generally end users should not need to change this. <br/></td></tr>
<trclass="memdesc:a5d431d5385b1219ba29689eb29601ea3"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Precomputed reactions for efficiency. <br/></td></tr>
<divclass="textblock"><p>A reaction network engine that uses a graph-based representation. </p>
<p>The <aclass="el"href="classgridfire_1_1_graph_engine.html"title="A reaction network engine that uses a graph-based representation.">GraphEngine</a> class implements the <aclass="el"href="classgridfire_1_1_dynamic_engine.html"title="Abstract class for engines supporting Jacobian and stoichiometry operations.">DynamicEngine</a> interface using a graph-based representation of the reaction network. It uses sparse matrices for efficient storage and computation of the stoichiometry and Jacobian matrices. Automatic differentiation (AD) is used to calculate the Jacobian matrix.</p>
<p>The engine supports:</p><ul>
<li>Calculation of the right-hand side (dY/dt) and energy generation rate.</li>
<li>Generation and access to the Jacobian matrix.</li>
<li>Generation and access to the stoichiometry matrix.</li>
<li>Calculation of molar reaction flows.</li>
<li>Access to the set of logical reactions in the network.</li>
<li>Computation of timescales for each species.</li>
<li>Exporting the network to DOT and CSV formats for visualization and analysis.</li>
</ul>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="engine__abstract_8h.html"title="Abstract interfaces for reaction network engines in GridFire.">engine_abstract.h</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00090">90</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<p>Constructs a <aclass="el"href="classgridfire_1_1_graph_engine.html"title="A reaction network engine that uses a graph-based representation.">GraphEngine</a> from a composition. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">composition</td><td>The composition of the material.</td></tr>
</table>
</dd>
</dl>
<p>This constructor builds the reaction network from the given composition using the <code>build_reaclib_nuclear_network</code> function.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00026">26</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Constructs a <aclass="el"href="classgridfire_1_1_graph_engine.html"title="A reaction network engine that uses a graph-based representation.">GraphEngine</a> from a set of reactions. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">reactions</td><td>The set of reactions to use in the network.</td></tr>
</table>
</dd>
</dl>
<p>This constructor uses the given set of reactions to construct the reaction network. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00034">34</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Calculates all derivatives (dY/dt) and the energy generation rate (automatic differentiation). </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">Y_in</td><td>Vector of current abundances for all species. </td></tr>
<tr><tdclass="paramname">T9</td><td>Temperature in units of 10^9 K. </td></tr>
<tr><tdclass="paramname">rho</td><td>Density in g/cm^3. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="structgridfire_1_1_step_derivatives.html"title="Structure holding derivatives and energy generation for a network step.">StepDerivatives<ADDouble></a> containing dY/dt and energy generation rate.</dd></dl>
<p>This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state using automatic differentiation. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00352">352</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Calculates all derivatives (dY/dt) and the energy generation rate (double precision). </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">Y_in</td><td>Vector of current abundances for all species. </td></tr>
<tr><tdclass="paramname">T9</td><td>Temperature in units of 10^9 K. </td></tr>
<tr><tdclass="paramname">rho</td><td>Density in g/cm^3. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="structgridfire_1_1_step_derivatives.html"title="Structure holding derivatives and energy generation for a network step.">StepDerivatives<double></a> containing dY/dt and energy generation rate.</dd></dl>
<p>This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state using double precision arithmetic. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00344">344</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<tdclass="memname"><aclass="el"href="structgridfire_1_1_step_derivatives.html">StepDerivatives</a>< T > gridfire::GraphEngine::calculateAllDerivatives </td>
<td>(</td>
<tdclass="paramtype">const std::vector< T >&</td><tdclass="paramname"><spanclass="paramname"><em>Y_in</em></span>, </td>
<tr><tdclass="paramname">T</td><td>The numeric type to use for the calculation. </td></tr>
</table>
</dd>
</dl>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">Y_in</td><td>Vector of current abundances for all species. </td></tr>
<tr><tdclass="paramname">T9</td><td>Temperature in units of 10^9 K. </td></tr>
<tr><tdclass="paramname">rho</td><td>Density in g/cm^3. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="structgridfire_1_1_step_derivatives.html"title="Structure holding derivatives and energy generation for a network step.">StepDerivatives<T></a> containing dY/dt and energy generation rate.</dd></dl>
<p>This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00521">521</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00223">223</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00377">377</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00589">589</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<p>Calculates the right-hand side (dY/dt) and energy generation rate. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">Y</td><td>Vector of current abundances for all species. </td></tr>
<tr><tdclass="paramname">T9</td><td>Temperature in units of 10^9 K. </td></tr>
<tr><tdclass="paramname">rho</td><td>Density in g/cm^3. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd><aclass="el"href="structgridfire_1_1_step_derivatives.html"title="Structure holding derivatives and energy generation for a network step.">StepDerivatives<double></a> containing dY/dt and energy generation rate.</dd></dl>
<p>This method calculates the time derivatives of all species and the specific nuclear energy generation rate for the current state.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="structgridfire_1_1_step_derivatives.html"title="Structure holding derivatives and energy generation for a network step.">StepDerivatives</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00042">42</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00072">72</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Exports the network to a CSV file for analysis. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">filename</td><td>The name of the CSV file to create.</td></tr>
</table>
</dd>
</dl>
<p>This method generates a CSV file containing information about the reactions in the network, including the reactants, products, Q-value, and reaction rate coefficients.</p>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">std::runtime_error</td><td>If the file cannot be opened for writing.</td></tr>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00484">484</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Exports the network to a DOT file for visualization. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">filename</td><td>The name of the DOT file to create.</td></tr>
</table>
</dd>
</dl>
<p>This method generates a DOT file that can be used to visualize the reaction network as a graph. The DOT file can be converted to a graphical image using Graphviz.</p>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">std::runtime_error</td><td>If the file cannot be opened for writing.</td></tr>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00436">436</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Generates the Jacobian matrix for the current state. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">Y</td><td>Vector of current abundances. </td></tr>
<tr><tdclass="paramname">T9</td><td>Temperature in units of 10^9 K. </td></tr>
<tr><tdclass="paramname">rho</td><td>Density in g/cm^3.</td></tr>
</table>
</dd>
</dl>
<p>This method computes and stores the Jacobian matrix (∂(dY/dt)_i/∂Y_j) for the current state using automatic differentiation. The matrix can then be accessed via <code><aclass="el"href="#a303e6093591cde91430f866a04a8be7c"title="Gets an entry from the previously generated Jacobian matrix.">getJacobianMatrixEntry()</a></code>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="#a303e6093591cde91430f866a04a8be7c"title="Gets an entry from the previously generated Jacobian matrix.">getJacobianMatrixEntry()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00386">386</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00303">303</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Gets an entry from the previously generated Jacobian matrix. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">i</td><td>Row index (species index). </td></tr>
<tr><tdclass="paramname">j</td><td>Column index (species index). </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Value of the Jacobian matrix at (i, j).</dd></dl>
<p>The Jacobian must have been generated by <code><aclass="el"href="#ae347ff0316e532e0298ec8c913908105"title="Generates the Jacobian matrix for the current state.">generateJacobianMatrix()</a></code> before calling this.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="#ae347ff0316e532e0298ec8c913908105"title="Generates the Jacobian matrix for the current state.">generateJacobianMatrix()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00419">419</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00423">423</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00134">134</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00128">128</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<divclass="ttc"id="anamespacegridfire_1_1screening_html_aa82aafbc4f8c28d0a75b60798e3a7d25"><divclass="ttname"><ahref="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">gridfire::screening::ScreeningType</a></div><divclass="ttdeci">ScreeningType</div><divclass="ttdoc">Enumerates the available plasma screening models.</div><divclass="ttdef"><b>Definition</b><ahref="screening__types_8h_source.html#l00015">screening_types.h:15</a></div></div>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00365">365</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00538">538</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Gets an entry from the stoichiometry matrix. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">speciesIndex</td><td>Index of the species. </td></tr>
<tr><tdclass="paramname">reactionIndex</td><td>Index of the reaction. </td></tr>
</table>
</dd>
</dl>
<dlclass="section return"><dt>Returns</dt><dd>Stoichiometric coefficient for the species in the reaction.</dd></dl>
<p>The stoichiometry matrix must have been generated by <code><aclass="el"href="#aed726d36ee2b3796beff6067a1e4db38"title="Generates the stoichiometry matrix for the network.">generateStoichiometryMatrix()</a></code>.</p>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="#aed726d36ee2b3796beff6067a1e4db38"title="Generates the stoichiometry matrix for the network.">generateStoichiometryMatrix()</a></dd></dl>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00429">429</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00140">140</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00373">373</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00101">101</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00110">110</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00603">603</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Records the AD tape for the right-hand side of the ODE. </p>
<p>This method records the AD tape for the right-hand side of the ODE, which is used to calculate the Jacobian matrix using automatic differentiation.</p>
<dlclass="exception"><dt>Exceptions</dt><dd>
<tableclass="exception">
<tr><tdclass="paramname">std::runtime_error</td><td>If there are no species in the network. </td></tr>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00558">558</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>This method reserves space for the Jacobian matrix, which is used to store the partial derivatives of the right-hand side of the ODE with respect to the species abundances. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00117">117</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00369">369</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<tr><tdclass="paramname">model</td><td>The type of screening model to use for reaction rate calculations.</td></tr>
</table>
</dd>
</dl>
<p>This method allows changing the screening model at runtime. Screening corrections account for the electrostatic shielding of nuclei by electrons, which affects reaction rates in dense stellar plasmas.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00360">360</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>This method synchronizes the internal maps used by the engine, including the species map, reaction ID map, and species-to-index map. It also generates the stoichiometry matrix and records the AD tape. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00062">62</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<tr><tdclass="paramname">netIn</td><td>A struct containing the current network input, such as temperature, density, and composition.</td></tr>
</table>
</dd>
</dl>
<p>This method is intended to be implemented by derived classes to update their internal state based on the provided network conditions. For example, an adaptive engine might use this to re-evaluate which reactions and species are active. For other engines that do not support manually updating, this method might do nothing.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00554">554</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Validates the composition against the current reaction set. </p>
<dlclass="params"><dt>Parameters</dt><dd>
<tableclass="params">
<tr><tdclass="paramname">composition</td><td>The composition to validate. </td></tr>
<tr><tdclass="paramname">culling</td><td>The culling threshold to use. </td></tr>
<tr><tdclass="paramname">T9</td><td>The temperature to use.</td></tr>
</table>
</dd>
</dl>
<p>This method validates the composition against the current reaction set. If the composition is not compatible with the reaction set, the reaction set is rebuilt from the composition. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00203">203</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<p>Validates mass and charge conservation across all reactions. </p>
<dlclass="section return"><dt>Returns</dt><dd>True if all reactions conserve mass and charge, false otherwise.</dd></dl>
<p>This method checks that all reactions in the network conserve mass and charge. If any reaction does not conserve mass or charge, an error message is logged and false is returned. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8cpp_source.html#l00148">148</a> of file <aclass="el"href="engine__graph_8cpp_source.html">engine_graph.cpp</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00327">327</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00330">330</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00340">340</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00328">328</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00335">335</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00336">336</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00349">349</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00333">333</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00332">332</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00342">342</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00345">345</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00344">344</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00337">337</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00339">339</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<p>Flag to enable or disable using precomputed reactions for efficiency. Mathematically, this should not change the results. Generally end users should not need to change this. </p>
<pclass="definition">Definition at line <aclass="el"href="engine__graph_8h_source.html#l00347">347</a> of file <aclass="el"href="engine__graph_8h_source.html">engine_graph.h</a>.</p>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.13.2 </li>