Compare commits
9 Commits
bf7fa866f1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 475fce5fca | |||
| a3b63a68d1 | |||
| 6a8fcc0290 | |||
| 2db3d6e666 | |||
| e5bfd54234 | |||
| d19a5ae36d | |||
| 38150e3a8d | |||
| 5d61d1d755 | |||
| 5267456dd4 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -101,3 +101,9 @@ output/
|
||||
.idea/
|
||||
|
||||
scratch/
|
||||
|
||||
releases/
|
||||
stroid-dist/
|
||||
stroid-universal-dist.tar.gz
|
||||
stroid-*/
|
||||
stroid-*.tar.gz
|
||||
|
||||
22
build-check/CPPC/meson.build
Normal file
22
build-check/CPPC/meson.build
Normal file
@@ -0,0 +1,22 @@
|
||||
cppc = meson.get_compiler('cpp')
|
||||
|
||||
if cppc.get_id() == 'clang'
|
||||
message('disabling bitwise-instead-of-logical warnings for clang')
|
||||
add_project_arguments('-Wno-bitwise-instead-of-logical', language: 'cpp')
|
||||
endif
|
||||
|
||||
if cppc.get_id() == 'gcc'
|
||||
message('disabling psabi warnings for gcc')
|
||||
add_project_arguments('-Wno-psabi', language: 'cpp')
|
||||
|
||||
if (cppc.version().version_compare('<14.0'))
|
||||
error('g++ version must be at least 14.0, found ' + cppc.version())
|
||||
endif
|
||||
endif
|
||||
|
||||
if not cppc.has_header('print')
|
||||
error('C++ standard library header <print> not found. Please ensure your compiler and standard library supports C++23. We have already validated your compiler version so this is likely an issue with your standard library installation.')
|
||||
endif
|
||||
if not cppc.has_header('format')
|
||||
error('C++ standard library header <format> not found. Please ensure your compiler and standard library supports C++23. We have already validated your compiler version so this is likely an issue with your standard library installation.')
|
||||
endif
|
||||
10
build-check/meson.build
Normal file
10
build-check/meson.build
Normal file
@@ -0,0 +1,10 @@
|
||||
message('Found CXX compiler: ' + meson.get_compiler('cpp').get_id())
|
||||
message('C++ standard set to: ' + get_option('cpp_std'))
|
||||
|
||||
ignore_unused_args = '-Wno-unused-command-line-argument'
|
||||
|
||||
add_global_arguments(ignore_unused_args, language: 'cpp')
|
||||
|
||||
subdir('CPPC')
|
||||
|
||||
|
||||
@@ -5,9 +5,10 @@ mfem_cmake_options.add_cmake_defines({
|
||||
'MFEM_ENABLE_TESTING': 'OFF',
|
||||
'MFEM_ENABLE_MINIAPPS': 'OFF',
|
||||
'MFEM_USE_BENCMARK': 'OFF',
|
||||
'BUILD_SHARED_LIBS': 'ON',
|
||||
'CMAKE_SKIP_INSTALL_RULES': 'ON'
|
||||
'BUILD_SHARED_LIBS': 'OFF',
|
||||
'BUILD_STATIC_LIBS': 'ON',
|
||||
})
|
||||
mfem_cmake_options.set_install(true)
|
||||
|
||||
mfem_sp = cmake.subproject(
|
||||
'mfem',
|
||||
|
||||
@@ -122,15 +122,31 @@ Building</h2>
|
||||
<div class="line">meson compile -C build</div>
|
||||
<div class="line">meson test -C build</div>
|
||||
<div class="line">meson install -C build</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md4"></a>
|
||||
</div><!-- fragment --><h3><a class="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><div class="fragment"><div class="line">sudo ninja uninstall -C build</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md5"></a>
|
||||
Running</h2>
|
||||
<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 class="fragment"><div class="line">stroid generate --help</div>
|
||||
</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 class="fragment"><div class="line">stroid generate -c <path/to/config/file.toml></div>
|
||||
</div><!-- fragment --><div class="fragment"><div class="line">stroid info -d</div>
|
||||
</div><!-- fragment --><p>to save the default configuration to a file named <code>default.toml</code></p>
|
||||
<h2><a class="anchor" id="autotoc_md5"></a>
|
||||
</div><!-- fragment --><p>One can change the output format by specificing one of the avalible output formats <b>after</b> generation options</p>
|
||||
<div class="fragment"><div class="line">stroid generate -c <path/to/config/file.toml> -o "output.vtu" vtu --ref 1</div>
|
||||
</div><!-- fragment --><p>each output format has its own options, which can be viewed by running</p>
|
||||
<div class="fragment"><div class="line">stroid generate [fmt] --help</div>
|
||||
</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><div class="fragment"><div class="line">stroid info -d</div>
|
||||
</div><!-- fragment --><p> which will save a default config file to <code>default.toml</code></p>
|
||||
<h2><a class="anchor" id="autotoc_md6"></a>
|
||||
Configuration File</h2>
|
||||
<p>Stroid uses a TOML configuration file to specify the parameters for mesh generation. An example configuration file is found below</p>
|
||||
<div class="fragment"><div class="line">[main]</div>
|
||||
@@ -166,7 +182,7 @@ Configuration File</h2>
|
||||
<td class="markdownTableBodyNone">core_steepness </td><td class="markdownTableBodyNone">The steepness of the transition between the core and envelope regions of the star </td><td class="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>
|
||||
<h2><a class="anchor" id="autotoc_md6"></a>
|
||||
<h2><a class="anchor" id="autotoc_md7"></a>
|
||||
C++ Interface</h2>
|
||||
<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><div class="fragment"><div class="line"><span class="preprocessor">#include <memory></span></div>
|
||||
@@ -200,10 +216,7 @@ C++ Interface</h2>
|
||||
<div class="ttc" id="anamespacestroid_1_1topology_html_a836ed13e5bac63e7952c3ce4e5532e78"><div class="ttname"><a href="namespacestroid_1_1topology.html#a836ed13e5bac63e7952c3ce4e5532e78">stroid::topology::ProjectMesh</a></div><div class="ttdeci">void ProjectMesh(mfem::Mesh &mesh, const fourdst::config::Config< config::MeshConfig > &config)</div><div class="ttdoc">Project high-order mesh nodes using the configured curvilinear mapping.</div><div class="ttdef"><b>Definition</b> curvilinear.cpp:14</div></div>
|
||||
<div class="ttc" id="anamespacestroid_1_1topology_html_abc0d8a1fb8e9c5ac0e259e4c93db7892"><div class="ttname"><a href="namespacestroid_1_1topology.html#abc0d8a1fb8e9c5ac0e259e4c93db7892">stroid::topology::BuildSkeleton</a></div><div class="ttdeci">std::unique_ptr< mfem::Mesh > BuildSkeleton(const fourdst::config::Config< config::MeshConfig > &config)</div><div class="ttdoc">Build the initial multi-block mesh topology for the star model.</div><div class="ttdef"><b>Definition</b> topology.cpp:10</div></div>
|
||||
<div class="ttc" id="atopology_8h_html"><div class="ttname"><a href="topology_8h.html">topology.h</a></div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md7"></a>
|
||||
Example Meshes</h1>
|
||||
<p>An example mesh with the default configuration parameters is shown below (coloration indicates attribute IDs of different regions): <img src="assets/imgs/ExampleMesh.png" alt="Example Mesh" class="inline"/></p>
|
||||
<h1><a class="anchor" id="autotoc_md8"></a>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md8"></a>
|
||||
Funding</h1>
|
||||
<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>
|
||||
|
||||
@@ -27,12 +27,13 @@ var NAVTREE =
|
||||
[ "stroid", "index.html", [
|
||||
[ "A multi-block mesh generation tool for stellar modeling", "index.html#autotoc_md1", null ],
|
||||
[ "Building and Installing", "index.html#autotoc_md2", [
|
||||
[ "Building", "index.html#autotoc_md3", null ],
|
||||
[ "Running", "index.html#autotoc_md4", null ],
|
||||
[ "Configuration File", "index.html#autotoc_md5", null ],
|
||||
[ "C++ Interface", "index.html#autotoc_md6", null ]
|
||||
[ "Building", "index.html#autotoc_md3", [
|
||||
[ "Uninstalling", "index.html#autotoc_md4", null ]
|
||||
] ],
|
||||
[ "Running", "index.html#autotoc_md5", null ],
|
||||
[ "Configuration File", "index.html#autotoc_md6", null ],
|
||||
[ "C++ Interface", "index.html#autotoc_md7", null ]
|
||||
] ],
|
||||
[ "Example Meshes", "index.html#autotoc_md7", null ],
|
||||
[ "Funding", "index.html#autotoc_md8", null ],
|
||||
[ "Namespaces", "namespaces.html", [
|
||||
[ "Namespace List", "namespaces.html", "namespaces_dup" ],
|
||||
|
||||
@@ -1,90 +1,90 @@
|
||||
var NAVTREEINDEX0 =
|
||||
{
|
||||
"_logo_8png.html":[6,0,0,0,0],
|
||||
"annotated.html":[5,0],
|
||||
"classes.html":[5,1],
|
||||
"config_8h.html":[6,0,1,0,0,0,0],
|
||||
"curvilinear_8cpp.html":[6,0,1,1,1,0],
|
||||
"curvilinear_8h.html":[6,0,1,0,0,2,0],
|
||||
"dir_31a6c70da1404d38d1b51e38b19548a1.html":[6,0,1,0,0,1],
|
||||
"dir_3f4f28e99864f6e7d54ad0c93ce0a2a5.html":[6,0,1,0,0],
|
||||
"dir_49e56c817e5e54854c35e136979f97ca.html":[6,0,0],
|
||||
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[6,0,1],
|
||||
"dir_82887d4f338e92537fa9d809bec8c614.html":[6,0,1,1,0],
|
||||
"dir_87d18a4dc5174905bfd7d2dc734defe6.html":[6,0,1,1,2],
|
||||
"dir_936721fd6a792737eaef7358bcd49428.html":[6,0,1,1,1],
|
||||
"dir_9d5018b9ddb63a582aa4c6b91bec2f8c.html":[6,0,1,0,0,3],
|
||||
"dir_9da86e8abab39b749c6020360d8e4403.html":[6,0,1,0,0,2],
|
||||
"dir_b0856f6b0d80ccb263b2f415c91f9e17.html":[6,0,1,0],
|
||||
"dir_c34d5e8363cf0aa3fabc4f3fad3412a4.html":[6,0,0,0],
|
||||
"dir_c85d3e3c5052e9ad9ce18c6863244a25.html":[6,0,1,1],
|
||||
"dir_dc36fd7496f87f6989d6d6a9445d600c.html":[6,0,1,0,0,0],
|
||||
"files.html":[6,0],
|
||||
"functions.html":[5,2,0],
|
||||
"functions_vars.html":[5,2,1],
|
||||
"_logo_8png.html":[5,0,0,0,0],
|
||||
"annotated.html":[4,0],
|
||||
"classes.html":[4,1],
|
||||
"config_8h.html":[5,0,1,0,0,0,0],
|
||||
"curvilinear_8cpp.html":[5,0,1,1,1,0],
|
||||
"curvilinear_8h.html":[5,0,1,0,0,2,0],
|
||||
"dir_31a6c70da1404d38d1b51e38b19548a1.html":[5,0,1,0,0,1],
|
||||
"dir_3f4f28e99864f6e7d54ad0c93ce0a2a5.html":[5,0,1,0,0],
|
||||
"dir_49e56c817e5e54854c35e136979f97ca.html":[5,0,0],
|
||||
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[5,0,1],
|
||||
"dir_82887d4f338e92537fa9d809bec8c614.html":[5,0,1,1,0],
|
||||
"dir_87d18a4dc5174905bfd7d2dc734defe6.html":[5,0,1,1,2],
|
||||
"dir_936721fd6a792737eaef7358bcd49428.html":[5,0,1,1,1],
|
||||
"dir_9d5018b9ddb63a582aa4c6b91bec2f8c.html":[5,0,1,0,0,3],
|
||||
"dir_9da86e8abab39b749c6020360d8e4403.html":[5,0,1,0,0,2],
|
||||
"dir_b0856f6b0d80ccb263b2f415c91f9e17.html":[5,0,1,0],
|
||||
"dir_c34d5e8363cf0aa3fabc4f3fad3412a4.html":[5,0,0,0],
|
||||
"dir_c85d3e3c5052e9ad9ce18c6863244a25.html":[5,0,1,1],
|
||||
"dir_dc36fd7496f87f6989d6d6a9445d600c.html":[5,0,1,0,0,0],
|
||||
"files.html":[5,0],
|
||||
"functions.html":[4,2,0],
|
||||
"functions_vars.html":[4,2,1],
|
||||
"index.html":[],
|
||||
"index.html#autotoc_md1":[0],
|
||||
"index.html#autotoc_md2":[1],
|
||||
"index.html#autotoc_md3":[1,0],
|
||||
"index.html#autotoc_md4":[1,1],
|
||||
"index.html#autotoc_md5":[1,2],
|
||||
"index.html#autotoc_md6":[1,3],
|
||||
"index.html#autotoc_md7":[2],
|
||||
"index.html#autotoc_md8":[3],
|
||||
"mapping_8cpp.html":[6,0,1,1,1,1],
|
||||
"mapping_8h.html":[6,0,1,0,0,2,1],
|
||||
"mesh_8cpp.html":[6,0,1,1,0,0],
|
||||
"mesh_8h.html":[6,0,1,0,0,1,0],
|
||||
"mesh__utils_8cpp.html":[6,0,1,1,2,0],
|
||||
"mesh__utils_8h.html":[6,0,1,0,0,3,0],
|
||||
"namespacemembers.html":[4,1,0],
|
||||
"namespacemembers_enum.html":[4,1,2],
|
||||
"namespacemembers_func.html":[4,1,1],
|
||||
"namespaces.html":[4,0],
|
||||
"namespacestroid.html":[4,0,0],
|
||||
"namespacestroid_1_1_i_o.html":[4,0,0,1],
|
||||
"namespacestroid_1_1_i_o.html#a496f5c16eaffda5922a0b96c1f525dab":[4,0,0,1,3],
|
||||
"namespacestroid_1_1_i_o.html#a8100e130b3a49fdee48bc3c4d4e63963":[4,0,0,1,4],
|
||||
"namespacestroid_1_1_i_o.html#ab4c8bda7ab370e34376a7832fbf0951e":[4,0,0,1,2],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6e":[4,0,0,1,0],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eab50339a10e1de285ac99d4c3990b8693":[4,0,0,1,0,0],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eac31a2fe3e97d218a154c1947b43d6bbf":[4,0,0,1,0,1],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eaee96e14c2b71bd59252006289ba464cf":[4,0,0,1,0,2],
|
||||
"namespacestroid_1_1_i_o.html#aeb567ddc70ff2d064c139dee87575830":[4,0,0,1,1],
|
||||
"namespacestroid_1_1config.html":[4,0,0,0],
|
||||
"namespacestroid_1_1topology.html":[4,0,0,2],
|
||||
"namespacestroid_1_1topology.html#a03f0b29ccf7d427a175de9ff75824b7c":[4,0,0,2,0],
|
||||
"namespacestroid_1_1topology.html#a394e33bdfafdaccd6edfaae0642d3456":[4,0,0,2,7],
|
||||
"namespacestroid_1_1topology.html#a5907aa2e639cda703d48d177abc37caf":[4,0,0,2,6],
|
||||
"namespacestroid_1_1topology.html#a59c54a10f726d323f8506b4a2edd7467":[4,0,0,2,1],
|
||||
"namespacestroid_1_1topology.html#a62774bcba7ea1a485892dcd4bed6425b":[4,0,0,2,4],
|
||||
"namespacestroid_1_1topology.html#a7fbf58c40c03bc751d53f4a3273744fc":[4,0,0,2,2],
|
||||
"namespacestroid_1_1topology.html#a836ed13e5bac63e7952c3ce4e5532e78":[4,0,0,2,5],
|
||||
"namespacestroid_1_1topology.html#abc0d8a1fb8e9c5ac0e259e4c93db7892":[4,0,0,2,3],
|
||||
"namespacestroid_1_1utils.html":[4,0,0,3],
|
||||
"namespacestroid_1_1utils.html#a22ab5809195bf85156607790f82b5e2d":[4,0,0,3,1],
|
||||
"namespacestroid_1_1utils.html#ae047d97d7d5dc12812395909d00f5bbe":[4,0,0,3,0],
|
||||
"index.html#autotoc_md4":[1,0,0],
|
||||
"index.html#autotoc_md5":[1,1],
|
||||
"index.html#autotoc_md6":[1,2],
|
||||
"index.html#autotoc_md7":[1,3],
|
||||
"index.html#autotoc_md8":[2],
|
||||
"mapping_8cpp.html":[5,0,1,1,1,1],
|
||||
"mapping_8h.html":[5,0,1,0,0,2,1],
|
||||
"mesh_8cpp.html":[5,0,1,1,0,0],
|
||||
"mesh_8h.html":[5,0,1,0,0,1,0],
|
||||
"mesh__utils_8cpp.html":[5,0,1,1,2,0],
|
||||
"mesh__utils_8h.html":[5,0,1,0,0,3,0],
|
||||
"namespacemembers.html":[3,1,0],
|
||||
"namespacemembers_enum.html":[3,1,2],
|
||||
"namespacemembers_func.html":[3,1,1],
|
||||
"namespaces.html":[3,0],
|
||||
"namespacestroid.html":[3,0,0],
|
||||
"namespacestroid_1_1_i_o.html":[3,0,0,1],
|
||||
"namespacestroid_1_1_i_o.html#a496f5c16eaffda5922a0b96c1f525dab":[3,0,0,1,3],
|
||||
"namespacestroid_1_1_i_o.html#a8100e130b3a49fdee48bc3c4d4e63963":[3,0,0,1,4],
|
||||
"namespacestroid_1_1_i_o.html#ab4c8bda7ab370e34376a7832fbf0951e":[3,0,0,1,2],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6e":[3,0,0,1,0],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eab50339a10e1de285ac99d4c3990b8693":[3,0,0,1,0,0],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eac31a2fe3e97d218a154c1947b43d6bbf":[3,0,0,1,0,1],
|
||||
"namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eaee96e14c2b71bd59252006289ba464cf":[3,0,0,1,0,2],
|
||||
"namespacestroid_1_1_i_o.html#aeb567ddc70ff2d064c139dee87575830":[3,0,0,1,1],
|
||||
"namespacestroid_1_1config.html":[3,0,0,0],
|
||||
"namespacestroid_1_1topology.html":[3,0,0,2],
|
||||
"namespacestroid_1_1topology.html#a03f0b29ccf7d427a175de9ff75824b7c":[3,0,0,2,0],
|
||||
"namespacestroid_1_1topology.html#a394e33bdfafdaccd6edfaae0642d3456":[3,0,0,2,7],
|
||||
"namespacestroid_1_1topology.html#a5907aa2e639cda703d48d177abc37caf":[3,0,0,2,6],
|
||||
"namespacestroid_1_1topology.html#a59c54a10f726d323f8506b4a2edd7467":[3,0,0,2,1],
|
||||
"namespacestroid_1_1topology.html#a62774bcba7ea1a485892dcd4bed6425b":[3,0,0,2,4],
|
||||
"namespacestroid_1_1topology.html#a7fbf58c40c03bc751d53f4a3273744fc":[3,0,0,2,2],
|
||||
"namespacestroid_1_1topology.html#a836ed13e5bac63e7952c3ce4e5532e78":[3,0,0,2,5],
|
||||
"namespacestroid_1_1topology.html#abc0d8a1fb8e9c5ac0e259e4c93db7892":[3,0,0,2,3],
|
||||
"namespacestroid_1_1utils.html":[3,0,0,3],
|
||||
"namespacestroid_1_1utils.html#a22ab5809195bf85156607790f82b5e2d":[3,0,0,3,1],
|
||||
"namespacestroid_1_1utils.html#ae047d97d7d5dc12812395909d00f5bbe":[3,0,0,3,0],
|
||||
"pages.html":[],
|
||||
"structstroid_1_1config_1_1_mesh_config.html":[3,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html":[4,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html":[5,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a062652781f4f3ea0b7ca8764362a7368":[3,0,0,0,0,2],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a062652781f4f3ea0b7ca8764362a7368":[4,0,0,0,0,2],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a062652781f4f3ea0b7ca8764362a7368":[5,0,0,0,0,2],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a3fe80a30990d484dcc39b6f9a0befc05":[3,0,0,0,0,7],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a3fe80a30990d484dcc39b6f9a0befc05":[4,0,0,0,0,7],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a3fe80a30990d484dcc39b6f9a0befc05":[5,0,0,0,0,7],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a4da6d99ff7ba24d2f917e1fd98ddd877":[3,0,0,0,0,6],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a4da6d99ff7ba24d2f917e1fd98ddd877":[4,0,0,0,0,6],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a4da6d99ff7ba24d2f917e1fd98ddd877":[5,0,0,0,0,6],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a5c68a895f73dc82a38a8daac22a83ad7":[3,0,0,0,0,4],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a5c68a895f73dc82a38a8daac22a83ad7":[4,0,0,0,0,4],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a5c68a895f73dc82a38a8daac22a83ad7":[5,0,0,0,0,4],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a860e78f1906acb0c3aa08d55f94de3fd":[3,0,0,0,0,3],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a860e78f1906acb0c3aa08d55f94de3fd":[4,0,0,0,0,3],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a860e78f1906acb0c3aa08d55f94de3fd":[5,0,0,0,0,3],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a8cafcbebf64ae251517118eb152de981":[3,0,0,0,0,8],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a8cafcbebf64ae251517118eb152de981":[4,0,0,0,0,8],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#a8cafcbebf64ae251517118eb152de981":[5,0,0,0,0,8],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#ac7546899ebbfe191ea3a8bf2403b31eb":[3,0,0,0,0,5],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#ac7546899ebbfe191ea3a8bf2403b31eb":[4,0,0,0,0,5],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#ac7546899ebbfe191ea3a8bf2403b31eb":[5,0,0,0,0,5],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#aed32864839b149c94842801b6413d94d":[3,0,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#aed32864839b149c94842801b6413d94d":[4,0,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#aed32864839b149c94842801b6413d94d":[5,0,0,0,0,0],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#affad4638b0ae7b710f2b2db992f6f584":[3,0,0,0,0,1],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#affad4638b0ae7b710f2b2db992f6f584":[4,0,0,0,0,1],
|
||||
"structstroid_1_1config_1_1_mesh_config.html#affad4638b0ae7b710f2b2db992f6f584":[5,0,0,0,0,1],
|
||||
"topology_8cpp.html":[6,0,1,1,1,2],
|
||||
"topology_8h.html":[6,0,1,0,0,2,2]
|
||||
"topology_8cpp.html":[5,0,1,1,1,2],
|
||||
"topology_8h.html":[5,0,1,0,0,2,2]
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var searchData=
|
||||
[
|
||||
['c_20interface_0',['C++ Interface',['../index.html#autotoc_md6',1,'']]],
|
||||
['c_20interface_0',['C++ Interface',['../index.html#autotoc_md7',1,'']]],
|
||||
['config_2eh_1',['config.h',['../config_8h.html',1,'']]],
|
||||
['configuration_20file_2',['Configuration File',['../index.html#autotoc_md5',1,'']]],
|
||||
['configuration_20file_2',['Configuration File',['../index.html#autotoc_md6',1,'']]],
|
||||
['core_5fsteepness_3',['core_steepness',['../structstroid_1_1config_1_1_mesh_config.html#aed32864839b149c94842801b6413d94d',1,'stroid::config::MeshConfig']]],
|
||||
['curvilinear_2ecpp_4',['curvilinear.cpp',['../curvilinear_8cpp.html',1,'']]],
|
||||
['curvilinear_2eh_5',['curvilinear.h',['../curvilinear_8h.html',1,'']]]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['element_5fid_0',['ELEMENT_ID',['../namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eac31a2fe3e97d218a154c1947b43d6bbf',1,'stroid::IO']]],
|
||||
['example_20meshes_1',['Example Meshes',['../index.html#autotoc_md7',1,'']]]
|
||||
['element_5fid_0',['ELEMENT_ID',['../namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6eac31a2fe3e97d218a154c1947b43d6bbf',1,'stroid::IO']]]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['file_0',['Configuration File',['../index.html#autotoc_md5',1,'']]],
|
||||
['file_0',['Configuration File',['../index.html#autotoc_md6',1,'']]],
|
||||
['finalize_1',['Finalize',['../namespacestroid_1_1topology.html#a62774bcba7ea1a485892dcd4bed6425b',1,'stroid::topology']]],
|
||||
['flattening_2',['flattening',['../structstroid_1_1config_1_1_mesh_config.html#affad4638b0ae7b710f2b2db992f6f584',1,'stroid::config::MeshConfig']]],
|
||||
['for_20stellar_20modeling_3',['A multi-block mesh generation tool for stellar modeling',['../index.html#autotoc_md1',1,'']]],
|
||||
|
||||
@@ -2,5 +2,5 @@ var searchData=
|
||||
[
|
||||
['include_5fexternal_5fdomain_0',['include_external_domain',['../structstroid_1_1config_1_1_mesh_config.html#a062652781f4f3ea0b7ca8764362a7368',1,'stroid::config::MeshConfig']]],
|
||||
['installing_1',['Building and Installing',['../index.html#autotoc_md2',1,'']]],
|
||||
['interface_2',['C++ Interface',['../index.html#autotoc_md6',1,'']]]
|
||||
['interface_2',['C++ Interface',['../index.html#autotoc_md7',1,'']]]
|
||||
];
|
||||
|
||||
@@ -11,7 +11,6 @@ var searchData=
|
||||
['mesh_5futils_2ecpp_8',['mesh_utils.cpp',['../mesh__utils_8cpp.html',1,'']]],
|
||||
['mesh_5futils_2eh_9',['mesh_utils.h',['../mesh__utils_8h.html',1,'']]],
|
||||
['meshconfig_10',['MeshConfig',['../structstroid_1_1config_1_1_mesh_config.html',1,'stroid::config']]],
|
||||
['meshes_11',['Example Meshes',['../index.html#autotoc_md7',1,'']]],
|
||||
['modeling_12',['A multi-block mesh generation tool for stellar modeling',['../index.html#autotoc_md1',1,'']]],
|
||||
['multi_20block_20mesh_20generation_20tool_20for_20stellar_20modeling_13',['A multi-block mesh generation tool for stellar modeling',['../index.html#autotoc_md1',1,'']]]
|
||||
['modeling_11',['A multi-block mesh generation tool for stellar modeling',['../index.html#autotoc_md1',1,'']]],
|
||||
['multi_20block_20mesh_20generation_20tool_20for_20stellar_20modeling_12',['A multi-block mesh generation tool for stellar modeling',['../index.html#autotoc_md1',1,'']]]
|
||||
];
|
||||
|
||||
@@ -5,5 +5,5 @@ var searchData=
|
||||
['r_5finstability_2',['r_instability',['../structstroid_1_1config_1_1_mesh_config.html#a4da6d99ff7ba24d2f917e1fd98ddd877',1,'stroid::config::MeshConfig']]],
|
||||
['r_5fstar_3',['r_star',['../structstroid_1_1config_1_1_mesh_config.html#a3fe80a30990d484dcc39b6f9a0befc05',1,'stroid::config::MeshConfig']]],
|
||||
['refinement_5flevels_4',['refinement_levels',['../structstroid_1_1config_1_1_mesh_config.html#a8cafcbebf64ae251517118eb152de981',1,'stroid::config::MeshConfig']]],
|
||||
['running_5',['Running',['../index.html#autotoc_md4',1,'']]]
|
||||
['running_5',['Running',['../index.html#autotoc_md5',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['viewmesh_0',['ViewMesh',['../namespacestroid_1_1_i_o.html#a496f5c16eaffda5922a0b96c1f525dab',1,'stroid::IO']]],
|
||||
['visualization_5fmode_1',['VISUALIZATION_MODE',['../namespacestroid_1_1_i_o.html#ad4048304d8a0c7075d2b2a6e465d0b6e',1,'stroid::IO']]],
|
||||
['visualizefacevalence_2',['VisualizeFaceValence',['../namespacestroid_1_1_i_o.html#a8100e130b3a49fdee48bc3c4d4e63963',1,'stroid::IO']]]
|
||||
['uninstalling_0',['Uninstalling',['../index.html#autotoc_md4',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var indexSectionsWithContent =
|
||||
{
|
||||
0: "abcefgilmnoprstv",
|
||||
0: "abcefgilmnoprstuv",
|
||||
1: "m",
|
||||
2: "s",
|
||||
3: "clmt",
|
||||
|
||||
35
docs/static/mainpage.md
vendored
35
docs/static/mainpage.md
vendored
@@ -24,6 +24,12 @@ meson test -C build
|
||||
meson install -C build
|
||||
```
|
||||
|
||||
#### Uninstalling
|
||||
To uninstall stroid, if you built it using meson and the default ninja backend, you can use the following command
|
||||
```bash
|
||||
sudo ninja uninstall -C build
|
||||
```
|
||||
|
||||
### Running
|
||||
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 `stroid generate` command should be available in your terminal.
|
||||
@@ -38,11 +44,32 @@ The main way to interface with this is through the subcommands (currently only `
|
||||
stroid generate -c <path/to/config/file.toml>
|
||||
```
|
||||
|
||||
One can change the output format by specificing one of the avalible output formats __after__ generation options
|
||||
|
||||
```bash
|
||||
stroid generate -c <path/to/config/file.toml> -o "output.vtu" vtu --ref 1
|
||||
```
|
||||
|
||||
each output format has its own options, which can be viewed by running
|
||||
|
||||
```bash
|
||||
stroid generate [fmt] --help
|
||||
```
|
||||
|
||||
where ``[fmt]`` is replaced with the desired output format (e.g. vtu, netgen, mfem, etc.). Avalible output formats are:
|
||||
|
||||
- vtu: VTK Unstructured Grid format
|
||||
- mfem: MFEM mesh format
|
||||
- netgen: Netgen mesh format
|
||||
- vtk: Legacy VTK format
|
||||
- paraview: ParaView Data collection format
|
||||
- info: Outputs mesh information to the terminal
|
||||
|
||||
Further, mesh generation options are loaded from a toml file, a default version of this file can be saved by running
|
||||
```bash
|
||||
stroid info -d
|
||||
```
|
||||
|
||||
to save the default configuration to a file named ``default.toml``
|
||||
which will save a default config file to ``default.toml``
|
||||
|
||||
### Configuration File
|
||||
Stroid uses a TOML configuration file to specify the parameters for mesh generation. An example configuration
|
||||
@@ -106,10 +133,6 @@ int main() {
|
||||
}
|
||||
```
|
||||
|
||||
## Example Meshes
|
||||
An example mesh with the default configuration parameters is shown below (coloration indicates attribute IDs of different regions):
|
||||

|
||||
|
||||
## Funding
|
||||
Stroid is developed as part of the 4D-STAR project.
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
project('stroid', 'cpp', meson_version : '>= 1.3.0', version : 'v0.1.0', default_options : ['cpp_std=c++23'])
|
||||
|
||||
subdir('build-check')
|
||||
|
||||
subdir('build-config')
|
||||
subdir('src')
|
||||
|
||||
|
||||
113
package_release.sh
Executable file
113
package_release.sh
Executable file
@@ -0,0 +1,113 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
RELEASE_DIR="releases"
|
||||
STAGING_DIR="stroid-dist"
|
||||
|
||||
REQUIRED_BINARIES=(
|
||||
"stroid-macos-arm64"
|
||||
"stroid-linux-x86_64"
|
||||
"stroid-linux-arm64"
|
||||
)
|
||||
|
||||
for bin in "${REQUIRED_BINARIES[@]}"; do
|
||||
if [ ! -f "$RELEASE_DIR/$bin" ]; then
|
||||
echo "Error: Missing binary $RELEASE_DIR/$bin. Run release.sh first."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
chmod +x "$RELEASE_DIR/stroid-macos-arm64"
|
||||
VERSION_OUTPUT=$("$RELEASE_DIR/stroid-macos-arm64" info -v)
|
||||
VERSION=$(echo "$VERSION_OUTPUT" | awk '{print $3}')
|
||||
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Error: Could not extract version from binary output."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TARBALL_NAME="stroid-${VERSION}.tar.gz"
|
||||
|
||||
echo "Packaging Stroid version ${VERSION}..."
|
||||
|
||||
rm -rf "$STAGING_DIR"
|
||||
mkdir -p "$STAGING_DIR/bin"
|
||||
|
||||
for bin in "${REQUIRED_BINARIES[@]}"; do
|
||||
cp "$RELEASE_DIR/$bin" "$STAGING_DIR/bin/"
|
||||
done
|
||||
|
||||
cat << 'EOF' > "$STAGING_DIR/install.sh"
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
OS=$(uname -s)
|
||||
ARCH=$(uname -m)
|
||||
INSTALL_PATH=$1
|
||||
|
||||
echo "Detecting system: $OS ($ARCH)"
|
||||
|
||||
case "$OS" in
|
||||
Darwin)
|
||||
if [ "$ARCH" = "arm64" ]; then
|
||||
SELECTED_BIN="bin/stroid-macos-arm64"
|
||||
else
|
||||
echo "Error: Intel Macs (x86_64) are not supported by this package."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
Linux)
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
SELECTED_BIN="bin/stroid-linux-x86_64"
|
||||
elif [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then
|
||||
SELECTED_BIN="bin/stroid-linux-arm64"
|
||||
else
|
||||
echo "Error: Linux architecture $ARCH is not supported."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Error: Operating system $OS is not supported."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Verifying binary integrity..."
|
||||
chmod +x "$SELECTED_BIN"
|
||||
if ! ./"$SELECTED_BIN" info -v > /dev/null 2>&1; then
|
||||
echo "Error: The selected binary failed the version check. It may be incompatible with this system's libraries."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION_INFO=$(./"$SELECTED_BIN" info -v)
|
||||
echo "Verification successful: $VERSION_INFO"
|
||||
|
||||
if [ -z "$INSTALL_PATH" ]; then
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
INSTALL_PATH="/usr/local/bin"
|
||||
else
|
||||
INSTALL_PATH="$HOME/.local/bin"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$INSTALL_PATH"
|
||||
|
||||
echo "Installing to: $INSTALL_PATH/stroid"
|
||||
cp "$SELECTED_BIN" "$INSTALL_PATH/stroid"
|
||||
chmod +x "$INSTALL_PATH/stroid"
|
||||
|
||||
echo "Installation complete."
|
||||
if [[ ":$PATH:" != *":$INSTALL_PATH:"* ]]; then
|
||||
echo "Note: $INSTALL_PATH is not in your PATH. Add it to your shell profile to run 'stroid' from anywhere."
|
||||
fi
|
||||
EOF
|
||||
|
||||
chmod +x "$STAGING_DIR/install.sh"
|
||||
|
||||
export COPYFILE_DISABLE=1
|
||||
tar -cz --no-xattrs -f "$TARBALL_NAME" -C "$STAGING_DIR" .
|
||||
|
||||
echo "Distribution package created: $TARBALL_NAME"
|
||||
|
||||
rm -rf "$STAGING_DIR"
|
||||
31
readme.md
31
readme.md
@@ -25,6 +25,12 @@ meson test -C build
|
||||
meson install -C build
|
||||
```
|
||||
|
||||
#### Uninstalling
|
||||
To uninstall stroid, if you built it using meson and the default ninja backend, you can use the following command
|
||||
```bash
|
||||
sudo ninja uninstall -C build
|
||||
```
|
||||
|
||||
### Running
|
||||
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 `stroid generate` command should be available in your terminal.
|
||||
@@ -39,11 +45,32 @@ The main way to interface with this is through the subcommands (currently only `
|
||||
stroid generate -c <path/to/config/file.toml>
|
||||
```
|
||||
|
||||
One can change the output format by specificing one of the avalible output formats __after__ generation options
|
||||
|
||||
```bash
|
||||
stroid generate -c <path/to/config/file.toml> -o "output.vtu" vtu --ref 1
|
||||
```
|
||||
|
||||
each output format has its own options, which can be viewed by running
|
||||
|
||||
```bash
|
||||
stroid generate [fmt] --help
|
||||
```
|
||||
|
||||
where ``[fmt]`` is replaced with the desired output format (e.g. vtu, netgen, mfem, etc.). Avalible output formats are:
|
||||
|
||||
- vtu: VTK Unstructured Grid format
|
||||
- mfem: MFEM mesh format
|
||||
- netgen: Netgen mesh format
|
||||
- vtk: Legacy VTK format
|
||||
- paraview: ParaView Data collection format
|
||||
- info: Outputs mesh information to the terminal
|
||||
|
||||
Further, mesh generation options are loaded from a toml file, a default version of this file can be saved by running
|
||||
```bash
|
||||
stroid info -d
|
||||
```
|
||||
|
||||
to save the default configuration to a file named ``default.toml``
|
||||
which will save a default config file to ``default.toml``
|
||||
|
||||
### Configuration File
|
||||
Stroid uses a TOML configuration file to specify the parameters for mesh generation. An example configuration
|
||||
|
||||
44
release.md
Normal file
44
release.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Generating Releases
|
||||
|
||||
> This document is likely only of interest to developers wishing to build release files. If you wish to use
|
||||
> stroid, please refer to the main readme instructions.
|
||||
|
||||
## Building
|
||||
Release files can be built on an arm mac using the following commands:
|
||||
|
||||
```bash
|
||||
./release.sh
|
||||
```
|
||||
|
||||
all release files will be placed in the `releases/` folder.
|
||||
|
||||
This will construct release files for arm mac, arm linux, and x86_64 linux. These should be
|
||||
compatible with most systems (linux more recent than 2020 and macOS more recent than 15.0)
|
||||
|
||||
For those who wish to build from source see the main readme instructions.
|
||||
|
||||
## Packaging
|
||||
The auto-generated release files are named according to the following convention:
|
||||
`stroid-<os>-<arch>`, these are all statically linked so they should
|
||||
just run on system. To distribute these files we want to package them into a single
|
||||
archive file along with an installation script which will select the correct binary
|
||||
for the host system. There is a script `package_release.sh` which will do this automatically.
|
||||
|
||||
Once the release files have been generated, run the following command:
|
||||
|
||||
```bash
|
||||
./package_release.sh
|
||||
```
|
||||
|
||||
## Uploading
|
||||
Once the release files have been packaged, they can be uploaded to the github releases page. This can be done manually through the github web interface, or
|
||||
automatically using the `gh` CLI tool. To upload using the CLI tool, first ensure you have it installed and authenticated with your
|
||||
github account. Then run the following command:
|
||||
|
||||
```bash
|
||||
gh release create <tag> ./stroid-release.tar.gz
|
||||
```
|
||||
|
||||
Alternatively, you can upload the files manually through the github web interface by navigating to the releases page of
|
||||
the repository and clicking on "Draft a new release". From there, you can upload the `stroid-release.tar.gz` file and
|
||||
publish the release.
|
||||
80
release.sh
Executable file
80
release.sh
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Confirm that the script is being run on a macOS aarch64 host
|
||||
ARCHITECTURE=$(uname -m)
|
||||
OS_NAME=$(uname -s)
|
||||
if [[ "$OS_NAME" != "Darwin" || "$ARCHITECTURE" != "arm64" ]]; then
|
||||
echo "This release script must be run on a macOS aarch64 host."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROJECT_NAME="stroid"
|
||||
MACOS_MIN_VERSION="15.0"
|
||||
OUTPUT_DIR="releases"
|
||||
|
||||
# Confirm that Meson and Ninja are installed
|
||||
if ! command -v meson &> /dev/null || ! command -v ninja &> /dev/null; then
|
||||
echo "Meson and Ninja are required to build the project."
|
||||
echo "Please install them via pip:"
|
||||
echo " pip install meson ninja"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Confirm that the current macOS version meets the minimum requirement
|
||||
CURRENT_MACOS_VERSION=$(sw_vers -productVersion)
|
||||
if [[ "$(printf '%s\n%s\n' "$MACOS_MIN_VERSION" "$CURRENT_MACOS_VERSION" | sort -V | head -n1)" != "$MACOS_MIN_VERSION" ]]; then
|
||||
echo "Current macOS version ($CURRENT_MACOS_VERSION) does not meet the minimum requirement ($MACOS_MIN_VERSION)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
X86_IMAGE="quay.io/pypa/manylinux_2_28_x86_64"
|
||||
ARM_IMAGE="quay.io/pypa/manylinux_2_28_aarch64"
|
||||
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
echo "Starting release build for $PROJECT_NAME..."
|
||||
|
||||
echo "Building for macOS (ARM64, Target >= $MACOS_MIN_VERSION)..."
|
||||
rm -rf build-mac
|
||||
export MACOSX_DEPLOYMENT_TARGET=$MACOS_MIN_VERSION
|
||||
|
||||
meson setup build-mac \
|
||||
--buildtype release \
|
||||
-Dcpp_args="-mmacosx-version-min=$MACOS_MIN_VERSION" \
|
||||
-Dcpp_link_args="-mmacosx-version-min=$MACOS_MIN_VERSION"
|
||||
|
||||
meson compile -C build-mac
|
||||
cp build-mac/tools/stroid "$OUTPUT_DIR/stroid-macos-arm64"
|
||||
|
||||
echo "Building for Linux (x86_64) via Manylinux 2.28..."
|
||||
docker run --rm --platform linux/amd64 \
|
||||
-v "$(pwd)":/src -w /src \
|
||||
$X86_IMAGE /bin/bash -c "
|
||||
/opt/python/cp311-cp311/bin/pip install meson ninja
|
||||
export PATH=/opt/python/cp311-cp311/bin:\$PATH
|
||||
|
||||
rm -rf build-linux-x86
|
||||
meson setup build-linux-x86 --buildtype release -Dbuild_tests=false
|
||||
meson compile -C build-linux-x86
|
||||
cp build-linux-x86/tools/stroid /src/$OUTPUT_DIR/stroid-linux-x86_64
|
||||
"
|
||||
|
||||
echo "Building for Linux (ARM64) via Manylinux 2.28..."
|
||||
docker run --rm --platform linux/arm64 \
|
||||
-v "$(pwd)":/src -w /src \
|
||||
$ARM_IMAGE /bin/bash -c "
|
||||
/opt/python/cp311-cp311/bin/pip install meson ninja
|
||||
export PATH=/opt/python/cp311-cp311/bin:\$PATH
|
||||
|
||||
rm -rf build-linux-arm
|
||||
meson setup build-linux-arm --buildtype release -Dbuild_tests=false
|
||||
meson compile -C build-linux-arm
|
||||
cp build-linux-arm/tools/stroid /src/$OUTPUT_DIR/stroid-linux-arm64
|
||||
"
|
||||
|
||||
echo "---"
|
||||
echo "All binaries generated in /$OUTPUT_DIR"
|
||||
ls -lh "$OUTPUT_DIR"
|
||||
@@ -1,4 +1,4 @@
|
||||
[wrap-git]
|
||||
url = https://github.com/4D-STAR/libconfig.git
|
||||
revision = v2.0.4
|
||||
depth = 1
|
||||
revision = v2.0.5
|
||||
depth = 1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
gtest_dep = dependency('gtest', main: true, required : true)
|
||||
gtest_main = dependency('gtest_main', required: true)
|
||||
gtest_nomain_dep = dependency('gtest', main: false, required : true)
|
||||
threads_dep = dependency('threads')
|
||||
|
||||
# Test files for const
|
||||
test_sources = [
|
||||
@@ -14,6 +15,7 @@ foreach test_file : test_sources
|
||||
exe_name,
|
||||
test_file,
|
||||
dependencies: [
|
||||
threads_dep,
|
||||
stroid_dep,
|
||||
gtest_dep,
|
||||
gtest_main
|
||||
|
||||
@@ -52,23 +52,23 @@ struct OUTPUT_CONFIG {
|
||||
int main(int argc, char** argv) {
|
||||
fourdst::config::Config<stroid::config::MeshConfig> cfg;
|
||||
OUTPUT_CONFIG out_cfg;
|
||||
MESH_FORMATS selected_format = MESH_FORMATS::VTU; // Default fallback
|
||||
auto selected_format = MESH_FORMATS::MFEM;
|
||||
|
||||
CLI::App app{"stroid - A tool for generating multi-block meshes for stellar modeling"};
|
||||
|
||||
app.footer(
|
||||
"\nEXAMPLES:\n"
|
||||
" -> stroid generate -c config.toml -o star_mesh.vtu vtu\n"
|
||||
" -> stroid generate --config config.toml --view --no-save\n"
|
||||
" -> stroid info --version\n"
|
||||
" -> stroid info --default\n"
|
||||
"| stroid generate -c config.toml -o star_mesh.vtu vtu\n"
|
||||
"| stroid generate --config config.toml --view --no-save\n"
|
||||
"| stroid info --version\n"
|
||||
"| stroid info --default\n"
|
||||
);
|
||||
|
||||
auto* generate = app.add_subcommand("generate", "Generate a multi-block mesh");
|
||||
auto* info = app.add_subcommand("info", "Access information about stroid");
|
||||
|
||||
std::optional<std::string> config_filename;
|
||||
std::string output_filename = "stroid";
|
||||
std::string output_filename = "stroid.mesh";
|
||||
bool view_mesh = false;
|
||||
bool no_save = false;
|
||||
std::string glvis_host = "localhost";
|
||||
|
||||
Reference in New Issue
Block a user