docs(docs): added extensive docs
This commit is contained in:
@@ -141,331 +141,375 @@ $(function(){initNavTree('engine__graph_8h_source.html',''); initResizable(true)
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06"> 56</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06">MIN_ABUNDANCE_THRESHOLD</a> = 1e-18;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span></div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="namespacegridfire.html#ae01b1738df1921db565bcbd68dd6cf64"> 64</a></span> <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="namespacegridfire.html#ae01b1738df1921db565bcbd68dd6cf64">MIN_JACOBIAN_THRESHOLD</a> = 1e-24;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span></div>
|
||||
<div class="foldopen" id="foldopen00089" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html"> 89</a></span> <span class="keyword">class </span><a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a> final : <span class="keyword">public</span> <a class="code hl_class" href="classgridfire_1_1_dynamic_engine.html">DynamicEngine</a>{</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keyword">explicit</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a>(<span class="keyword">const</span> fourdst::composition::Composition &composition);</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">explicit</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a>(<a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a> reactions);</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<double></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8b3baf29829c7ae0a61430ea70632bbf">calculateRHSAndEnergy</a>(</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#ae347ff0316e532e0298ec8c913908105">generateJacobianMatrix</a>(</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> ) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aed726d36ee2b3796beff6067a1e4db38">generateStoichiometryMatrix</a>() <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">const</span> std::vector<double>&Y,</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> [[nodiscard]] <span class="keyword">const</span> std::vector<fourdst::atomic::Species>& <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a0ed390f3e598ebba4e245ac90bb78767">getNetworkSpecies</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> [[nodiscard]] <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a>& <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#ad45650d10fc5dff1673ae3f806d067da">getNetworkReactions</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span></div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a303e6093591cde91430f866a04a8be7c">getJacobianMatrixEntry</a>(</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> <span class="keyword">const</span> <span class="keywordtype">int</span> i,</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keyword">const</span> <span class="keywordtype">int</span> j</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span></div>
|
||||
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"> 212</span> [[nodiscard]] <span class="keyword">static</span> std::unordered_map<fourdst::atomic::Species, int> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8c29d8bbde407e913be5eb77efb2c0c9">getNetReactionStoichiometry</a>(</div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a></div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> );</div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span></div>
|
||||
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"> 227</span> [[nodiscard]] <span class="keywordtype">int</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a6b5feaf788bade212b7c8df7ac8c8152">getStoichiometryMatrixEntry</a>(</div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> <span class="keyword">const</span> <span class="keywordtype">int</span> speciesIndex,</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keyword">const</span> <span class="keywordtype">int</span> reactionIndex</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span></div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"> 243</span> [[nodiscard]] std::unordered_map<fourdst::atomic::Species, double> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a26215593544c3a52597194602e4e25dd">getSpeciesTimescales</a>(</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> </div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a51b4cedf9b00de79fb6eef243631b04d">update</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structgridfire_1_1_net_in.html">NetIn</a>& netIn) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span></div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aa6202cee0c3c481eda77cc9a91bc126b">involvesSpecies</a>(</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> <span class="keyword">const</span> fourdst::atomic::Species& species</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span></div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"> 277</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#adac8c7d62bae76e17fc060e86dadd929">exportToDot</a>(</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keyword">const</span> std::string& filename</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span></div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a832e2fe066381811a3e0464806ff5e95">exportToCSV</a>(</div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keyword">const</span> std::string& filename</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> </div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8110e687844f921438bb517e1d8ce62f">setScreeningModel</a>(<a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a>) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> </div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> [[nodiscard]] <a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a697f2004e0d02c59e83c7890742d7c9a">getScreeningModel</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span></div>
|
||||
<div class="foldopen" id="foldopen00090" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html"> 90</a></span> <span class="keyword">class </span><a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a> final : <span class="keyword">public</span> <a class="code hl_class" href="classgridfire_1_1_dynamic_engine.html">DynamicEngine</a>{</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">explicit</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a>(<span class="keyword">const</span> fourdst::composition::Composition &composition);</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span></div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keyword">explicit</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">GraphEngine</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a> &reactions);</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span></div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<double></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8b3baf29829c7ae0a61430ea70632bbf">calculateRHSAndEnergy</a>(</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#ae347ff0316e532e0298ec8c913908105">generateJacobianMatrix</a>(</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> ) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aed726d36ee2b3796beff6067a1e4db38">generateStoichiometryMatrix</a>() <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keyword">const</span> std::vector<double>&Y,</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> [[nodiscard]] <span class="keyword">const</span> std::vector<fourdst::atomic::Species>& <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a0ed390f3e598ebba4e245ac90bb78767">getNetworkSpecies</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> [[nodiscard]] <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a>& <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#ad45650d10fc5dff1673ae3f806d067da">getNetworkReactions</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span></div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a303e6093591cde91430f866a04a8be7c">getJacobianMatrixEntry</a>(</div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="keyword">const</span> <span class="keywordtype">int</span> i,</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keyword">const</span> <span class="keywordtype">int</span> j</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span></div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span> [[nodiscard]] <span class="keyword">static</span> std::unordered_map<fourdst::atomic::Species, int> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8c29d8bbde407e913be5eb77efb2c0c9">getNetReactionStoichiometry</a>(</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a></div>
|
||||
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno"> 215</span> );</div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"> 216</span></div>
|
||||
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno"> 228</span> [[nodiscard]] <span class="keywordtype">int</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a6b5feaf788bade212b7c8df7ac8c8152">getStoichiometryMatrixEntry</a>(</div>
|
||||
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno"> 229</span> <span class="keyword">const</span> <span class="keywordtype">int</span> speciesIndex,</div>
|
||||
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno"> 230</span> <span class="keyword">const</span> <span class="keywordtype">int</span> reactionIndex</div>
|
||||
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"> 231</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span></div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span> [[nodiscard]] std::unordered_map<fourdst::atomic::Species, double> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a26215593544c3a52597194602e4e25dd">getSpeciesTimescales</a>(</div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> <span class="keyword">const</span> std::vector<double>& Y,</div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"> 247</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span> ) <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
|
||||
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno"> 250</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a51b4cedf9b00de79fb6eef243631b04d">update</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structgridfire_1_1_net_in.html">NetIn</a>& netIn) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"> 251</span></div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aa6202cee0c3c481eda77cc9a91bc126b">involvesSpecies</a>(</div>
|
||||
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno"> 259</span> <span class="keyword">const</span> fourdst::atomic::Species& species</div>
|
||||
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno"> 260</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"> 261</span></div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#adac8c7d62bae76e17fc060e86dadd929">exportToDot</a>(</div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> <span class="keyword">const</span> std::string& filename</div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"> 281</span></div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a832e2fe066381811a3e0464806ff5e95">exportToCSV</a>(</div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span> <span class="keyword">const</span> std::string& filename</div>
|
||||
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno"> 300</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"> 301</span> </div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a8110e687844f921438bb517e1d8ce62f">setScreeningModel</a>(<a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a>) <span class="keyword">override</span>;</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span> </div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span> [[nodiscard]] <a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a697f2004e0d02c59e83c7890742d7c9a">getScreeningModel</a>() <span class="keyword">const override</span>;</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span> </div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3"> 307</a></span> <a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>; </div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3"> 308</a></span> std::unordered_map<std::string_view, reaction::Reaction*> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3">m_reactionIDMap</a>; </div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a6c5410878496abc349ba30b691cdf0f1">setPrecomputation</a>(<span class="keywordtype">bool</span> precompute);</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span> </div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a015f8975701f028c29835d3a9794e00f">isPrecomputationEnabled</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span> </div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc"> 310</a></span> std::vector<fourdst::atomic::Species> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>; </div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827"> 311</a></span> std::unordered_map<std::string_view, fourdst::atomic::Species> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">m_networkSpeciesMap</a>; </div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7"> 312</a></span> std::unordered_map<fourdst::atomic::Species, size_t> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>; </div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24"> 314</a></span> boost::numeric::ublas::compressed_matrix<int> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">m_stoichiometryMatrix</a>; </div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910"> 315</a></span> boost::numeric::ublas::compressed_matrix<double> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910">m_jacobianMatrix</a>; </div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876"> 317</a></span> CppAD::ADFun<double> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876">m_rhsADFun</a>; </div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> </div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80"> 319</a></span> <a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">m_screeningType</a> = <a class="code hl_enumvalue" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71">screening::ScreeningType::BARE</a>; </div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210"> 320</a></span> std::unique_ptr<screening::ScreeningModel> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">m_screeningModel</a> = <a class="code hl_function" href="namespacegridfire_1_1screening.html#a6ca8556d27ac373e176f5b23437c416e">screening::selectScreeningModel</a>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">m_screeningType</a>);</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> </div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18"> 322</a></span> Config& <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18">m_config</a> = Config::getInstance();</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1"> 323</a></span> Constants& <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1">m_constants</a> = Constants::getInstance(); </div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53"> 324</a></span> quill::Logger* <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53">m_logger</a> = LogManager::getInstance().getLogger(<span class="stringliteral">"log"</span>);</div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span> <span class="keyword">private</span>:</div>
|
||||
<div class="foldopen" id="foldopen00311" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html"> 311</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html">PrecomputedReaction</a> {</div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a93635f6940d3534e949f402503c3d497"> 312</a></span> <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a93635f6940d3534e949f402503c3d497">reaction_index</a>;</div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a510e380116e2e6d9158cf00fedac2666"> 313</a></span> std::vector<size_t> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a510e380116e2e6d9158cf00fedac2666">unique_reactant_indices</a>;</div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a03d596c88289e21e7bd18711e3a1f275"> 314</a></span> std::vector<int> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a03d596c88289e21e7bd18711e3a1f275">reactant_powers</a>;</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#ac42504e868c0b9fd9ac9a405ea739f0e"> 315</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#ac42504e868c0b9fd9ac9a405ea739f0e">symmetry_factor</a>;</div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a3e2e67e532970738d20491ea56b170f3"> 316</a></span> std::vector<size_t> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a3e2e67e532970738d20491ea56b170f3">affected_species_indices</a>;</div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a7a7e9167b19e339e0d69544b9c00e79c"> 317</a></span> std::vector<int> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a7a7e9167b19e339e0d69544b9c00e79c">stoichiometric_coefficients</a>;</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span> </div>
|
||||
<div class="foldopen" id="foldopen00320" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1constants.html"> 320</a></span> <span class="keyword">struct </span><a class="code hl_struct" href="structgridfire_1_1_graph_engine_1_1constants.html">constants</a> {</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1constants.html#a3597bc632a5dd50aaa0044d8c18ca423"> 321</a></span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1constants.html#a3597bc632a5dd50aaa0044d8c18ca423">u</a> = Constants::getInstance().get(<span class="stringliteral">"u"</span>).value; </div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1constants.html#a5ccc874d6704615e0ce54c14dc67699d"> 322</a></span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1constants.html#a5ccc874d6704615e0ce54c14dc67699d">Na</a> = Constants::getInstance().get(<span class="stringliteral">"N_a"</span>).value; </div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"><a class="line" href="structgridfire_1_1_graph_engine_1_1constants.html#a8bea6e348699c1aea93d17bb56739306"> 323</a></span> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code hl_variable" href="structgridfire_1_1_graph_engine_1_1constants.html#a8bea6e348699c1aea93d17bb56739306">c</a> = Constants::getInstance().get(<span class="stringliteral">"c"</span>).value; </div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span> </div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#acdce8d87e23a2cd1504bc9472e538c0f">syncInternalMaps</a>();</div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"> 335</span></div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"> 342</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aedf42d83bfcc28313b6b6454034d2efa">collectNetworkSpecies</a>();</div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span></div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a26602e1b3c610780a47b5a6511d6d567">populateReactionIDMap</a>();</div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span></div>
|
||||
<div class="line"><a id="l00358" name="l00358"></a><span class="lineno"> 358</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a47202c43342b96480070874bffce1391">populateSpeciesToIndexMap</a>();</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span></div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a5a5458ed01923124f2d7e1f04f32f138">reserveJacobianMatrix</a>();</div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18"> 327</a></span> Config& <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18">m_config</a> = Config::getInstance();</div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53"> 328</a></span> quill::Logger* <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53">m_logger</a> = LogManager::getInstance().getLogger(<span class="stringliteral">"log"</span>);</div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> </div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e"> 330</a></span> <a class="code hl_struct" href="structgridfire_1_1_graph_engine_1_1constants.html">constants</a> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e">m_constants</a>;</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3"> 332</a></span> <a class="code hl_typedef" href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">reaction::LogicalReactionSet</a> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>; </div>
|
||||
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3"> 333</a></span> std::unordered_map<std::string_view, reaction::Reaction*> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3">m_reactionIDMap</a>; </div>
|
||||
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno"> 334</span> </div>
|
||||
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc"> 335</a></span> std::vector<fourdst::atomic::Species> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>; </div>
|
||||
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827"> 336</a></span> std::unordered_map<std::string_view, fourdst::atomic::Species> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">m_networkSpeciesMap</a>; </div>
|
||||
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7"> 337</a></span> std::unordered_map<fourdst::atomic::Species, size_t> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>; </div>
|
||||
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno"> 338</span> </div>
|
||||
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24"> 339</a></span> boost::numeric::ublas::compressed_matrix<int> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">m_stoichiometryMatrix</a>; </div>
|
||||
<div class="line"><a id="l00340" name="l00340"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910"> 340</a></span> boost::numeric::ublas::compressed_matrix<double> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910">m_jacobianMatrix</a>; </div>
|
||||
<div class="line"><a id="l00341" name="l00341"></a><span class="lineno"> 341</span> </div>
|
||||
<div class="line"><a id="l00342" name="l00342"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876"> 342</a></span> CppAD::ADFun<double> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876">m_rhsADFun</a>; </div>
|
||||
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"> 343</span> </div>
|
||||
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80"> 344</a></span> <a class="code hl_enumeration" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">screening::ScreeningType</a> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">m_screeningType</a> = <a class="code hl_enumvalue" href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71">screening::ScreeningType::BARE</a>; </div>
|
||||
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210"> 345</a></span> std::unique_ptr<screening::ScreeningModel> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">m_screeningModel</a> = <a class="code hl_function" href="namespacegridfire_1_1screening.html#a6ca8556d27ac373e176f5b23437c416e">screening::selectScreeningModel</a>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">m_screeningType</a>);</div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"> 346</span> </div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a191cff35402d3c97c82c5c966a39d0de"> 347</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a191cff35402d3c97c82c5c966a39d0de">m_usePrecomputation</a> = <span class="keyword">true</span>; </div>
|
||||
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno"> 348</span> </div>
|
||||
<div class="line"><a id="l00349" name="l00349"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a5d431d5385b1219ba29689eb29601ea3"> 349</a></span> std::vector<PrecomputedReaction> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a5d431d5385b1219ba29689eb29601ea3">m_precomputedReactions</a>; </div>
|
||||
<div class="line"><a id="l00350" name="l00350"></a><span class="lineno"> 350</span> </div>
|
||||
<div class="line"><a id="l00351" name="l00351"></a><span class="lineno"> 351</span> <span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00359" name="l00359"></a><span class="lineno"> 359</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#acdce8d87e23a2cd1504bc9472e538c0f">syncInternalMaps</a>();</div>
|
||||
<div class="line"><a id="l00360" name="l00360"></a><span class="lineno"> 360</span></div>
|
||||
<div class="line"><a id="l00367" name="l00367"></a><span class="lineno"> 367</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aedf42d83bfcc28313b6b6454034d2efa">collectNetworkSpecies</a>();</div>
|
||||
<div class="line"><a id="l00368" name="l00368"></a><span class="lineno"> 368</span></div>
|
||||
<div class="line"><a id="l00378" name="l00378"></a><span class="lineno"> 378</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a95563f6bc86007d9ee053a0f1e15b889">recordADTape</a>();</div>
|
||||
<div class="line"><a id="l00379" name="l00379"></a><span class="lineno"> 379</span></div>
|
||||
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno"> 389</span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#acf4cfccea20f5cb31c9886bf233a28be">validateConservation</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00390" name="l00390"></a><span class="lineno"> 390</span></div>
|
||||
<div class="line"><a id="l00402" name="l00402"></a><span class="lineno"> 402</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aeeafeab40a5f4dbfae78bdc87e25e93f">validateComposition</a>(</div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <span class="keyword">const</span> fourdst::composition::Composition &composition,</div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> <span class="keywordtype">double</span> culling,</div>
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> <span class="keywordtype">double</span> T9</div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span> );</div>
|
||||
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno"> 407</span></div>
|
||||
<div class="line"><a id="l00421" name="l00421"></a><span class="lineno"> 421</span> <span class="keyword">template</span> <IsArithmeticOrAD T></div>
|
||||
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno"> 422</span> T <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno"> 423</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a> &<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno"> 424</span> <span class="keyword">const</span> std::vector<T> &Y,</div>
|
||||
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno"> 425</span> <span class="keyword">const</span> T T9,</div>
|
||||
<div class="line"><a id="l00426" name="l00426"></a><span class="lineno"> 426</span> <span class="keyword">const</span> T rho</div>
|
||||
<div class="line"><a id="l00427" name="l00427"></a><span class="lineno"> 427</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00428" name="l00428"></a><span class="lineno"> 428</span></div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span> <span class="keyword">template</span><IsArithmeticOrAD T></div>
|
||||
<div class="line"><a id="l00442" name="l00442"></a><span class="lineno"> 442</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00443" name="l00443"></a><span class="lineno"> 443</span> <span class="keyword">const</span> std::vector<T> &Y_in,</div>
|
||||
<div class="line"><a id="l00444" name="l00444"></a><span class="lineno"> 444</span> T T9,</div>
|
||||
<div class="line"><a id="l00445" name="l00445"></a><span class="lineno"> 445</span> T rho</div>
|
||||
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno"> 446</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno"> 447</span></div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<double></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> <span class="keyword">const</span> std::vector<double>& Y_in,</div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno"> 463</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno"> 464</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno"> 465</span></div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<ADDouble></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> <span class="keyword">const</span> std::vector<ADDouble>& Y_in,</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire.html#a1121d0b2d005195333412559fa29d3cc">ADDouble</a> &T9,</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire.html#a1121d0b2d005195333412559fa29d3cc">ADDouble</a> &rho</div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"> 482</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> };</div>
|
||||
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno"> 375</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a26602e1b3c610780a47b5a6511d6d567">populateReactionIDMap</a>();</div>
|
||||
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno"> 376</span></div>
|
||||
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno"> 383</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a47202c43342b96480070874bffce1391">populateSpeciesToIndexMap</a>();</div>
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"> 384</span></div>
|
||||
<div class="line"><a id="l00392" name="l00392"></a><span class="lineno"> 392</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a5a5458ed01923124f2d7e1f04f32f138">reserveJacobianMatrix</a>();</div>
|
||||
<div class="line"><a id="l00393" name="l00393"></a><span class="lineno"> 393</span></div>
|
||||
<div class="line"><a id="l00403" name="l00403"></a><span class="lineno"> 403</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a95563f6bc86007d9ee053a0f1e15b889">recordADTape</a>();</div>
|
||||
<div class="line"><a id="l00404" name="l00404"></a><span class="lineno"> 404</span> </div>
|
||||
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno"> 405</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a92644bc333bff69c5685be4552ca12fd">precomputeNetwork</a>();</div>
|
||||
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno"> 406</span></div>
|
||||
<div class="line"><a id="l00416" name="l00416"></a><span class="lineno"> 416</span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#acf4cfccea20f5cb31c9886bf233a28be">validateConservation</a>() <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00417" name="l00417"></a><span class="lineno"> 417</span></div>
|
||||
<div class="line"><a id="l00429" name="l00429"></a><span class="lineno"> 429</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#aeeafeab40a5f4dbfae78bdc87e25e93f">validateComposition</a>(</div>
|
||||
<div class="line"><a id="l00430" name="l00430"></a><span class="lineno"> 430</span> <span class="keyword">const</span> fourdst::composition::Composition &composition,</div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"> 431</span> <span class="keywordtype">double</span> culling,</div>
|
||||
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> <span class="keywordtype">double</span> T9</div>
|
||||
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno"> 433</span> );</div>
|
||||
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno"> 434</span> </div>
|
||||
<div class="line"><a id="l00435" name="l00435"></a><span class="lineno"> 435</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<double></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a63639f4430d0889605c10839a6f32af9">calculateAllDerivativesUsingPrecomputation</a>(</div>
|
||||
<div class="line"><a id="l00436" name="l00436"></a><span class="lineno"> 436</span> <span class="keyword">const</span> std::vector<double> &Y_in,</div>
|
||||
<div class="line"><a id="l00437" name="l00437"></a><span class="lineno"> 437</span> <span class="keyword">const</span> std::vector<double>& bare_rates,</div>
|
||||
<div class="line"><a id="l00438" name="l00438"></a><span class="lineno"> 438</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00439" name="l00439"></a><span class="lineno"> 439</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00440" name="l00440"></a><span class="lineno"> 440</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00441" name="l00441"></a><span class="lineno"> 441</span></div>
|
||||
<div class="line"><a id="l00455" name="l00455"></a><span class="lineno"> 455</span> <span class="keyword">template</span> <IsArithmeticOrAD T></div>
|
||||
<div class="line"><a id="l00456" name="l00456"></a><span class="lineno"> 456</span> T <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00457" name="l00457"></a><span class="lineno"> 457</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a> &<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00458" name="l00458"></a><span class="lineno"> 458</span> <span class="keyword">const</span> std::vector<T> &Y,</div>
|
||||
<div class="line"><a id="l00459" name="l00459"></a><span class="lineno"> 459</span> <span class="keyword">const</span> T T9,</div>
|
||||
<div class="line"><a id="l00460" name="l00460"></a><span class="lineno"> 460</span> <span class="keyword">const</span> T rho</div>
|
||||
<div class="line"><a id="l00461" name="l00461"></a><span class="lineno"> 461</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno"> 462</span></div>
|
||||
<div class="line"><a id="l00475" name="l00475"></a><span class="lineno"> 475</span> <span class="keyword">template</span><IsArithmeticOrAD T></div>
|
||||
<div class="line"><a id="l00476" name="l00476"></a><span class="lineno"> 476</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00477" name="l00477"></a><span class="lineno"> 477</span> <span class="keyword">const</span> std::vector<T> &Y_in,</div>
|
||||
<div class="line"><a id="l00478" name="l00478"></a><span class="lineno"> 478</span> T T9,</div>
|
||||
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno"> 479</span> T rho</div>
|
||||
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno"> 480</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno"> 481</span></div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<double></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> <span class="keyword">const</span> std::vector<double>& Y_in,</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> <span class="keyword">const</span> <span class="keywordtype">double</span> T9,</div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="keyword">const</span> <span class="keywordtype">double</span> rho</div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span></div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> [[nodiscard]] <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<ADDouble></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> <span class="keyword">const</span> std::vector<ADDouble>& Y_in,</div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire.html#a1121d0b2d005195333412559fa29d3cc">ADDouble</a> &T9,</div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> <span class="keyword">const</span> <a class="code hl_typedef" href="namespacegridfire.html#a1121d0b2d005195333412559fa29d3cc">ADDouble</a> &rho</div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> ) <span class="keyword">const</span>;</div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> };</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00484" name="l00484"></a><span class="lineno"> 484</span> </div>
|
||||
<div class="line"><a id="l00485" name="l00485"></a><span class="lineno"> 485</span> </div>
|
||||
<div class="line"><a id="l00486" name="l00486"></a><span class="lineno"> 486</span> <span class="keyword">template</span><IsArithmeticOrAD T></div>
|
||||
<div class="foldopen" id="foldopen00487" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00487" name="l00487"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9"> 487</a></span> <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">GraphEngine::calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00488" name="l00488"></a><span class="lineno"> 488</span> <span class="keyword">const</span> std::vector<T> &Y_in, T T9, T rho)<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00489" name="l00489"></a><span class="lineno"> 489</span> std::vector<T> screeningFactors = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">m_screeningModel</a>->calculateScreeningFactors(</div>
|
||||
<div class="line"><a id="l00490" name="l00490"></a><span class="lineno"> 490</span> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>,</div>
|
||||
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno"> 491</span> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>,</div>
|
||||
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno"> 492</span> Y_in,</div>
|
||||
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno"> 493</span> T9,</div>
|
||||
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno"> 494</span> rho</div>
|
||||
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno"> 495</span> );</div>
|
||||
<div class="line"><a id="l00496" name="l00496"></a><span class="lineno"> 496</span> </div>
|
||||
<div class="line"><a id="l00497" name="l00497"></a><span class="lineno"> 497</span> <span class="comment">// --- Setup output derivatives structure ---</span></div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"> 498</span> <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> result;</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>.resize(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(), <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0));</div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span> <span class="comment">// --- AD Pre-setup (flags to control conditionals in an AD safe / branch aware manner) ---</span></div>
|
||||
<div class="line"><a id="l00502" name="l00502"></a><span class="lineno"> 502</span> <span class="comment">// ----- Constants for AD safe calculations ---</span></div>
|
||||
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno"> 503</span> <span class="keyword">const</span> T zero = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0);</div>
|
||||
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno"> 504</span> <span class="keyword">const</span> T one = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno"> 505</span> </div>
|
||||
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno"> 506</span> <span class="comment">// ----- Initialize variables for molar concentration product and thresholds ---</span></div>
|
||||
<div class="line"><a id="l00507" name="l00507"></a><span class="lineno"> 507</span> <span class="comment">// Note: the logic here is that we use CppAD::CondExprLt to test thresholds and if they are less we set the flag</span></div>
|
||||
<div class="line"><a id="l00508" name="l00508"></a><span class="lineno"> 508</span> <span class="comment">// to zero so that the final returned reaction flow is 0. This is as opposed to standard if statements</span></div>
|
||||
<div class="line"><a id="l00509" name="l00509"></a><span class="lineno"> 509</span> <span class="comment">// which create branches that break the AD tape.</span></div>
|
||||
<div class="line"><a id="l00510" name="l00510"></a><span class="lineno"> 510</span> <span class="keyword">const</span> T rho_threshold = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="namespacegridfire.html#ada3c137c014ecd8d06200fea2d1a9f50">MIN_DENSITY_THRESHOLD</a>);</div>
|
||||
<div class="line"><a id="l00511" name="l00511"></a><span class="lineno"> 511</span> </div>
|
||||
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno"> 512</span> <span class="comment">// --- Check if the density is below the threshold where we ignore reactions ---</span></div>
|
||||
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno"> 513</span> T threshold_flag = CppAD::CondExpLt(rho, rho_threshold, zero, one); <span class="comment">// If rho < threshold, set flag to 0</span></div>
|
||||
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno"> 514</span> </div>
|
||||
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno"> 515</span> std::vector<T> Y = Y_in;</div>
|
||||
<div class="line"><a id="l00516" name="l00516"></a><span class="lineno"> 516</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00517" name="l00517"></a><span class="lineno"> 517</span> <span class="comment">// We use CppAD::CondExpLt to handle AD taping and prevent branching</span></div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> <span class="comment">// Note that while this is syntactically more complex this is equivalent to</span></div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> <span class="comment">// if (Y[i] < 0) {Y[i] = 0;}</span></div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <span class="comment">// The issue is that this would introduce a branch which would require the auto diff tape to be re-recorded</span></div>
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"> 521</span> <span class="comment">// each timestep, which is very inefficient.</span></div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> Y[i] = CppAD::CondExpLt(Y[i], zero, zero, Y[i]); <span class="comment">// Ensure no negative abundances</span></div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> }</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> </div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> <span class="keyword">const</span> T u = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1">m_constants</a>.get(<span class="stringliteral">"u"</span>).value); <span class="comment">// Atomic mass unit in grams</span></div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> <span class="keyword">const</span> T N_A = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1">m_constants</a>.get(<span class="stringliteral">"N_a"</span>).value); <span class="comment">// Avogadro's number in mol^-1</span></div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> <span class="keyword">const</span> T c = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1">m_constants</a>.get(<span class="stringliteral">"c"</span>).value); <span class="comment">// Speed of light in cm/s</span></div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> </div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> <span class="comment">// --- SINGLE LOOP OVER ALL REACTIONS ---</span></div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> reactionIndex = 0; reactionIndex < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>.size(); ++reactionIndex) {</div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a> = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>[reactionIndex];</div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> </div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> <span class="comment">// 1. Calculate reaction rate</span></div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> <span class="keyword">const</span> T molarReactionFlow = screeningFactors[reactionIndex] * <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow<T></a>(<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>, Y, T9, rho);</div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> </div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="comment">// 2. Use the rate to update all relevant species derivatives (dY/dt)</span></div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> speciesIndex = 0; speciesIndex < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(); ++speciesIndex) {</div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> <span class="keyword">const</span> T nu_ij = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">m_stoichiometryMatrix</a>(speciesIndex, reactionIndex));</div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>[speciesIndex] += threshold_flag * nu_ij * molarReactionFlow / rho;</div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> }</div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> }</div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> </div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> T massProductionRate = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0); <span class="comment">// [mol][s^-1]</span></div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& [species, index] : <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>) {</div>
|
||||
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> massProductionRate += result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>[index] * species.mass() * u;</div>
|
||||
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> }</div>
|
||||
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> </div>
|
||||
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ab4aeb41be952c7b5844e1ee81fef9008">nuclearEnergyGenerationRate</a> = -massProductionRate * N_A * c * c; <span class="comment">// [cm^2][s^-3] = [erg][s^-1][g^-1]</span></div>
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> </div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> </div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> </div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> <span class="keyword">template</span> <IsArithmeticOrAD T></div>
|
||||
<div class="foldopen" id="foldopen00555" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a5e96b5a0b34c8932f0e14eabda57f1a4"> 555</a></span> T <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">GraphEngine::calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a> &<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> <span class="keyword">const</span> std::vector<T> &Y,</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> <span class="keyword">const</span> T T9,</div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> <span class="keyword">const</span> T rho</div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> )<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> </div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> <span class="comment">// --- Pre-setup (flags to control conditionals in an AD safe / branch aware manner) ---</span></div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <span class="comment">// ----- Constants for AD safe calculations ---</span></div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> <span class="keyword">const</span> T zero = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0);</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> <span class="keyword">const</span> T one = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00518" name="l00518"></a><span class="lineno"> 518</span> </div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"> 519</span> </div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> <span class="keyword">template</span><IsArithmeticOrAD T></div>
|
||||
<div class="foldopen" id="foldopen00521" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00521" name="l00521"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9"> 521</a></span> <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">GraphEngine::calculateAllDerivatives</a>(</div>
|
||||
<div class="line"><a id="l00522" name="l00522"></a><span class="lineno"> 522</span> <span class="keyword">const</span> std::vector<T> &Y_in, T T9, T rho)<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno"> 523</span> std::vector<T> screeningFactors = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">m_screeningModel</a>->calculateScreeningFactors(</div>
|
||||
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno"> 524</span> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>,</div>
|
||||
<div class="line"><a id="l00525" name="l00525"></a><span class="lineno"> 525</span> <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>,</div>
|
||||
<div class="line"><a id="l00526" name="l00526"></a><span class="lineno"> 526</span> Y_in,</div>
|
||||
<div class="line"><a id="l00527" name="l00527"></a><span class="lineno"> 527</span> T9,</div>
|
||||
<div class="line"><a id="l00528" name="l00528"></a><span class="lineno"> 528</span> rho</div>
|
||||
<div class="line"><a id="l00529" name="l00529"></a><span class="lineno"> 529</span> );</div>
|
||||
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno"> 530</span> </div>
|
||||
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno"> 531</span> <span class="comment">// --- Setup output derivatives structure ---</span></div>
|
||||
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno"> 532</span> <a class="code hl_struct" href="structgridfire_1_1_step_derivatives.html">StepDerivatives<T></a> result;</div>
|
||||
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno"> 533</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>.resize(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(), <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0));</div>
|
||||
<div class="line"><a id="l00534" name="l00534"></a><span class="lineno"> 534</span> </div>
|
||||
<div class="line"><a id="l00535" name="l00535"></a><span class="lineno"> 535</span> <span class="comment">// --- AD Pre-setup (flags to control conditionals in an AD safe / branch aware manner) ---</span></div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"> 536</span> <span class="comment">// ----- Constants for AD safe calculations ---</span></div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> <span class="keyword">const</span> T zero = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0);</div>
|
||||
<div class="line"><a id="l00538" name="l00538"></a><span class="lineno"> 538</span> <span class="keyword">const</span> T one = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00539" name="l00539"></a><span class="lineno"> 539</span> </div>
|
||||
<div class="line"><a id="l00540" name="l00540"></a><span class="lineno"> 540</span> <span class="comment">// ----- Initialize variables for molar concentration product and thresholds ---</span></div>
|
||||
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno"> 541</span> <span class="comment">// Note: the logic here is that we use CppAD::CondExprLt to test thresholds and if they are less we set the flag</span></div>
|
||||
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno"> 542</span> <span class="comment">// to zero so that the final returned reaction flow is 0. This is as opposed to standard if statements</span></div>
|
||||
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno"> 543</span> <span class="comment">// which create branches that break the AD tape.</span></div>
|
||||
<div class="line"><a id="l00544" name="l00544"></a><span class="lineno"> 544</span> <span class="keyword">const</span> T rho_threshold = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="namespacegridfire.html#ada3c137c014ecd8d06200fea2d1a9f50">MIN_DENSITY_THRESHOLD</a>);</div>
|
||||
<div class="line"><a id="l00545" name="l00545"></a><span class="lineno"> 545</span> </div>
|
||||
<div class="line"><a id="l00546" name="l00546"></a><span class="lineno"> 546</span> <span class="comment">// --- Check if the density is below the threshold where we ignore reactions ---</span></div>
|
||||
<div class="line"><a id="l00547" name="l00547"></a><span class="lineno"> 547</span> T threshold_flag = CppAD::CondExpLt(rho, rho_threshold, zero, one); <span class="comment">// If rho < threshold, set flag to 0</span></div>
|
||||
<div class="line"><a id="l00548" name="l00548"></a><span class="lineno"> 548</span> </div>
|
||||
<div class="line"><a id="l00549" name="l00549"></a><span class="lineno"> 549</span> std::vector<T> Y = Y_in;</div>
|
||||
<div class="line"><a id="l00550" name="l00550"></a><span class="lineno"> 550</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(); ++i) {</div>
|
||||
<div class="line"><a id="l00551" name="l00551"></a><span class="lineno"> 551</span> <span class="comment">// We use CppAD::CondExpLt to handle AD taping and prevent branching</span></div>
|
||||
<div class="line"><a id="l00552" name="l00552"></a><span class="lineno"> 552</span> <span class="comment">// Note that while this is syntactically more complex this is equivalent to</span></div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"> 553</span> <span class="comment">// if (Y[i] < 0) {Y[i] = 0;}</span></div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span> <span class="comment">// The issue is that this would introduce a branch which would require the auto diff tape to be re-recorded</span></div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> <span class="comment">// each timestep, which is very inefficient.</span></div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span> Y[i] = CppAD::CondExpLt(Y[i], zero, zero, Y[i]); <span class="comment">// Ensure no negative abundances</span></div>
|
||||
<div class="line"><a id="l00557" name="l00557"></a><span class="lineno"> 557</span> }</div>
|
||||
<div class="line"><a id="l00558" name="l00558"></a><span class="lineno"> 558</span> </div>
|
||||
<div class="line"><a id="l00559" name="l00559"></a><span class="lineno"> 559</span> <span class="keyword">const</span> T u = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e">m_constants</a>.u); <span class="comment">// Atomic mass unit in grams</span></div>
|
||||
<div class="line"><a id="l00560" name="l00560"></a><span class="lineno"> 560</span> <span class="keyword">const</span> T N_A = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e">m_constants</a>.Na); <span class="comment">// Avogadro's number in mol^-1</span></div>
|
||||
<div class="line"><a id="l00561" name="l00561"></a><span class="lineno"> 561</span> <span class="keyword">const</span> T c = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e">m_constants</a>.c); <span class="comment">// Speed of light in cm/s</span></div>
|
||||
<div class="line"><a id="l00562" name="l00562"></a><span class="lineno"> 562</span> </div>
|
||||
<div class="line"><a id="l00563" name="l00563"></a><span class="lineno"> 563</span> <span class="comment">// --- SINGLE LOOP OVER ALL REACTIONS ---</span></div>
|
||||
<div class="line"><a id="l00564" name="l00564"></a><span class="lineno"> 564</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> reactionIndex = 0; reactionIndex < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>.size(); ++reactionIndex) {</div>
|
||||
<div class="line"><a id="l00565" name="l00565"></a><span class="lineno"> 565</span> <span class="keyword">const</span> <span class="keyword">auto</span>& <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a> = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">m_reactions</a>[reactionIndex];</div>
|
||||
<div class="line"><a id="l00566" name="l00566"></a><span class="lineno"> 566</span> </div>
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> <span class="comment">// ----- Initialize variables for molar concentration product and thresholds ---</span></div>
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> <span class="comment">// Note: the logic here is that we use CppAD::CondExprLt to test thresholds and if they are less we set the flag</span></div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> <span class="comment">// to zero so that the final returned reaction flow is 0. This is as opposed to standard if statements</span></div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="comment">// which create branches that break the AD tape.</span></div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> <span class="keyword">const</span> T Y_threshold = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06">MIN_ABUNDANCE_THRESHOLD</a>);</div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> T threshold_flag = one;</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> </div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> <span class="comment">// --- Calculate the molar reaction rate (in units of [s^-1][cm^3(N-1)][mol^(1-N)] for N reactants) ---</span></div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> <span class="keyword">const</span> T k_reaction = <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.calculate_rate(T9);</div>
|
||||
<div class="line"><a id="l00567" name="l00567"></a><span class="lineno"> 567</span> <span class="comment">// 1. Calculate reaction rate</span></div>
|
||||
<div class="line"><a id="l00568" name="l00568"></a><span class="lineno"> 568</span> <span class="keyword">const</span> T molarReactionFlow = screeningFactors[reactionIndex] * <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">calculateMolarReactionFlow<T></a>(<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>, Y, T9, rho);</div>
|
||||
<div class="line"><a id="l00569" name="l00569"></a><span class="lineno"> 569</span> </div>
|
||||
<div class="line"><a id="l00570" name="l00570"></a><span class="lineno"> 570</span> <span class="comment">// 2. Use the rate to update all relevant species derivatives (dY/dt)</span></div>
|
||||
<div class="line"><a id="l00571" name="l00571"></a><span class="lineno"> 571</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> speciesIndex = 0; speciesIndex < <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">m_networkSpecies</a>.size(); ++speciesIndex) {</div>
|
||||
<div class="line"><a id="l00572" name="l00572"></a><span class="lineno"> 572</span> <span class="keyword">const</span> T nu_ij = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">m_stoichiometryMatrix</a>(speciesIndex, reactionIndex));</div>
|
||||
<div class="line"><a id="l00573" name="l00573"></a><span class="lineno"> 573</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>[speciesIndex] += threshold_flag * nu_ij * molarReactionFlow / rho;</div>
|
||||
<div class="line"><a id="l00574" name="l00574"></a><span class="lineno"> 574</span> }</div>
|
||||
<div class="line"><a id="l00575" name="l00575"></a><span class="lineno"> 575</span> }</div>
|
||||
<div class="line"><a id="l00576" name="l00576"></a><span class="lineno"> 576</span> </div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> <span class="comment">// --- Cound the number of each reactant species to account for species multiplicity ---</span></div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> std::unordered_map<std::string, int> reactant_counts;</div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> reactant_counts.reserve(<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.reactants().size());</div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& reactant : <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.reactants()) {</div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> reactant_counts[std::string(reactant.name())]++;</div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> }</div>
|
||||
<div class="line"><a id="l00577" name="l00577"></a><span class="lineno"> 577</span> T massProductionRate = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0); <span class="comment">// [mol][s^-1]</span></div>
|
||||
<div class="line"><a id="l00578" name="l00578"></a><span class="lineno"> 578</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& [species, index] : <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>) {</div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"> 579</span> massProductionRate += result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ae0de268b86c2404379409c4feae0b34d">dydt</a>[index] * species.mass() * u;</div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> }</div>
|
||||
<div class="line"><a id="l00581" name="l00581"></a><span class="lineno"> 581</span> </div>
|
||||
<div class="line"><a id="l00582" name="l00582"></a><span class="lineno"> 582</span> result.<a class="code hl_variable" href="structgridfire_1_1_step_derivatives.html#ab4aeb41be952c7b5844e1ee81fef9008">nuclearEnergyGenerationRate</a> = -massProductionRate * N_A * c * c; <span class="comment">// [cm^2][s^-3] = [erg][s^-1][g^-1]</span></div>
|
||||
<div class="line"><a id="l00583" name="l00583"></a><span class="lineno"> 583</span> </div>
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> <span class="comment">// --- Accumulator for the molar concentration ---</span></div>
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> <span class="keyword">auto</span> molar_concentration_product = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> </div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> <span class="comment">// --- Loop through each unique reactant species and calculate the molar concentration for that species then multiply that into the accumulator ---</span></div>
|
||||
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& [species_name, count] : reactant_counts) {</div>
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"> 589</span> <span class="comment">// --- Resolve species to molar abundance ---</span></div>
|
||||
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> <span class="comment">// PERF: Could probably optimize out this lookup</span></div>
|
||||
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> <span class="keyword">const</span> <span class="keyword">auto</span> species_it = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>.find(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">m_networkSpeciesMap</a>.at(species_name));</div>
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> species_index = species_it->second;</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> <span class="keyword">const</span> T Yi = Y[species_index];</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> </div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> <span class="comment">// --- Check if the species abundance is below the threshold where we ignore reactions ---</span></div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> threshold_flag *= CppAD::CondExpLt(Yi, Y_threshold, zero, one);</div>
|
||||
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> </div>
|
||||
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> <span class="comment">// --- Convert from molar abundance to molar concentration ---</span></div>
|
||||
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> T molar_concentration = Yi * rho;</div>
|
||||
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span> </div>
|
||||
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span> <span class="comment">// --- If count is > 1 , we need to raise the molar concentration to the power of count since there are really count bodies in that reaction ---</span></div>
|
||||
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> molar_concentration_product *= CppAD::pow(molar_concentration, <span class="keyword">static_cast<</span>T<span class="keyword">></span>(count)); <span class="comment">// ni^count</span></div>
|
||||
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span> </div>
|
||||
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span> <span class="comment">// --- Apply factorial correction for identical reactions ---</span></div>
|
||||
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> <span class="keywordflow">if</span> (count > 1) {</div>
|
||||
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span> molar_concentration_product /= <span class="keyword">static_cast<</span>T<span class="keyword">></span>(std::tgamma(<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(count + 1))); <span class="comment">// Gamma function for factorial</span></div>
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"> 607</span> }</div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span> }</div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> <span class="comment">// --- Final reaction flow calculation [mol][s^-1][cm^-3] ---</span></div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span> <span class="comment">// Note: If the threshold flag ever gets set to zero this will return zero.</span></div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> <span class="comment">// This will result basically in multiple branches being written to the AD tape, which will make</span></div>
|
||||
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"> 612</span> <span class="comment">// the tape more expensive to record, but it will also mean that we only need to record it once for</span></div>
|
||||
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> <span class="comment">// the entire network.</span></div>
|
||||
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <span class="keywordflow">return</span> molar_concentration_product * k_reaction * threshold_flag;</div>
|
||||
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> }</div>
|
||||
<div class="line"><a id="l00584" name="l00584"></a><span class="lineno"> 584</span> <span class="keywordflow">return</span> result;</div>
|
||||
<div class="line"><a id="l00585" name="l00585"></a><span class="lineno"> 585</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span>};</div>
|
||||
<div class="line"><a id="l00586" name="l00586"></a><span class="lineno"> 586</span> </div>
|
||||
<div class="line"><a id="l00587" name="l00587"></a><span class="lineno"> 587</span> </div>
|
||||
<div class="line"><a id="l00588" name="l00588"></a><span class="lineno"> 588</span> <span class="keyword">template</span> <IsArithmeticOrAD T></div>
|
||||
<div class="foldopen" id="foldopen00589" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00589" name="l00589"></a><span class="lineno"><a class="line" href="classgridfire_1_1_graph_engine.html#a5e96b5a0b34c8932f0e14eabda57f1a4"> 589</a></span> T <a class="code hl_function" href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">GraphEngine::calculateMolarReactionFlow</a>(</div>
|
||||
<div class="line"><a id="l00590" name="l00590"></a><span class="lineno"> 590</span> <span class="keyword">const</span> <a class="code hl_class" href="classgridfire_1_1reaction_1_1_reaction.html">reaction::Reaction</a> &<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>,</div>
|
||||
<div class="line"><a id="l00591" name="l00591"></a><span class="lineno"> 591</span> <span class="keyword">const</span> std::vector<T> &Y,</div>
|
||||
<div class="line"><a id="l00592" name="l00592"></a><span class="lineno"> 592</span> <span class="keyword">const</span> T T9,</div>
|
||||
<div class="line"><a id="l00593" name="l00593"></a><span class="lineno"> 593</span> <span class="keyword">const</span> T rho</div>
|
||||
<div class="line"><a id="l00594" name="l00594"></a><span class="lineno"> 594</span> )<span class="keyword"> const </span>{</div>
|
||||
<div class="line"><a id="l00595" name="l00595"></a><span class="lineno"> 595</span> </div>
|
||||
<div class="line"><a id="l00596" name="l00596"></a><span class="lineno"> 596</span> <span class="comment">// --- Pre-setup (flags to control conditionals in an AD safe / branch aware manner) ---</span></div>
|
||||
<div class="line"><a id="l00597" name="l00597"></a><span class="lineno"> 597</span> <span class="comment">// ----- Constants for AD safe calculations ---</span></div>
|
||||
<div class="line"><a id="l00598" name="l00598"></a><span class="lineno"> 598</span> <span class="keyword">const</span> T zero = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(0.0);</div>
|
||||
<div class="line"><a id="l00599" name="l00599"></a><span class="lineno"> 599</span> <span class="keyword">const</span> T one = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00600" name="l00600"></a><span class="lineno"> 600</span> </div>
|
||||
<div class="line"><a id="l00601" name="l00601"></a><span class="lineno"> 601</span> <span class="comment">// ----- Initialize variables for molar concentration product and thresholds ---</span></div>
|
||||
<div class="line"><a id="l00602" name="l00602"></a><span class="lineno"> 602</span> <span class="comment">// Note: the logic here is that we use CppAD::CondExprLt to test thresholds and if they are less we set the flag</span></div>
|
||||
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"> 603</span> <span class="comment">// to zero so that the final returned reaction flow is 0. This is as opposed to standard if statements</span></div>
|
||||
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span> <span class="comment">// which create branches that break the AD tape.</span></div>
|
||||
<div class="line"><a id="l00605" name="l00605"></a><span class="lineno"> 605</span> <span class="keyword">const</span> T Y_threshold = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code hl_variable" href="namespacegridfire.html#a96c062f94713921e5d7568ecedcdcb06">MIN_ABUNDANCE_THRESHOLD</a>);</div>
|
||||
<div class="line"><a id="l00606" name="l00606"></a><span class="lineno"> 606</span> T threshold_flag = one;</div>
|
||||
<div class="line"><a id="l00607" name="l00607"></a><span class="lineno"> 607</span> </div>
|
||||
<div class="line"><a id="l00608" name="l00608"></a><span class="lineno"> 608</span> <span class="comment">// --- Calculate the molar reaction rate (in units of [s^-1][cm^3(N-1)][mol^(1-N)] for N reactants) ---</span></div>
|
||||
<div class="line"><a id="l00609" name="l00609"></a><span class="lineno"> 609</span> <span class="keyword">const</span> T k_reaction = <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.calculate_rate(T9);</div>
|
||||
<div class="line"><a id="l00610" name="l00610"></a><span class="lineno"> 610</span> </div>
|
||||
<div class="line"><a id="l00611" name="l00611"></a><span class="lineno"> 611</span> <span class="comment">// --- Cound the number of each reactant species to account for species multiplicity ---</span></div>
|
||||
<div class="line"><a id="l00612" name="l00612"></a><span class="lineno"> 612</span> std::unordered_map<std::string, int> reactant_counts;</div>
|
||||
<div class="line"><a id="l00613" name="l00613"></a><span class="lineno"> 613</span> reactant_counts.reserve(<a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.reactants().size());</div>
|
||||
<div class="line"><a id="l00614" name="l00614"></a><span class="lineno"> 614</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& reactant : <a class="code hl_namespace" href="namespacegridfire_1_1reaction.html">reaction</a>.reactants()) {</div>
|
||||
<div class="line"><a id="l00615" name="l00615"></a><span class="lineno"> 615</span> reactant_counts[std::string(reactant.name())]++;</div>
|
||||
<div class="line"><a id="l00616" name="l00616"></a><span class="lineno"> 616</span> }</div>
|
||||
<div class="line"><a id="l00617" name="l00617"></a><span class="lineno"> 617</span> </div>
|
||||
<div class="line"><a id="l00618" name="l00618"></a><span class="lineno"> 618</span> <span class="comment">// --- Accumulator for the molar concentration ---</span></div>
|
||||
<div class="line"><a id="l00619" name="l00619"></a><span class="lineno"> 619</span> <span class="keyword">auto</span> molar_concentration_product = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(1.0);</div>
|
||||
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"> 620</span> </div>
|
||||
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span> <span class="comment">// --- Loop through each unique reactant species and calculate the molar concentration for that species then multiply that into the accumulator ---</span></div>
|
||||
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno"> 622</span> <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& [species_name, count] : reactant_counts) {</div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span> <span class="comment">// --- Resolve species to molar abundance ---</span></div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span> <span class="comment">// PERF: Could probably optimize out this lookup</span></div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span> <span class="keyword">const</span> <span class="keyword">auto</span> species_it = <a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">m_speciesToIndexMap</a>.find(<a class="code hl_variable" href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">m_networkSpeciesMap</a>.at(species_name));</div>
|
||||
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno"> 626</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> species_index = species_it->second;</div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span> <span class="keyword">const</span> T Yi = Y[species_index];</div>
|
||||
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"> 628</span> </div>
|
||||
<div class="line"><a id="l00629" name="l00629"></a><span class="lineno"> 629</span> <span class="comment">// --- Check if the species abundance is below the threshold where we ignore reactions ---</span></div>
|
||||
<div class="line"><a id="l00630" name="l00630"></a><span class="lineno"> 630</span> threshold_flag *= CppAD::CondExpLt(Yi, Y_threshold, zero, one);</div>
|
||||
<div class="line"><a id="l00631" name="l00631"></a><span class="lineno"> 631</span> </div>
|
||||
<div class="line"><a id="l00632" name="l00632"></a><span class="lineno"> 632</span> <span class="comment">// --- Convert from molar abundance to molar concentration ---</span></div>
|
||||
<div class="line"><a id="l00633" name="l00633"></a><span class="lineno"> 633</span> T molar_concentration = Yi * rho;</div>
|
||||
<div class="line"><a id="l00634" name="l00634"></a><span class="lineno"> 634</span> </div>
|
||||
<div class="line"><a id="l00635" name="l00635"></a><span class="lineno"> 635</span> <span class="comment">// --- If count is > 1 , we need to raise the molar concentration to the power of count since there are really count bodies in that reaction ---</span></div>
|
||||
<div class="line"><a id="l00636" name="l00636"></a><span class="lineno"> 636</span> molar_concentration_product *= CppAD::pow(molar_concentration, <span class="keyword">static_cast<</span>T<span class="keyword">></span>(count)); <span class="comment">// ni^count</span></div>
|
||||
<div class="line"><a id="l00637" name="l00637"></a><span class="lineno"> 637</span> </div>
|
||||
<div class="line"><a id="l00638" name="l00638"></a><span class="lineno"> 638</span> <span class="comment">// --- Apply factorial correction for identical reactions ---</span></div>
|
||||
<div class="line"><a id="l00639" name="l00639"></a><span class="lineno"> 639</span> <span class="keywordflow">if</span> (count > 1) {</div>
|
||||
<div class="line"><a id="l00640" name="l00640"></a><span class="lineno"> 640</span> molar_concentration_product /= <span class="keyword">static_cast<</span>T<span class="keyword">></span>(std::tgamma(<span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(count + 1))); <span class="comment">// Gamma function for factorial</span></div>
|
||||
<div class="line"><a id="l00641" name="l00641"></a><span class="lineno"> 641</span> }</div>
|
||||
<div class="line"><a id="l00642" name="l00642"></a><span class="lineno"> 642</span> }</div>
|
||||
<div class="line"><a id="l00643" name="l00643"></a><span class="lineno"> 643</span> <span class="comment">// --- Final reaction flow calculation [mol][s^-1][cm^-3] ---</span></div>
|
||||
<div class="line"><a id="l00644" name="l00644"></a><span class="lineno"> 644</span> <span class="comment">// Note: If the threshold flag ever gets set to zero this will return zero.</span></div>
|
||||
<div class="line"><a id="l00645" name="l00645"></a><span class="lineno"> 645</span> <span class="comment">// This will result basically in multiple branches being written to the AD tape, which will make</span></div>
|
||||
<div class="line"><a id="l00646" name="l00646"></a><span class="lineno"> 646</span> <span class="comment">// the tape more expensive to record, but it will also mean that we only need to record it once for</span></div>
|
||||
<div class="line"><a id="l00647" name="l00647"></a><span class="lineno"> 647</span> <span class="comment">// the entire network.</span></div>
|
||||
<div class="line"><a id="l00648" name="l00648"></a><span class="lineno"> 648</span> <span class="keywordflow">return</span> molar_concentration_product * k_reaction * threshold_flag;</div>
|
||||
<div class="line"><a id="l00649" name="l00649"></a><span class="lineno"> 649</span> }</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00650" name="l00650"></a><span class="lineno"> 650</span>};</div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_dynamic_engine_html"><div class="ttname"><a href="classgridfire_1_1_dynamic_engine.html">gridfire::DynamicEngine</a></div><div class="ttdoc">Abstract class for engines supporting Jacobian and stoichiometry operations.</div><div class="ttdef"><b>Definition</b> <a href="engine__abstract_8h_source.html#l00121">engine_abstract.h:121</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a0837bab6dcd111d9075c9343b90d64f1"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a0837bab6dcd111d9075c9343b90d64f1">gridfire::GraphEngine::m_constants</a></div><div class="ttdeci">Constants & m_constants</div><div class="ttdoc">Access to physical constants.</div><div class="ttdef"><b>Definition</b> <a href="#l00323">engine_graph.h:323</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a0ed390f3e598ebba4e245ac90bb78767"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a0ed390f3e598ebba4e245ac90bb78767">gridfire::GraphEngine::getNetworkSpecies</a></div><div class="ttdeci">const std::vector< fourdst::atomic::Species > & getNetworkSpecies() const override</div><div class="ttdoc">Gets the list of species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00113">engine_graph.cpp:113</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a26215593544c3a52597194602e4e25dd"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a26215593544c3a52597194602e4e25dd">gridfire::GraphEngine::getSpeciesTimescales</a></div><div class="ttdeci">std::unordered_map< fourdst::atomic::Species, double > getSpeciesTimescales(const std::vector< double > &Y, double T9, double rho) const override</div><div class="ttdoc">Computes timescales for all species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00436">engine_graph.cpp:436</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a26602e1b3c610780a47b5a6511d6d567"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a26602e1b3c610780a47b5a6511d6d567">gridfire::GraphEngine::populateReactionIDMap</a></div><div class="ttdeci">void populateReactionIDMap()</div><div class="ttdoc">Populates the reaction ID map.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00086">engine_graph.cpp:86</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a2e22b111f6d00ecc9e3804a71f1ce876"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876">gridfire::GraphEngine::m_rhsADFun</a></div><div class="ttdeci">CppAD::ADFun< double > m_rhsADFun</div><div class="ttdoc">CppAD function for the right-hand side of the ODE.</div><div class="ttdef"><b>Definition</b> <a href="#l00317">engine_graph.h:317</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a2f1718c89d4aaad028102724d18fa910"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910">gridfire::GraphEngine::m_jacobianMatrix</a></div><div class="ttdeci">boost::numeric::ublas::compressed_matrix< double > m_jacobianMatrix</div><div class="ttdoc">Jacobian matrix (species x species).</div><div class="ttdef"><b>Definition</b> <a href="#l00315">engine_graph.h:315</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a303e6093591cde91430f866a04a8be7c"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a303e6093591cde91430f866a04a8be7c">gridfire::GraphEngine::getJacobianMatrixEntry</a></div><div class="ttdeci">double getJacobianMatrixEntry(const int i, const int j) const override</div><div class="ttdoc">Gets an entry from the previously generated Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00317">engine_graph.cpp:317</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a30e09ed0bce6aa5fc89beaa316a7b827"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">gridfire::GraphEngine::m_networkSpeciesMap</a></div><div class="ttdeci">std::unordered_map< std::string_view, fourdst::atomic::Species > m_networkSpeciesMap</div><div class="ttdoc">Map from species name to Species object.</div><div class="ttdef"><b>Definition</b> <a href="#l00311">engine_graph.h:311</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a3b17102b143435ddfdc015d7a50c4b18"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18">gridfire::GraphEngine::m_config</a></div><div class="ttdeci">Config & m_config</div><div class="ttdef"><b>Definition</b> <a href="#l00322">engine_graph.h:322</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a47202c43342b96480070874bffce1391"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a47202c43342b96480070874bffce1391">gridfire::GraphEngine::populateSpeciesToIndexMap</a></div><div class="ttdeci">void populateSpeciesToIndexMap()</div><div class="ttdoc">Populates the species-to-index map.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00095">engine_graph.cpp:95</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a483979fc154adc88d029b3b672066d53"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53">gridfire::GraphEngine::m_logger</a></div><div class="ttdeci">quill::Logger * m_logger</div><div class="ttdef"><b>Definition</b> <a href="#l00324">engine_graph.h:324</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a51b4cedf9b00de79fb6eef243631b04d"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a51b4cedf9b00de79fb6eef243631b04d">gridfire::GraphEngine::update</a></div><div class="ttdeci">void update(const NetIn &netIn) override</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00452">engine_graph.cpp:452</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a52edc3e88f1e8fc497e1e63972d63c80"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">gridfire::GraphEngine::m_screeningType</a></div><div class="ttdeci">screening::ScreeningType m_screeningType</div><div class="ttdoc">Screening type for the reaction network. Default to no screening.</div><div class="ttdef"><b>Definition</b> <a href="#l00319">engine_graph.h:319</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a5a5458ed01923124f2d7e1f04f32f138"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a5a5458ed01923124f2d7e1f04f32f138">gridfire::GraphEngine::reserveJacobianMatrix</a></div><div class="ttdeci">void reserveJacobianMatrix()</div><div class="ttdoc">Reserves space for the Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00102">engine_graph.cpp:102</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a5d6cc63b99b467c2a976d1fbaaa1dfa3"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3">gridfire::GraphEngine::m_reactionIDMap</a></div><div class="ttdeci">std::unordered_map< std::string_view, reaction::Reaction * > m_reactionIDMap</div><div class="ttdoc">Map from reaction ID to REACLIBReaction. //PERF: This makes copies of REACLIBReaction and could be a ...</div><div class="ttdef"><b>Definition</b> <a href="#l00308">engine_graph.h:308</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a697f2004e0d02c59e83c7890742d7c9a"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a697f2004e0d02c59e83c7890742d7c9a">gridfire::GraphEngine::getScreeningModel</a></div><div class="ttdeci">screening::ScreeningType getScreeningModel() const override</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00271">engine_graph.cpp:271</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a6b5feaf788bade212b7c8df7ac8c8152"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a6b5feaf788bade212b7c8df7ac8c8152">gridfire::GraphEngine::getStoichiometryMatrixEntry</a></div><div class="ttdeci">int getStoichiometryMatrixEntry(const int speciesIndex, const int reactionIndex) const override</div><div class="ttdoc">Gets an entry from the stoichiometry matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00327">engine_graph.cpp:327</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8110e687844f921438bb517e1d8ce62f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8110e687844f921438bb517e1d8ce62f">gridfire::GraphEngine::setScreeningModel</a></div><div class="ttdeci">void setScreeningModel(screening::ScreeningType) override</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00266">engine_graph.cpp:266</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a832e2fe066381811a3e0464806ff5e95"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a832e2fe066381811a3e0464806ff5e95">gridfire::GraphEngine::exportToCSV</a></div><div class="ttdeci">void exportToCSV(const std::string &filename) const</div><div class="ttdoc">Exports the network to a CSV file for analysis.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00382">engine_graph.cpp:382</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8b3baf29829c7ae0a61430ea70632bbf"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8b3baf29829c7ae0a61430ea70632bbf">gridfire::GraphEngine::calculateRHSAndEnergy</a></div><div class="ttdeci">StepDerivatives< double > calculateRHSAndEnergy(const std::vector< double > &Y, const double T9, const double rho) const override</div><div class="ttdoc">Calculates the right-hand side (dY/dt) and energy generation rate.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00038">engine_graph.cpp:38</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8c29d8bbde407e913be5eb77efb2c0c9"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8c29d8bbde407e913be5eb77efb2c0c9">gridfire::GraphEngine::getNetReactionStoichiometry</a></div><div class="ttdeci">static std::unordered_map< fourdst::atomic::Species, int > getNetReactionStoichiometry(const reaction::Reaction &reaction)</div><div class="ttdoc">Gets the net stoichiometry for a given reaction.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00321">engine_graph.cpp:321</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a9245642b741f215e52861d00e756fb3f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">gridfire::GraphEngine::calculateMolarReactionFlow</a></div><div class="ttdeci">double calculateMolarReactionFlow(const reaction::Reaction &reaction, const std::vector< double > &Y, const double T9, const double rho) const override</div><div class="ttdoc">Calculates the molar reaction flow for a given reaction.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00275">engine_graph.cpp:275</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a92d26068ba139e47d335f5fe9e2814cc"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">gridfire::GraphEngine::m_networkSpecies</a></div><div class="ttdeci">std::vector< fourdst::atomic::Species > m_networkSpecies</div><div class="ttdoc">Vector of unique species in the network.</div><div class="ttdef"><b>Definition</b> <a href="#l00310">engine_graph.h:310</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a95563f6bc86007d9ee053a0f1e15b889"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a95563f6bc86007d9ee053a0f1e15b889">gridfire::GraphEngine::recordADTape</a></div><div class="ttdeci">void recordADTape()</div><div class="ttdoc">Records the AD tape for the right-hand side of the ODE.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00456">engine_graph.cpp:456</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a015f8975701f028c29835d3a9794e00f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a015f8975701f028c29835d3a9794e00f">gridfire::GraphEngine::isPrecomputationEnabled</a></div><div class="ttdeci">bool isPrecomputationEnabled() const</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00373">engine_graph.cpp:373</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a0ed390f3e598ebba4e245ac90bb78767"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a0ed390f3e598ebba4e245ac90bb78767">gridfire::GraphEngine::getNetworkSpecies</a></div><div class="ttdeci">const std::vector< fourdst::atomic::Species > & getNetworkSpecies() const override</div><div class="ttdoc">Gets the list of species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00128">engine_graph.cpp:128</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a10c01bc20ae668c2857efb2a1783098e"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a10c01bc20ae668c2857efb2a1783098e">gridfire::GraphEngine::m_constants</a></div><div class="ttdeci">constants m_constants</div><div class="ttdef"><b>Definition</b> <a href="#l00330">engine_graph.h:330</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a191cff35402d3c97c82c5c966a39d0de"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a191cff35402d3c97c82c5c966a39d0de">gridfire::GraphEngine::m_usePrecomputation</a></div><div class="ttdeci">bool m_usePrecomputation</div><div class="ttdoc">Flag to enable or disable using precomputed reactions for efficiency. Mathematically,...</div><div class="ttdef"><b>Definition</b> <a href="#l00347">engine_graph.h:347</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a26215593544c3a52597194602e4e25dd"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a26215593544c3a52597194602e4e25dd">gridfire::GraphEngine::getSpeciesTimescales</a></div><div class="ttdeci">std::unordered_map< fourdst::atomic::Species, double > getSpeciesTimescales(const std::vector< double > &Y, double T9, double rho) const override</div><div class="ttdoc">Computes timescales for all species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00538">engine_graph.cpp:538</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a26602e1b3c610780a47b5a6511d6d567"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a26602e1b3c610780a47b5a6511d6d567">gridfire::GraphEngine::populateReactionIDMap</a></div><div class="ttdeci">void populateReactionIDMap()</div><div class="ttdoc">Populates the reaction ID map.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00101">engine_graph.cpp:101</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a2e22b111f6d00ecc9e3804a71f1ce876"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a2e22b111f6d00ecc9e3804a71f1ce876">gridfire::GraphEngine::m_rhsADFun</a></div><div class="ttdeci">CppAD::ADFun< double > m_rhsADFun</div><div class="ttdoc">CppAD function for the right-hand side of the ODE.</div><div class="ttdef"><b>Definition</b> <a href="#l00342">engine_graph.h:342</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a2f1718c89d4aaad028102724d18fa910"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a2f1718c89d4aaad028102724d18fa910">gridfire::GraphEngine::m_jacobianMatrix</a></div><div class="ttdeci">boost::numeric::ublas::compressed_matrix< double > m_jacobianMatrix</div><div class="ttdoc">Jacobian matrix (species x species).</div><div class="ttdef"><b>Definition</b> <a href="#l00340">engine_graph.h:340</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a303e6093591cde91430f866a04a8be7c"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a303e6093591cde91430f866a04a8be7c">gridfire::GraphEngine::getJacobianMatrixEntry</a></div><div class="ttdeci">double getJacobianMatrixEntry(const int i, const int j) const override</div><div class="ttdoc">Gets an entry from the previously generated Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00419">engine_graph.cpp:419</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a30e09ed0bce6aa5fc89beaa316a7b827"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a30e09ed0bce6aa5fc89beaa316a7b827">gridfire::GraphEngine::m_networkSpeciesMap</a></div><div class="ttdeci">std::unordered_map< std::string_view, fourdst::atomic::Species > m_networkSpeciesMap</div><div class="ttdoc">Map from species name to Species object.</div><div class="ttdef"><b>Definition</b> <a href="#l00336">engine_graph.h:336</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a3b17102b143435ddfdc015d7a50c4b18"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a3b17102b143435ddfdc015d7a50c4b18">gridfire::GraphEngine::m_config</a></div><div class="ttdeci">Config & m_config</div><div class="ttdef"><b>Definition</b> <a href="#l00327">engine_graph.h:327</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a47202c43342b96480070874bffce1391"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a47202c43342b96480070874bffce1391">gridfire::GraphEngine::populateSpeciesToIndexMap</a></div><div class="ttdeci">void populateSpeciesToIndexMap()</div><div class="ttdoc">Populates the species-to-index map.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00110">engine_graph.cpp:110</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a483979fc154adc88d029b3b672066d53"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a483979fc154adc88d029b3b672066d53">gridfire::GraphEngine::m_logger</a></div><div class="ttdeci">quill::Logger * m_logger</div><div class="ttdef"><b>Definition</b> <a href="#l00328">engine_graph.h:328</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a51b4cedf9b00de79fb6eef243631b04d"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a51b4cedf9b00de79fb6eef243631b04d">gridfire::GraphEngine::update</a></div><div class="ttdeci">void update(const NetIn &netIn) override</div><div class="ttdoc">Update the internal state of the engine.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00554">engine_graph.cpp:554</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a52edc3e88f1e8fc497e1e63972d63c80"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a52edc3e88f1e8fc497e1e63972d63c80">gridfire::GraphEngine::m_screeningType</a></div><div class="ttdeci">screening::ScreeningType m_screeningType</div><div class="ttdoc">Screening type for the reaction network. Default to no screening.</div><div class="ttdef"><b>Definition</b> <a href="#l00344">engine_graph.h:344</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a5a5458ed01923124f2d7e1f04f32f138"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a5a5458ed01923124f2d7e1f04f32f138">gridfire::GraphEngine::reserveJacobianMatrix</a></div><div class="ttdeci">void reserveJacobianMatrix()</div><div class="ttdoc">Reserves space for the Jacobian matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00117">engine_graph.cpp:117</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a5d431d5385b1219ba29689eb29601ea3"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a5d431d5385b1219ba29689eb29601ea3">gridfire::GraphEngine::m_precomputedReactions</a></div><div class="ttdeci">std::vector< PrecomputedReaction > m_precomputedReactions</div><div class="ttdoc">Precomputed reactions for efficiency.</div><div class="ttdef"><b>Definition</b> <a href="#l00349">engine_graph.h:349</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a5d6cc63b99b467c2a976d1fbaaa1dfa3"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a5d6cc63b99b467c2a976d1fbaaa1dfa3">gridfire::GraphEngine::m_reactionIDMap</a></div><div class="ttdeci">std::unordered_map< std::string_view, reaction::Reaction * > m_reactionIDMap</div><div class="ttdoc">Map from reaction ID to REACLIBReaction. //PERF: This makes copies of REACLIBReaction and could be a ...</div><div class="ttdef"><b>Definition</b> <a href="#l00333">engine_graph.h:333</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a63639f4430d0889605c10839a6f32af9"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a63639f4430d0889605c10839a6f32af9">gridfire::GraphEngine::calculateAllDerivativesUsingPrecomputation</a></div><div class="ttdeci">StepDerivatives< double > calculateAllDerivativesUsingPrecomputation(const std::vector< double > &Y_in, const std::vector< double > &bare_rates, double T9, double rho) const</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00223">engine_graph.cpp:223</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a697f2004e0d02c59e83c7890742d7c9a"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a697f2004e0d02c59e83c7890742d7c9a">gridfire::GraphEngine::getScreeningModel</a></div><div class="ttdeci">screening::ScreeningType getScreeningModel() const override</div><div class="ttdoc">Get the current electron screening model.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00365">engine_graph.cpp:365</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a6b5feaf788bade212b7c8df7ac8c8152"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a6b5feaf788bade212b7c8df7ac8c8152">gridfire::GraphEngine::getStoichiometryMatrixEntry</a></div><div class="ttdeci">int getStoichiometryMatrixEntry(const int speciesIndex, const int reactionIndex) const override</div><div class="ttdoc">Gets an entry from the stoichiometry matrix.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00429">engine_graph.cpp:429</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a6c5410878496abc349ba30b691cdf0f1"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a6c5410878496abc349ba30b691cdf0f1">gridfire::GraphEngine::setPrecomputation</a></div><div class="ttdeci">void setPrecomputation(bool precompute)</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00369">engine_graph.cpp:369</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8110e687844f921438bb517e1d8ce62f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8110e687844f921438bb517e1d8ce62f">gridfire::GraphEngine::setScreeningModel</a></div><div class="ttdeci">void setScreeningModel(screening::ScreeningType) override</div><div class="ttdoc">Set the electron screening model.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00360">engine_graph.cpp:360</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a832e2fe066381811a3e0464806ff5e95"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a832e2fe066381811a3e0464806ff5e95">gridfire::GraphEngine::exportToCSV</a></div><div class="ttdeci">void exportToCSV(const std::string &filename) const</div><div class="ttdoc">Exports the network to a CSV file for analysis.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00484">engine_graph.cpp:484</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8b3baf29829c7ae0a61430ea70632bbf"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8b3baf29829c7ae0a61430ea70632bbf">gridfire::GraphEngine::calculateRHSAndEnergy</a></div><div class="ttdeci">StepDerivatives< double > calculateRHSAndEnergy(const std::vector< double > &Y, const double T9, const double rho) const override</div><div class="ttdoc">Calculates the right-hand side (dY/dt) and energy generation rate.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00042">engine_graph.cpp:42</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a8c29d8bbde407e913be5eb77efb2c0c9"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a8c29d8bbde407e913be5eb77efb2c0c9">gridfire::GraphEngine::getNetReactionStoichiometry</a></div><div class="ttdeci">static std::unordered_map< fourdst::atomic::Species, int > getNetReactionStoichiometry(const reaction::Reaction &reaction)</div><div class="ttdoc">Gets the net stoichiometry for a given reaction.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00423">engine_graph.cpp:423</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a9245642b741f215e52861d00e756fb3f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a9245642b741f215e52861d00e756fb3f">gridfire::GraphEngine::calculateMolarReactionFlow</a></div><div class="ttdeci">double calculateMolarReactionFlow(const reaction::Reaction &reaction, const std::vector< double > &Y, const double T9, const double rho) const override</div><div class="ttdoc">Calculates the molar reaction flow for a given reaction.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00377">engine_graph.cpp:377</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a92644bc333bff69c5685be4552ca12fd"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a92644bc333bff69c5685be4552ca12fd">gridfire::GraphEngine::precomputeNetwork</a></div><div class="ttdeci">void precomputeNetwork()</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00603">engine_graph.cpp:603</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a92d26068ba139e47d335f5fe9e2814cc"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a92d26068ba139e47d335f5fe9e2814cc">gridfire::GraphEngine::m_networkSpecies</a></div><div class="ttdeci">std::vector< fourdst::atomic::Species > m_networkSpecies</div><div class="ttdoc">Vector of unique species in the network.</div><div class="ttdef"><b>Definition</b> <a href="#l00335">engine_graph.h:335</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a95563f6bc86007d9ee053a0f1e15b889"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a95563f6bc86007d9ee053a0f1e15b889">gridfire::GraphEngine::recordADTape</a></div><div class="ttdeci">void recordADTape()</div><div class="ttdoc">Records the AD tape for the right-hand side of the ODE.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00558">engine_graph.cpp:558</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_a9f74786ff930ab72664b31f29d05a30c"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#a9f74786ff930ab72664b31f29d05a30c">gridfire::GraphEngine::GraphEngine</a></div><div class="ttdeci">GraphEngine(const fourdst::composition::Composition &composition)</div><div class="ttdoc">Constructs a GraphEngine from a composition.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00026">engine_graph.cpp:26</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aa6202cee0c3c481eda77cc9a91bc126b"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aa6202cee0c3c481eda77cc9a91bc126b">gridfire::GraphEngine::involvesSpecies</a></div><div class="ttdeci">bool involvesSpecies(const fourdst::atomic::Species &species) const</div><div class="ttdoc">Checks if a given species is involved in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00125">engine_graph.cpp:125</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acb7c4f5108b0efeae48ad15598e808c3"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">gridfire::GraphEngine::m_reactions</a></div><div class="ttdeci">reaction::LogicalReactionSet m_reactions</div><div class="ttdoc">Set of REACLIB reactions in the network.</div><div class="ttdef"><b>Definition</b> <a href="#l00307">engine_graph.h:307</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acdce8d87e23a2cd1504bc9472e538c0f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acdce8d87e23a2cd1504bc9472e538c0f">gridfire::GraphEngine::syncInternalMaps</a></div><div class="ttdeci">void syncInternalMaps()</div><div class="ttdoc">Synchronizes the internal maps.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00047">engine_graph.cpp:47</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acf4cfccea20f5cb31c9886bf233a28be"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acf4cfccea20f5cb31c9886bf233a28be">gridfire::GraphEngine::validateConservation</a></div><div class="ttdeci">bool validateConservation() const</div><div class="ttdoc">Validates mass and charge conservation across all reactions.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00133">engine_graph.cpp:133</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad1cb5fd32efc37668e2d9ecf0c72ad24"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">gridfire::GraphEngine::m_stoichiometryMatrix</a></div><div class="ttdeci">boost::numeric::ublas::compressed_matrix< int > m_stoichiometryMatrix</div><div class="ttdoc">Stoichiometry matrix (species x reactions).</div><div class="ttdef"><b>Definition</b> <a href="#l00314">engine_graph.h:314</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad45650d10fc5dff1673ae3f806d067da"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad45650d10fc5dff1673ae3f806d067da">gridfire::GraphEngine::getNetworkReactions</a></div><div class="ttdeci">const reaction::LogicalReactionSet & getNetworkReactions() const override</div><div class="ttdoc">Gets the set of logical reactions in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00119">engine_graph.cpp:119</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad8237c252145a75092202d00f5e1ddf7"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">gridfire::GraphEngine::m_speciesToIndexMap</a></div><div class="ttdeci">std::unordered_map< fourdst::atomic::Species, size_t > m_speciesToIndexMap</div><div class="ttdoc">Map from species to their index in the stoichiometry matrix.</div><div class="ttdef"><b>Definition</b> <a href="#l00312">engine_graph.h:312</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_adac8c7d62bae76e17fc060e86dadd929"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#adac8c7d62bae76e17fc060e86dadd929">gridfire::GraphEngine::exportToDot</a></div><div class="ttdeci">void exportToDot(const std::string &filename) const</div><div class="ttdoc">Exports the network to a DOT file for visualization.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00334">engine_graph.cpp:334</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ae347ff0316e532e0298ec8c913908105"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ae347ff0316e532e0298ec8c913908105">gridfire::GraphEngine::generateJacobianMatrix</a></div><div class="ttdeci">void generateJacobianMatrix(const std::vector< double > &Y, const double T9, const double rho) override</div><div class="ttdoc">Generates the Jacobian matrix for the current state.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00284">engine_graph.cpp:284</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aed726d36ee2b3796beff6067a1e4db38"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aed726d36ee2b3796beff6067a1e4db38">gridfire::GraphEngine::generateStoichiometryMatrix</a></div><div class="ttdeci">void generateStoichiometryMatrix() override</div><div class="ttdoc">Generates the stoichiometry matrix for the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00209">engine_graph.cpp:209</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aedf42d83bfcc28313b6b6454034d2efa"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aedf42d83bfcc28313b6b6454034d2efa">gridfire::GraphEngine::collectNetworkSpecies</a></div><div class="ttdeci">void collectNetworkSpecies()</div><div class="ttdoc">Collects the unique species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00057">engine_graph.cpp:57</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aeeafeab40a5f4dbfae78bdc87e25e93f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aeeafeab40a5f4dbfae78bdc87e25e93f">gridfire::GraphEngine::validateComposition</a></div><div class="ttdeci">void validateComposition(const fourdst::composition::Composition &composition, double culling, double T9)</div><div class="ttdoc">Validates the composition against the current reaction set.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00188">engine_graph.cpp:188</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_af17cf3762abac3efcab9a8e87c961210"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">gridfire::GraphEngine::m_screeningModel</a></div><div class="ttdeci">std::unique_ptr< screening::ScreeningModel > m_screeningModel</div><div class="ttdef"><b>Definition</b> <a href="#l00320">engine_graph.h:320</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_af41df9ce979b6410e12642cb093916c9"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">gridfire::GraphEngine::calculateAllDerivatives</a></div><div class="ttdeci">StepDerivatives< T > calculateAllDerivatives(const std::vector< T > &Y_in, T T9, T rho) const</div><div class="ttdoc">Calculates all derivatives (dY/dt) and the energy generation rate.</div><div class="ttdef"><b>Definition</b> <a href="#l00487">engine_graph.h:487</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aa6202cee0c3c481eda77cc9a91bc126b"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aa6202cee0c3c481eda77cc9a91bc126b">gridfire::GraphEngine::involvesSpecies</a></div><div class="ttdeci">bool involvesSpecies(const fourdst::atomic::Species &species) const</div><div class="ttdoc">Checks if a given species is involved in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00140">engine_graph.cpp:140</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acb7c4f5108b0efeae48ad15598e808c3"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acb7c4f5108b0efeae48ad15598e808c3">gridfire::GraphEngine::m_reactions</a></div><div class="ttdeci">reaction::LogicalReactionSet m_reactions</div><div class="ttdoc">Set of REACLIB reactions in the network.</div><div class="ttdef"><b>Definition</b> <a href="#l00332">engine_graph.h:332</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acdce8d87e23a2cd1504bc9472e538c0f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acdce8d87e23a2cd1504bc9472e538c0f">gridfire::GraphEngine::syncInternalMaps</a></div><div class="ttdeci">void syncInternalMaps()</div><div class="ttdoc">Synchronizes the internal maps.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00062">engine_graph.cpp:62</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_acf4cfccea20f5cb31c9886bf233a28be"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#acf4cfccea20f5cb31c9886bf233a28be">gridfire::GraphEngine::validateConservation</a></div><div class="ttdeci">bool validateConservation() const</div><div class="ttdoc">Validates mass and charge conservation across all reactions.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00148">engine_graph.cpp:148</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad1cb5fd32efc37668e2d9ecf0c72ad24"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad1cb5fd32efc37668e2d9ecf0c72ad24">gridfire::GraphEngine::m_stoichiometryMatrix</a></div><div class="ttdeci">boost::numeric::ublas::compressed_matrix< int > m_stoichiometryMatrix</div><div class="ttdoc">Stoichiometry matrix (species x reactions).</div><div class="ttdef"><b>Definition</b> <a href="#l00339">engine_graph.h:339</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad45650d10fc5dff1673ae3f806d067da"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad45650d10fc5dff1673ae3f806d067da">gridfire::GraphEngine::getNetworkReactions</a></div><div class="ttdeci">const reaction::LogicalReactionSet & getNetworkReactions() const override</div><div class="ttdoc">Gets the set of logical reactions in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00134">engine_graph.cpp:134</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ad8237c252145a75092202d00f5e1ddf7"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ad8237c252145a75092202d00f5e1ddf7">gridfire::GraphEngine::m_speciesToIndexMap</a></div><div class="ttdeci">std::unordered_map< fourdst::atomic::Species, size_t > m_speciesToIndexMap</div><div class="ttdoc">Map from species to their index in the stoichiometry matrix.</div><div class="ttdef"><b>Definition</b> <a href="#l00337">engine_graph.h:337</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_adac8c7d62bae76e17fc060e86dadd929"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#adac8c7d62bae76e17fc060e86dadd929">gridfire::GraphEngine::exportToDot</a></div><div class="ttdeci">void exportToDot(const std::string &filename) const</div><div class="ttdoc">Exports the network to a DOT file for visualization.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00436">engine_graph.cpp:436</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_ae347ff0316e532e0298ec8c913908105"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#ae347ff0316e532e0298ec8c913908105">gridfire::GraphEngine::generateJacobianMatrix</a></div><div class="ttdeci">void generateJacobianMatrix(const std::vector< double > &Y, const double T9, const double rho) override</div><div class="ttdoc">Generates the Jacobian matrix for the current state.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00386">engine_graph.cpp:386</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aed726d36ee2b3796beff6067a1e4db38"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aed726d36ee2b3796beff6067a1e4db38">gridfire::GraphEngine::generateStoichiometryMatrix</a></div><div class="ttdeci">void generateStoichiometryMatrix() override</div><div class="ttdoc">Generates the stoichiometry matrix for the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00303">engine_graph.cpp:303</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aedf42d83bfcc28313b6b6454034d2efa"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aedf42d83bfcc28313b6b6454034d2efa">gridfire::GraphEngine::collectNetworkSpecies</a></div><div class="ttdeci">void collectNetworkSpecies()</div><div class="ttdoc">Collects the unique species in the network.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00072">engine_graph.cpp:72</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_aeeafeab40a5f4dbfae78bdc87e25e93f"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#aeeafeab40a5f4dbfae78bdc87e25e93f">gridfire::GraphEngine::validateComposition</a></div><div class="ttdeci">void validateComposition(const fourdst::composition::Composition &composition, double culling, double T9)</div><div class="ttdoc">Validates the composition against the current reaction set.</div><div class="ttdef"><b>Definition</b> <a href="engine__graph_8cpp_source.html#l00203">engine_graph.cpp:203</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_af17cf3762abac3efcab9a8e87c961210"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#af17cf3762abac3efcab9a8e87c961210">gridfire::GraphEngine::m_screeningModel</a></div><div class="ttdeci">std::unique_ptr< screening::ScreeningModel > m_screeningModel</div><div class="ttdef"><b>Definition</b> <a href="#l00345">engine_graph.h:345</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1_graph_engine_html_af41df9ce979b6410e12642cb093916c9"><div class="ttname"><a href="classgridfire_1_1_graph_engine.html#af41df9ce979b6410e12642cb093916c9">gridfire::GraphEngine::calculateAllDerivatives</a></div><div class="ttdeci">StepDerivatives< T > calculateAllDerivatives(const std::vector< T > &Y_in, T T9, T rho) const</div><div class="ttdoc">Calculates all derivatives (dY/dt) and the energy generation rate.</div><div class="ttdef"><b>Definition</b> <a href="#l00521">engine_graph.h:521</a></div></div>
|
||||
<div class="ttc" id="aclassgridfire_1_1reaction_1_1_reaction_html"><div class="ttname"><a href="classgridfire_1_1reaction_1_1_reaction.html">gridfire::reaction::Reaction</a></div><div class="ttdoc">Represents a single nuclear reaction from a specific data source.</div><div class="ttdef"><b>Definition</b> <a href="reaction_8h_source.html#l00072">reaction.h:72</a></div></div>
|
||||
<div class="ttc" id="aengine__abstract_8h_html"><div class="ttname"><a href="engine__abstract_8h.html">engine_abstract.h</a></div><div class="ttdoc">Abstract interfaces for reaction network engines in GridFire.</div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1reaction_html"><div class="ttname"><a href="namespacegridfire_1_1reaction.html">gridfire::reaction</a></div><div class="ttdef"><b>Definition</b> <a href="reaction_8h_source.html#l00025">reaction.h:25</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1reaction_html_aa86f08712565f278adacc7cd2361eb31"><div class="ttname"><a href="namespacegridfire_1_1reaction.html#aa86f08712565f278adacc7cd2361eb31">gridfire::reaction::LogicalReactionSet</a></div><div class="ttdeci">TemplatedReactionSet< LogicalReaction > LogicalReactionSet</div><div class="ttdoc">A set of logical reactions.</div><div class="ttdef"><b>Definition</b> <a href="reaction_8h_source.html#l00557">reaction.h:557</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_a6ca8556d27ac373e176f5b23437c416e"><div class="ttname"><a href="namespacegridfire_1_1screening.html#a6ca8556d27ac373e176f5b23437c416e">gridfire::screening::selectScreeningModel</a></div><div class="ttdeci">std::unique_ptr< ScreeningModel > selectScreeningModel(ScreeningType type)</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8cpp_source.html#l00009">screening_types.cpp:9</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_aa82aafbc4f8c28d0a75b60798e3a7d25"><div class="ttname"><a href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">gridfire::screening::ScreeningType</a></div><div class="ttdeci">ScreeningType</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8h_source.html#l00008">screening_types.h:8</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71"><div class="ttname"><a href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71">gridfire::screening::ScreeningType::BARE</a></div><div class="ttdeci">@ BARE</div><div class="ttdoc">No screening applied.</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8h_source.html#l00009">screening_types.h:9</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_a6ca8556d27ac373e176f5b23437c416e"><div class="ttname"><a href="namespacegridfire_1_1screening.html#a6ca8556d27ac373e176f5b23437c416e">gridfire::screening::selectScreeningModel</a></div><div class="ttdeci">std::unique_ptr< ScreeningModel > selectScreeningModel(ScreeningType type)</div><div class="ttdoc">A factory function to select and create a screening model.</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8cpp_source.html#l00009">screening_types.cpp:9</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_aa82aafbc4f8c28d0a75b60798e3a7d25"><div class="ttname"><a href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25">gridfire::screening::ScreeningType</a></div><div class="ttdeci">ScreeningType</div><div class="ttdoc">Enumerates the available plasma screening models.</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8h_source.html#l00015">screening_types.h:15</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_1_1screening_html_aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71"><div class="ttname"><a href="namespacegridfire_1_1screening.html#aa82aafbc4f8c28d0a75b60798e3a7d25ad80b95b1abb9c8659fa4cc9d3d29bb71">gridfire::screening::ScreeningType::BARE</a></div><div class="ttdeci">@ BARE</div><div class="ttdoc">No screening applied. The screening factor is always 1.0.</div><div class="ttdef"><b>Definition</b> <a href="screening__types_8h_source.html#l00016">screening_types.h:16</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_html"><div class="ttname"><a href="namespacegridfire.html">gridfire</a></div><div class="ttdef"><b>Definition</b> <a href="engine__abstract_8h_source.html#l00024">engine_abstract.h:24</a></div></div>
|
||||
<div class="ttc" id="anamespacegridfire_html_a1121d0b2d005195333412559fa29d3cc"><div class="ttname"><a href="namespacegridfire.html#a1121d0b2d005195333412559fa29d3cc">gridfire::ADDouble</a></div><div class="ttdeci">CppAD::AD< double > ADDouble</div><div class="ttdoc">Alias for CppAD AD type for double precision.</div><div class="ttdef"><b>Definition</b> <a href="#l00034">engine_graph.h:34</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="#l00056">engine_graph.h:56</a></div></div>
|
||||
@@ -475,6 +519,17 @@ $(function(){initNavTree('engine__graph_8h_source.html',''); initResizable(true)
|
||||
<div class="ttc" id="areaction_8h_html"><div class="ttname"><a href="reaction_8h.html">reaction.h</a></div><div class="ttdoc">Defines classes for representing and managing nuclear reactions.</div></div>
|
||||
<div class="ttc" id="ascreening__abstract_8h_html"><div class="ttname"><a href="screening__abstract_8h.html">screening_abstract.h</a></div></div>
|
||||
<div class="ttc" id="ascreening__types_8h_html"><div class="ttname"><a href="screening__types_8h.html">screening_types.h</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html">gridfire::GraphEngine::PrecomputedReaction</a></div><div class="ttdef"><b>Definition</b> <a href="#l00311">engine_graph.h:311</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_a03d596c88289e21e7bd18711e3a1f275"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a03d596c88289e21e7bd18711e3a1f275">gridfire::GraphEngine::PrecomputedReaction::reactant_powers</a></div><div class="ttdeci">std::vector< int > reactant_powers</div><div class="ttdef"><b>Definition</b> <a href="#l00314">engine_graph.h:314</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_a3e2e67e532970738d20491ea56b170f3"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a3e2e67e532970738d20491ea56b170f3">gridfire::GraphEngine::PrecomputedReaction::affected_species_indices</a></div><div class="ttdeci">std::vector< size_t > affected_species_indices</div><div class="ttdef"><b>Definition</b> <a href="#l00316">engine_graph.h:316</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_a510e380116e2e6d9158cf00fedac2666"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a510e380116e2e6d9158cf00fedac2666">gridfire::GraphEngine::PrecomputedReaction::unique_reactant_indices</a></div><div class="ttdeci">std::vector< size_t > unique_reactant_indices</div><div class="ttdef"><b>Definition</b> <a href="#l00313">engine_graph.h:313</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_a7a7e9167b19e339e0d69544b9c00e79c"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a7a7e9167b19e339e0d69544b9c00e79c">gridfire::GraphEngine::PrecomputedReaction::stoichiometric_coefficients</a></div><div class="ttdeci">std::vector< int > stoichiometric_coefficients</div><div class="ttdef"><b>Definition</b> <a href="#l00317">engine_graph.h:317</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_a93635f6940d3534e949f402503c3d497"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#a93635f6940d3534e949f402503c3d497">gridfire::GraphEngine::PrecomputedReaction::reaction_index</a></div><div class="ttdeci">size_t reaction_index</div><div class="ttdef"><b>Definition</b> <a href="#l00312">engine_graph.h:312</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1_precomputed_reaction_html_ac42504e868c0b9fd9ac9a405ea739f0e"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1_precomputed_reaction.html#ac42504e868c0b9fd9ac9a405ea739f0e">gridfire::GraphEngine::PrecomputedReaction::symmetry_factor</a></div><div class="ttdeci">double symmetry_factor</div><div class="ttdef"><b>Definition</b> <a href="#l00315">engine_graph.h:315</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1constants_html"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1constants.html">gridfire::GraphEngine::constants</a></div><div class="ttdef"><b>Definition</b> <a href="#l00320">engine_graph.h:320</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1constants_html_a3597bc632a5dd50aaa0044d8c18ca423"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1constants.html#a3597bc632a5dd50aaa0044d8c18ca423">gridfire::GraphEngine::constants::u</a></div><div class="ttdeci">const double u</div><div class="ttdoc">Atomic mass unit in g.</div><div class="ttdef"><b>Definition</b> <a href="#l00321">engine_graph.h:321</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1constants_html_a5ccc874d6704615e0ce54c14dc67699d"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1constants.html#a5ccc874d6704615e0ce54c14dc67699d">gridfire::GraphEngine::constants::Na</a></div><div class="ttdeci">const double Na</div><div class="ttdoc">Avogadro's number.</div><div class="ttdef"><b>Definition</b> <a href="#l00322">engine_graph.h:322</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_graph_engine_1_1constants_html_a8bea6e348699c1aea93d17bb56739306"><div class="ttname"><a href="structgridfire_1_1_graph_engine_1_1constants.html#a8bea6e348699c1aea93d17bb56739306">gridfire::GraphEngine::constants::c</a></div><div class="ttdeci">const double c</div><div class="ttdoc">Speed of light in cm/s.</div><div class="ttdef"><b>Definition</b> <a href="#l00323">engine_graph.h:323</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_step_derivatives_html"><div class="ttname"><a href="structgridfire_1_1_step_derivatives.html">gridfire::StepDerivatives</a></div><div class="ttdoc">Structure holding derivatives and energy generation for a network step.</div><div class="ttdef"><b>Definition</b> <a href="engine__abstract_8h_source.html#l00053">engine_abstract.h:53</a></div></div>
|
||||
<div class="ttc" id="astructgridfire_1_1_step_derivatives_html_ab4aeb41be952c7b5844e1ee81fef9008"><div class="ttname"><a href="structgridfire_1_1_step_derivatives.html#ab4aeb41be952c7b5844e1ee81fef9008">gridfire::StepDerivatives::nuclearEnergyGenerationRate</a></div><div class="ttdeci">T nuclearEnergyGenerationRate</div><div class="ttdoc">Specific energy generation rate (e.g., erg/g/s).</div><div class="ttdef"><b>Definition</b> <a href="engine__abstract_8h_source.html#l00055">engine_abstract.h:55</a></div></div>
|
||||
|
||||
Reference in New Issue
Block a user