202 lines
18 KiB
HTML
202 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.13.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GridFire: src/include/gridfire/engine/scratchpads/engine_multiscale_scratchpad.h File Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">GridFire<span id="projectnumber"> v0.7.6rc4.0</span>
|
|
</div>
|
|
<div id="projectbrief">General Purpose Nuclear Network</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.13.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search',true);
|
|
$(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){initNavTree('engine__multiscale__scratchpad_8h.html',''); initResizable(true); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#namespaces">Namespaces</a> </div>
|
|
<div class="headertitle"><div class="title">engine_multiscale_scratchpad.h File Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Scratchpad implementation for the MultiscalePartitioningEngineView.
|
|
<a href="#details">More...</a></p>
|
|
<div class="textblock"><code>#include "<a class="el" href="engine__multiscale_8h.html">gridfire/engine/views/engine_multiscale.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="scratchpad__abstract_8h.html">gridfire/engine/scratchpads/scratchpad_abstract.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="engine_2scratchpads_2types_8h.html">gridfire/engine/scratchpads/types.h</a>"</code><br />
|
|
<code>#include "fourdst/atomic/atomicSpecies.h"</code><br />
|
|
<code>#include <vector></code><br />
|
|
<code>#include <memory></code><br />
|
|
<code>#include <unordered_map></code><br />
|
|
<code>#include "sundials/sundials_context.h"</code><br />
|
|
</div><div class="textblock"><div class="dynheader">
|
|
Include dependency graph for engine_multiscale_scratchpad.h:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="engine__multiscale__scratchpad_8h__incl.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
|
</div>
|
|
</div><div class="textblock"><div class="dynheader">
|
|
This graph shows which files directly or indirectly include this file:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="engine__multiscale__scratchpad_8h__dep__incl.svg" width="100%" height="600"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
|
|
</div>
|
|
</div><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Scratchpad for multiscale partitioning engine computations with QSE groups. <a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
|
|
Namespaces</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire.html">gridfire</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire_1_1engine.html">gridfire::engine</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">namespace  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacegridfire_1_1engine_1_1scratch.html">gridfire::engine::scratch</a></td></tr>
|
|
<tr class="memdesc:namespacegridfire_1_1engine_1_1scratch"><td class="mdescLeft"> </td><td class="mdescRight">Scratchpad memory management for computational engines. <br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Scratchpad implementation for the MultiscalePartitioningEngineView. </p>
|
|
<p>This header defines the MultiscalePartitioningEngineViewScratchPad, a concrete implementation of AbstractScratchPad designed for use with multiscale partitioning algorithms. It provides thread-local storage for QSE (Quasi-Static Equilibrium) groups, solvers, species classifications, and SUNDIALS contexts required for solving stiff subsystems.</p>
|
|
<dl class="section user"><dt>Purpose</dt><dd>The MultiscalePartitioningEngineViewScratchPad stores:<ul>
|
|
<li>QSE groups representing clusters of species in quasi-static equilibrium</li>
|
|
<li>QSE solvers for each group (managed via unique_ptr)</li>
|
|
<li>Classification of species into dynamic vs. algebraic categories</li>
|
|
<li>A composition cache for efficient lookup of computed compositions</li>
|
|
<li>A SUNDIALS context for numerical solver operations</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="section user"><dt>Examples</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include "<a class="code" href="engine__multiscale__scratchpad_8h.html">gridfire/engine/scratchpads/engine_multiscale_scratchpad.h</a>"</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="comment">// Create and initialize the scratchpad</span></div>
|
|
<div class="line"><a class="code hl_struct" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad</a> scratch;</div>
|
|
<div class="line">scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a97f1fffc38872df3edd8c681685aa1fc">initialize</a>();</div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="keywordflow">if</span> (scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#ae61c7a93f9d4f8ded1e9c9dd2221d864">is_initialized</a>()) {</div>
|
|
<div class="line"> <span class="comment">// Add QSE groups and species classifications</span></div>
|
|
<div class="line"> scratch.<a class="code hl_variable" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a38ea81d9d616cd0f74747e44948f4ab9">dynamic_species</a>.push_back(hydrogen);</div>
|
|
<div class="line"> scratch.<a class="code hl_variable" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a38ea81d9d616cd0f74747e44948f4ab9">dynamic_species</a>.push_back(helium);</div>
|
|
<div class="line"> scratch.<a class="code hl_variable" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a07552ac293e905112014c421ea15eb2f">algebraic_species</a>.push_back(carbon);</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Use the SUNDIALS context for solver operations</span></div>
|
|
<div class="line"> SUNContext ctx = scratch.<a class="code hl_variable" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a735335d563bb612f19b531107c89fab6">sun_ctx</a>;</div>
|
|
<div class="line">}</div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="comment">// Clone for parallel execution (note: solvers not cloned)</span></div>
|
|
<div class="line"><span class="keyword">auto</span> worker_scratch = scratch.<a class="code hl_function" href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a7dbce2e9a2f940cbde8888aa67f5f3aa">clone</a>();</div>
|
|
<div class="line">worker_scratch->initialize(); <span class="comment">// Must re-initialize for new SUNContext</span></div>
|
|
<div class="ttc" id="aengine__multiscale__scratchpad_8h_html"><div class="ttname"><a href="engine__multiscale__scratchpad_8h.html">engine_multiscale_scratchpad.h</a></div><div class="ttdoc">Scratchpad implementation for the MultiscalePartitioningEngineView.</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad</a></div><div class="ttdoc">Scratchpad for multiscale partitioning engine computations with QSE groups.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:90</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_a07552ac293e905112014c421ea15eb2f"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a07552ac293e905112014c421ea15eb2f">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::algebraic_species</a></div><div class="ttdeci">std::vector< Species > algebraic_species</div><div class="ttdoc">Species that are solved algebraically (fast timescale/QSE).</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:120</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_a38ea81d9d616cd0f74747e44948f4ab9"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a38ea81d9d616cd0f74747e44948f4ab9">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::dynamic_species</a></div><div class="ttdeci">std::vector< Species > dynamic_species</div><div class="ttdoc">Species that evolve on the dynamic (slow) timescale.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:117</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_a735335d563bb612f19b531107c89fab6"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a735335d563bb612f19b531107c89fab6">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::sun_ctx</a></div><div class="ttdeci">SUNContext sun_ctx</div><div class="ttdoc">SUNDIALS context for solver operations.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:127</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_a7dbce2e9a2f940cbde8888aa67f5f3aa"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a7dbce2e9a2f940cbde8888aa67f5f3aa">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::clone</a></div><div class="ttdeci">std::unique_ptr< AbstractScratchPad > clone() const override</div><div class="ttdoc">Create a partial copy of this scratchpad.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:199</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_a97f1fffc38872df3edd8c681685aa1fc"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#a97f1fffc38872df3edd8c681685aa1fc">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::initialize</a></div><div class="ttdeci">void initialize()</div><div class="ttdoc">Initialize the scratchpad by creating a SUNDIALS context.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:153</div></div>
|
|
<div class="ttc" id="astructgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad_html_ae61c7a93f9d4f8ded1e9c9dd2221d864"><div class="ttname"><a href="structgridfire_1_1engine_1_1scratch_1_1_multiscale_partitioning_engine_view_scratch_pad.html#ae61c7a93f9d4f8ded1e9c9dd2221d864">gridfire::engine::scratch::MultiscalePartitioningEngineViewScratchPad::is_initialized</a></div><div class="ttdeci">bool is_initialized() const override</div><div class="ttdoc">Check whether the scratchpad has been initialized.</div><div class="ttdef"><b>Definition</b> engine_multiscale_scratchpad.h:133</div></div>
|
|
</div><!-- fragment --></dd></dl>
|
|
<dl class="section user"><dt>Thread Safety</dt><dd>This class is <b>not thread-safe</b>. Each thread must have its own instance because SUNDIALS contexts and QSE solvers maintain internal state. When cloning, the QSE solvers are not copied and the SUNContext is not cloned; the new instance must call initialize() to create its own context.</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd>AbstractScratchPad </dd>
|
|
<dd>
|
|
MultiscalePartitioningEngineView </dd>
|
|
<dd>
|
|
SUNContext </dd></dl>
|
|
</div></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b0856f6b0d80ccb263b2f415c91f9e17.html">include</a></li><li class="navelem"><a class="el" href="dir_3626e0c0e3c5d7812d6b277dfa4ec364.html">gridfire</a></li><li class="navelem"><a class="el" href="dir_aff155d61c3b73b9ab7dcdc908c4d49e.html">engine</a></li><li class="navelem"><a class="el" href="dir_65a5f8f804465673712f6f1daa9f9ade.html">scratchpads</a></li><li class="navelem"><a class="el" href="engine__multiscale__scratchpad_8h.html">engine_multiscale_scratchpad.h</a></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|