A multi-block mesh generation tool for stellar modeling</h1>
<p>Stroid is a simple multi-block mesh generation tool designed to generate multi-domain meshes for 3D finite element modeling of stellar physics. It uses the MFEM library for mesh generation and manipulation and is capable of generating high-order curvilinear and non-singular meshes.</p>
<blockquoteclass="doxtable">
<p>Note: Stroid is under active development and is not yet stable. Features and interfaces may change in future releases. </p>
</blockquote>
<h1><aclass="anchor"id="autotoc_md2"></a>
Building and Installing</h1>
<p>Stroid uses meson as its build system, specifically we require version 1.3.0 or higher. Further, stroid depends on C++23 standard library features, so both a compatible compiler and standard template library are required. All other dependencies are handled by meson and will be downloaded and built automatically.</p>
</div><!-- fragment --><h3><aclass="anchor"id="autotoc_md4"></a>
Uninstalling</h3>
<p>To uninstall stroid, if you built it using meson and the default ninja backend, you can use the following command </p><divclass="fragment"><divclass="line">sudo ninja uninstall -C build</div>
</div><!-- fragment --><h2><aclass="anchor"id="autotoc_md5"></a>
<p>Stroid can be used either from the command line or from C++. The command line interface is the simplest way to get started. After installation, the <code>stroid generate</code> command should be available in your terminal.</p>
</div><!-- fragment --><p>The main way to interface with this is through the subcommands (currently only <code>generate</code> and <code>info</code> are available):</p>
</div><!-- fragment --><p>where <code>[fmt]</code> is replaced with the desired output format (e.g. vtu, netgen, mfem, etc.). Avalible output formats are:</p>
<ul>
<li>vtu: VTK Unstructured Grid format</li>
<li>mfem: MFEM mesh format</li>
<li>netgen: Netgen mesh format</li>
<li>vtk: Legacy VTK format</li>
<li>paraview: ParaView Data collection format</li>
<li>info: Outputs mesh information to the terminal</li>
</ul>
<p>Further, mesh generation options are loaded from a toml file, a default version of this file can be saved by running </p><divclass="fragment"><divclass="line">stroid info -d</div>
</div><!-- fragment --><p> which will save a default config file to <code>default.toml</code></p>
<tdclass="markdownTableBodyNone">refinement_levels </td><tdclass="markdownTableBodyNone">Number of uniform refinement levels to apply to the mesh after generation </td><tdclass="markdownTableBodyNone">4 </td></tr>
<trclass="markdownTableRowEven">
<tdclass="markdownTableBodyNone">order </td><tdclass="markdownTableBodyNone">The polynomial order of the finite elements in the mesh </td><tdclass="markdownTableBodyNone">3 </td></tr>
<trclass="markdownTableRowOdd">
<tdclass="markdownTableBodyNone">include_external_domain </td><tdclass="markdownTableBodyNone">Whether to include an external domain extending to r_infinity </td><tdclass="markdownTableBodyNone">false </td></tr>
<trclass="markdownTableRowEven">
<tdclass="markdownTableBodyNone">r_core </td><tdclass="markdownTableBodyNone">The radius of the core region of the star </td><tdclass="markdownTableBodyNone">1.5 </td></tr>
<trclass="markdownTableRowOdd">
<tdclass="markdownTableBodyNone">r_star </td><tdclass="markdownTableBodyNone">The radius of the star </td><tdclass="markdownTableBodyNone">5.0 </td></tr>
<trclass="markdownTableRowEven">
<tdclass="markdownTableBodyNone">flattening </td><tdclass="markdownTableBodyNone">The flattening factor of the star (0 for spherical, >0 for oblate) </td><tdclass="markdownTableBodyNone">0 </td></tr>
<trclass="markdownTableRowOdd">
<tdclass="markdownTableBodyNone">r_infinity </td><tdclass="markdownTableBodyNone">The outer radius of the external domain (if included) </td><tdclass="markdownTableBodyNone">6.0 </td></tr>
<trclass="markdownTableRowEven">
<tdclass="markdownTableBodyNone">r_instability </td><tdclass="markdownTableBodyNone">The radius at which no transformations are applied to the initial topology (to avoid singularities) </td><tdclass="markdownTableBodyNone">1e-14 </td></tr>
<trclass="markdownTableRowOdd">
<tdclass="markdownTableBodyNone">core_steepness </td><tdclass="markdownTableBodyNone">The steepness of the transition between the core and envelope regions of the star </td><tdclass="markdownTableBodyNone">1.0 </td></tr>
</table>
<p>If no configuration file is provided, stroid will use the default parameters listed above. Further, configuration files need only include parameters that differ from the defaults, any parameters not specified will use the default values.</p>
<p>Stroid can be used as a library in C++ projects. After installation, include the stroid header and link against the stroid library.</p>
<p>A basic example of using stroid in C++ is shown below (note that you will need a glvis instance running on localhost:19916 to visualize the mesh): </p><divclass="fragment"><divclass="line"><spanclass="preprocessor">#include <memory></span></div>
<divclass="ttc"id="anamespacestroid_1_1_i_o_html_a496f5c16eaffda5922a0b96c1f525dab"><divclass="ttname"><ahref="namespacestroid_1_1_i_o.html#a496f5c16eaffda5922a0b96c1f525dab">stroid::IO::ViewMesh</a></div><divclass="ttdeci">void ViewMesh(mfem::Mesh &mesh, const std::string &title, VISUALIZATION_MODE mode, const std::string &vishost, int visport)</div><divclass="ttdoc">Stream a mesh to a running GLVis server for interactive viewing.</div><divclass="ttdef"><b>Definition</b> mesh.cpp:25</div></div>
<divclass="ttc"id="anamespacestroid_1_1_i_o_html_ad4048304d8a0c7075d2b2a6e465d0b6eaee96e14c2b71bd59252006289ba464cf"><divclass="ttname"><ahref="namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eaee96e14c2b71bd59252006289ba464cf">stroid::IO::VISUALIZATION_MODE::BOUNDARY_ELEMENT_ID</a></div><divclass="ttdeci">@ BOUNDARY_ELEMENT_ID</div><divclass="ttdoc">Color boundary-adjacent elements by boundary attribute/ID.</div><divclass="ttdef"><b>Definition</b> mesh.h:15</div></div>
<divclass="ttc"id="anamespacestroid_1_1topology_html_a5907aa2e639cda703d48d177abc37caf"><divclass="ttname"><ahref="namespacestroid_1_1topology.html#a5907aa2e639cda703d48d177abc37caf">stroid::topology::PromoteToHighOrder</a></div><divclass="ttdeci">void PromoteToHighOrder(mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig >&config)</div><divclass="ttdoc">Promote a mesh to high-order by attaching an H1 nodal finite element space.</div><divclass="ttdef"><b>Definition</b> curvilinear.cpp:8</div></div>
<divclass="ttc"id="anamespacestroid_1_1topology_html_a836ed13e5bac63e7952c3ce4e5532e78"><divclass="ttname"><ahref="namespacestroid_1_1topology.html#a836ed13e5bac63e7952c3ce4e5532e78">stroid::topology::ProjectMesh</a></div><divclass="ttdeci">void ProjectMesh(mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig >&config)</div><divclass="ttdoc">Project high-order mesh nodes using the configured curvilinear mapping.</div><divclass="ttdef"><b>Definition</b> curvilinear.cpp:14</div></div>
<divclass="ttc"id="anamespacestroid_1_1topology_html_abc0d8a1fb8e9c5ac0e259e4c93db7892"><divclass="ttname"><ahref="namespacestroid_1_1topology.html#abc0d8a1fb8e9c5ac0e259e4c93db7892">stroid::topology::BuildSkeleton</a></div><divclass="ttdeci">std::unique_ptr< mfem::Mesh > BuildSkeleton(const fourdst::config::Config< config::MeshConfig >&config)</div><divclass="ttdoc">Build the initial multi-block mesh topology for the star model.</div><divclass="ttdef"><b>Definition</b> topology.cpp:10</div></div>
<p>Stroid is developed as part of the 4D-STAR project.</p>
<p>4D-STAR is funded by European Research Council (ERC) under the Horizon Europe programme (Synergy Grant agreement No. 101071505: 4D-STAR) Work for this project is funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. </p>
</div></div><!-- PageDoc -->
<ahref="doxygen_crawl.html"></a>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->
<ul>
<liclass="footer">Generated by <ahref="https://www.doxygen.org/index.html"><imgclass="footer"src="doxygen.svg"width="104"height="31"alt="doxygen"/></a> 1.13.2 </li>