feat(stroid): added command line and tests

This commit is contained in:
2026-01-30 13:21:43 -05:00
parent 58f59516ec
commit ce69b91fde
30 changed files with 975 additions and 46 deletions

3
.gitignore vendored
View File

@@ -74,12 +74,15 @@ subprojects/libconfig/
subprojects/libcomposition/ subprojects/libcomposition/
subprojects/GridFire/ subprojects/GridFire/
subprojects/tomlplusplus-*/ subprojects/tomlplusplus-*/
subprojects/CLI11-*/
qhull.wrap qhull.wrap
quill.wrap quill.wrap
yaml-cpp.wrap yaml-cpp.wrap
cppad.wrap cppad.wrap
tomlplusplus.wrap tomlplusplus.wrap
gtest.wrap
subprojects/quill.wrap subprojects/quill.wrap

BIN
assets/imgs/ExampleMesh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

BIN
assets/logo/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

178
assets/logo/Logo.svg Normal file
View File

@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="255.57704"
height="419.30093"
viewBox="0 0 255.57705 419.30092"
version="1.1"
id="svg1"
inkscape:version="1.4 (e7c3feb1, 2024-10-09)"
sodipodi:docname="Logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="2.2216922"
inkscape:cx="336.23019"
inkscape:cy="103.07458"
inkscape:window-width="2304"
inkscape:window-height="1227"
inkscape:window-x="3470"
inkscape:window-y="204"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="-621.03467"
originy="-39.680534"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
enabled="true"
visible="false" />
<inkscape:page
x="0"
y="0"
width="255.57706"
height="419.30093"
id="page26"
margin="0"
bleed="0" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(-621.03461,-39.680537)">
<g
id="g81"
inkscape:label="Top"
transform="translate(9.2538401,9.25384)">
<g
id="g75"
inkscape:label="Surface">
<path
id="path71"
style="fill:#007b9c;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 745.75522,35.998778 a 118.37321,118.37321 0 0 0 -118.37305,118.373052 118.37321,118.37321 0 0 0 4.16407,30.44922 h 89.65625 a 39.135632,39.135632 0 0 1 -14.58399,-30.44922 39.135632,39.135632 0 0 1 39.13672,-39.13477 39.135632,39.135632 0 0 1 39.13477,39.13477 39.135632,39.135632 0 0 1 -14.58399,30.44922 h 89.65817 a 118.37321,118.37321 0 0 0 4.1641,-30.44922 A 118.37321,118.37321 0 0 0 745.75522,35.998778 Z" />
<path
id="path72"
style="fill:#007fc4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.10547,44.039062 c -1.11918,0.02128 -2.08166,0.04896 -3.19922,0.09375 -0.97852,0.04951 -2.22023,0.116062 -3.29896,0.201701 -8.66423,0.632431 -17.24374,2.333359 -25.51549,4.981893 -1.02475,0.336509 -2.29559,0.759414 -3.40453,1.155268 -3.68514,1.313078 -7.2991,2.822663 -10.82985,4.506842 -0.46002,0.234205 -1.22969,0.597461 -1.81083,0.893884 -13.25556,6.667942 -25.12888,16.059343 -34.6755,27.418616 -0.39203,0.488608 -1.00072,1.199103 -1.4679,1.789553 -11.03571,13.682192 -18.79462,30.010251 -22.25866,47.253411 -0.0942,0.51662 -0.26393,1.37536 -0.38707,2.02311 -0.55315,2.94934 -0.9833,6.04989 -1.27308,8.95736 -0.2208,2.16146 -0.35263,4.33023 -0.45704,6.5 -0.0178,0.5071 -0.0497,1.36925 -0.0582,2.01396 -0.14319,5.96911 0.23566,11.8877 1.09767,17.82909 0.36022,2.18753 0.60324,4.4174 1.23815,6.54401 0.38173,0.65803 1.26607,0.70313 1.94819,0.63662 16.71433,-0.0377 33.42892,-0.005 50.14336,-0.0173 4.45183,-1.8e-4 8.90365,-3.6e-4 13.35547,-5.5e-4 0.19982,-0.46579 0.77048,-0.83717 0.43946,-1.35156 -4.89255,-9.46307 -6.18517,-20.65083 -3.98605,-31.04517 2.24132,-10.7743 8.53531,-20.57867 17.22628,-27.29663 6.11376,-4.77933 13.43393,-7.97291 21.09169,-9.22302 12.1525,-2.05325 25.08316,0.8897 35.07695,8.12575 9.58736,6.78657 16.49293,17.28419 18.77728,28.82073 2.05675,9.96268 0.84159,20.60957 -3.61389,29.77264 -0.12728,0.51727 -0.89988,1.127 -0.3457,1.66015 0.17277,0.68656 0.80316,0.60371 1.37302,0.56946 12.78614,-0.0752 25.57269,-0.0113 38.35901,-0.037 8.44319,-0.002 16.88882,-0.0124 25.33047,-0.0305 0.88512,-0.32316 1.01033,-1.30783 1.11293,-2.11503 0.4283,-2.30171 0.76867,-4.4633 1.08824,-6.79708 2.59993,-19.86671 -0.54618,-40.50613 -8.83092,-58.80541 -7.43426,-16.59611 -19.07097,-31.278521 -33.5304,-42.30737 -5.18411,-3.969505 -10.72159,-7.474418 -16.52344,-10.469254 -0.71858,-0.361651 -1.7003,-0.860499 -2.52682,-1.257458 -2.78059,-1.342543 -5.67185,-2.593306 -8.47807,-3.670739 -9.98255,-3.854564 -20.54006,-6.186158 -31.20605,-7.005397 -0.99382,-0.06934 -2.2424,-0.151494 -3.33399,-0.203125 -1.19818,-0.05062 -2.64656,-0.103534 -3.94372,-0.113143 -0.90093,-0.01503 -1.80178,-0.0066 -2.70276,-0.0021 z" />
<path
id="path73"
style="display:inline;fill:#00a3ff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 743.81445,52.052734 c -8.50843,0.163853 -16.99456,1.401915 -25.19726,3.667969 -0.68295,0.204626 -1.66885,0.467841 -2.46434,0.718609 -16.55536,4.986842 -31.81955,14.224833 -43.8302,26.672488 -4.30717,4.434286 -8.19853,9.269754 -11.63515,14.407731 -0.2844,0.432997 -0.76468,1.153903 -1.05537,1.618478 -4.14409,6.456781 -7.55732,13.380921 -10.16924,20.594411 -0.37617,1.06083 -0.83081,2.35887 -1.19704,3.52584 -2.78264,8.64935 -4.3411,17.68097 -4.72874,26.75541 -0.0248,0.77047 -0.0663,1.8456 -0.0708,2.7339 -0.0789,5.37854 0.28175,10.7631 1.06688,16.08446 16.01888,-0.0116 32.03776,-0.0162 48.05664,-0.0117 -4.14825,-15.21128 -1.48072,-32.21497 7.46592,-45.24383 8.64391,-12.85143 22.8949,-21.83533 38.28436,-23.813243 15.27634,-2.091675 31.38616,2.531043 43.08575,12.612053 10.71544,9.079 17.82057,22.37148 19.12656,36.38146 0.68243,6.71687 0.14157,13.56175 -1.62665,20.07919 16.01496,-0.0257 32.02995,-0.0232 48.04492,-0.043 0.58409,-3.8897 0.92056,-7.68017 1.04631,-11.62918 0.16493,-5.37198 -0.1075,-10.75624 -0.80021,-16.08567 -0.21734,-1.62572 -0.49598,-3.45939 -0.80988,-5.15604 -2.40496,-13.17161 -7.51528,-25.99286 -14.73309,-37.142783 -2.76616,-4.283166 -5.85457,-8.356915 -9.22852,-12.179688 -0.63093,-0.698442 -1.44034,-1.601308 -2.1654,-2.358529 C 805.90855,68.93666 786.72258,58.220158 766.13141,54.093242 758.79518,52.60678 751.2977,51.944561 743.81445,52.052734 Z" />
<path
id="path74"
style="display:inline;fill:#00d9ff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.04688,60.052734 c -7.78732,0.145465 -15.68138,1.298689 -23.11329,3.332032 -11.41214,3.103148 -22.34941,8.481496 -31.74023,15.49414 -18.14419,13.548335 -31.1114,33.844174 -35.73215,56.016634 -1.57828,7.46407 -2.24041,15.34263 -1.91353,23.05513 0.0348,0.96147 0.0968,1.92138 0.15935,2.88136 10.4349,-0.004 20.86979,-0.008 31.30469,-0.0117 -1.69107,-16.35421 3.19177,-33.37511 13.6653,-46.10052 11.1555,-13.82922 28.34954,-22.697316 46.14242,-23.38044 17.63227,-0.82757 35.54684,6.052323 47.8719,18.73552 11.49163,11.63131 18.26389,27.85976 18.13811,44.23802 0.005,2.17558 -0.10467,4.35096 -0.32554,6.51523 10.4375,-0.009 20.875,-0.0182 31.3125,-0.0273 0.25066,-3.49771 0.30366,-7.1997 0.16015,-10.58008 -0.0707,-1.64 -0.18953,-3.27739 -0.33789,-4.91211 -0.0522,-0.45109 -0.13562,-1.32626 -0.18823,-1.78447 -0.18958,-1.64042 -0.40738,-3.17086 -0.66318,-4.704 -2.99985,-18.08336 -11.42547,-35.21775 -23.90249,-48.644339 -0.72335,-0.765506 -1.62083,-1.716246 -2.44259,-2.527386 -13.67724,-13.633985 -31.58814,-23.01816 -50.65417,-26.217163 -3.14987,-0.543373 -6.36122,-0.926716 -9.47811,-1.143804 -2.69472,-0.195564 -5.47112,-0.270302 -8.26302,-0.234694 z" />
<path
id="path75"
style="display:inline;fill:#89fffc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.26562,68.052734 c -5.30382,0.106601 -10.59695,0.697284 -15.79492,1.75586 -1.06706,0.219085 -2.38148,0.517034 -3.53542,0.805767 -9.16182,2.29343 -17.9461,6.084942 -25.89817,11.180561 -1.00965,0.642815 -2.20752,1.447801 -3.26299,2.194872 -16.4982,11.667743 -28.61669,29.337836 -33.63154,48.906686 -0.14987,0.60808 -0.38275,1.52866 -0.54943,2.26422 -0.54856,2.42095 -0.99587,4.91614 -1.3217,7.29088 -0.46336,3.43994 -0.74295,6.90695 -0.78122,10.3785 5.07292,-0.003 10.14584,-0.005 15.21875,-0.008 0.36132,-17.56525 7.40411,-34.98544 19.69184,-47.59391 13.50081,-14.115861 32.99477,-22.445135 52.56936,-21.927722 20.01131,0.319296 39.79146,9.460175 52.73225,24.777072 10.61615,12.3532 16.83223,28.44501 17.12179,44.7426 5.07161,-0.004 10.14323,-0.008 15.21484,-0.0117 -0.0779,-4.81371 -0.56792,-9.61861 -1.44726,-14.35156 -0.0784,-0.4088 -0.23673,-1.19344 -0.34571,-1.74609 -2.27053,-10.91439 -6.77483,-21.49114 -12.95507,-30.65625 -1.4411,-2.14014 -2.98607,-4.22036 -4.56717,-6.169492 -8.19488,-10.075339 -18.71348,-18.23165 -30.47385,-23.732854 -0.57348,-0.253793 -1.42939,-0.660136 -2.12403,-0.953724 -11.25951,-4.952504 -23.57663,-7.286393 -35.86035,-7.145886 z" />
</g>
<g
id="g80"
inkscape:label="Side"
style="display:inline">
<path
id="path76"
style="fill:#b6003d;fill-opacity:1;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 627.61443,154.13958 c 9e-5,65.37559 49.17394,118.18178 114.54953,118.18187 v -82.71059 c -65.48994,-0.001 -35.91309,-109.160012 0,-153.609962 -65.3756,9e-5 -114.54945,52.76308 -114.54953,118.138682 z"
sodipodi:nodetypes="ccccc" />
<path
id="path77"
style="fill:#ff1e79;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 725.92188,45.199219 c -7.07257,1.057697 -14.04409,2.809069 -20.75391,5.287109 -0.83559,0.318935 -1.93868,0.734404 -2.86845,1.110191 -16.09305,6.470414 -30.49198,17.067499 -41.4669,30.498492 -10.1086,12.249876 -17.38289,26.768939 -21.39317,42.123739 -0.22333,0.8949 -0.5296,2.06203 -0.75572,3.0684 -2.36492,10.09056 -3.34517,20.49576 -2.99818,30.85152 0.0657,1.9777 0.18696,4.15385 0.36501,6.20316 0.25624,2.99802 0.62112,5.96781 1.09648,8.88126 0.53669,3.34947 1.22998,6.68684 2.04662,9.9138 4.48737,17.84084 13.4304,34.58136 25.98603,48.04866 0.71832,0.76088 1.61728,1.7073 2.42913,2.51777 8.48786,8.51955 18.45626,15.56494 29.33845,20.6873 1.1071,0.51171 2.43454,1.12247 3.65108,1.62692 10.64205,4.50846 22.04127,7.18952 33.56571,8.01176 0,-22.31185 0,-44.6237 0,-66.93555 -8.86544,-1.18867 -17.58953,-4.80533 -24.01304,-11.14635 -6.86549,-6.66272 -11.00792,-15.69891 -12.95749,-24.97132 -2.63042,-12.19851 -2.11284,-24.84296 -0.38076,-37.12758 2.67707,-18.26356 8.29657,-36.005682 15.63513,-52.909804 3.89336,-8.878548 8.36404,-17.509879 13.4896,-25.74143 z" />
<path
id="path78"
style="fill:#ff5b87;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 708.74414,57.697266 c -17.77772,6.38886 -33.58525,18.142256 -44.77273,33.369672 -9.9334,13.383932 -16.42332,29.243942 -18.98957,45.698592 -0.66336,4.14409 -1.07616,8.3268 -1.25332,12.51963 -0.0466,1.2041 -0.0915,2.65904 -0.0959,3.96208 -0.0139,2.06261 0.0179,4.24685 0.12068,6.19204 0.0641,1.29514 0.12345,2.38947 0.23371,3.69756 0.11803,1.4807 0.27274,2.95813 0.44461,4.43347 0.12137,0.95368 0.27923,2.15798 0.43555,3.20313 0.17175,1.11482 0.39346,2.47682 0.62155,3.68282 3.77842,20.62281 13.86389,40.14932 28.96824,54.75248 11.37854,11.08431 25.56664,19.25158 40.87842,23.48781 3.56139,0.98941 7.17856,1.7769 10.82866,2.36009 0,-17.13476 0,-34.26953 0,-51.4043 -9.98872,-2.60416 -19.28313,-8.27006 -25.64892,-16.46387 -6.78513,-8.49091 -10.53146,-19.05481 -12.0831,-29.72566 -2.11572,-14.21983 -0.81182,-28.71697 1.83076,-42.77426 3.81695,-19.730635 10.65807,-38.804528 19.48083,-56.833286 0.684,-0.915487 -0.25778,-0.402913 -0.82608,-0.218392 l -0.0944,0.03289 z" />
<path
id="path79"
style="fill:#ff8fbf;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 693.61328,74.050781 c -0.81748,0.530396 -1.78234,1.171378 -2.48794,1.667049 -1.29624,0.905007 -2.55694,1.819825 -3.84954,2.830092 -7.87166,6.119516 -14.70785,13.569024 -20.1215,21.942308 -0.53063,0.81959 -1.18728,1.8722 -1.73962,2.80083 -4.69143,7.79978 -8.20601,16.29223 -10.5182,25.09175 -0.11403,0.48041 -0.32426,1.26161 -0.43999,1.75487 -1.54915,6.39934 -2.4629,12.9516 -2.72993,19.53029 -0.0393,1.01993 -0.0752,2.31118 -0.0846,3.43576 -0.085,8.53004 0.86737,17.07506 2.88537,25.36502 0.23651,0.93072 0.53881,2.1223 0.83225,3.14641 3.82213,13.66747 10.69437,26.49387 20.12479,37.11336 0.64231,0.70899 1.46325,1.61897 2.20203,2.38335 10.97517,11.49732 25.11346,19.95654 40.47765,24.06196 0,-11.89453 0,-23.78906 0,-35.6836 -11.11604,-4.16385 -20.91389,-11.9076 -27.25165,-21.97528 -6.66025,-10.27069 -9.9877,-22.38933 -11.05941,-34.50037 -1.40687,-15.43228 0.54317,-30.97295 3.86573,-46.04408 2.54718,-11.296995 6.0274,-22.375957 10.26174,-33.152141 -0.1224,0.07747 -0.24479,0.154948 -0.36719,0.232422 z" />
<path
id="path80"
style="fill:#ffbddf;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 676.59375,100.90234 c -3.79987,5.18688 -6.99627,10.81058 -9.54883,16.71094 -0.3386,0.78548 -0.77503,1.84374 -1.13086,2.74219 -3.88386,9.87873 -5.96291,20.44778 -6.23437,31.05469 -0.0323,1.37293 -0.0492,2.97856 -0.0213,4.44214 0.20853,14.00907 3.59543,28.1953 10.18991,40.68028 0.51382,0.98381 1.02413,1.9117 1.53584,2.8021 1.45574,2.55632 3.0574,5.02765 4.76425,7.42313 0.32674,0.4314 0.83516,1.15036 1.24801,1.68312 8.4298,11.19016 19.84831,20.11078 32.76761,25.53759 0,-6.40235 0,-12.80469 0,-19.20704 -12.18854,-5.81389 -22.43372,-15.61192 -28.72656,-27.5664 -6.58805,-12.16606 -9.46066,-26.03417 -9.95117,-39.77539 -0.58324,-15.92245 1.85297,-31.80618 5.63672,-47.23438 -0.17644,0.23568 -0.35287,0.47136 -0.5293,0.70703 z" />
</g>
</g>
<g
id="g92"
inkscape:label="Top"
transform="rotate(180,747.05491,245.06402)">
<g
id="g86"
inkscape:label="Surface">
<path
id="path82"
style="fill:#007b9c;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 745.75522,35.998778 a 118.37321,118.37321 0 0 0 -118.37305,118.373052 118.37321,118.37321 0 0 0 4.16407,30.44922 h 89.65625 a 39.135632,39.135632 0 0 1 -14.58399,-30.44922 39.135632,39.135632 0 0 1 39.13672,-39.13477 39.135632,39.135632 0 0 1 39.13477,39.13477 39.135632,39.135632 0 0 1 -14.58399,30.44922 h 89.65817 a 118.37321,118.37321 0 0 0 4.1641,-30.44922 A 118.37321,118.37321 0 0 0 745.75522,35.998778 Z" />
<path
id="path83"
style="fill:#007fc4;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.10547,44.039062 c -1.11918,0.02128 -2.08166,0.04896 -3.19922,0.09375 -0.97852,0.04951 -2.22023,0.116062 -3.29896,0.201701 -8.66423,0.632431 -17.24374,2.333359 -25.51549,4.981893 -1.02475,0.336509 -2.29559,0.759414 -3.40453,1.155268 -3.68514,1.313078 -7.2991,2.822663 -10.82985,4.506842 -0.46002,0.234205 -1.22969,0.597461 -1.81083,0.893884 -13.25556,6.667942 -25.12888,16.059343 -34.6755,27.418616 -0.39203,0.488608 -1.00072,1.199103 -1.4679,1.789553 -11.03571,13.682192 -18.79462,30.010251 -22.25866,47.253411 -0.0942,0.51662 -0.26393,1.37536 -0.38707,2.02311 -0.55315,2.94934 -0.9833,6.04989 -1.27308,8.95736 -0.2208,2.16146 -0.35263,4.33023 -0.45704,6.5 -0.0178,0.5071 -0.0497,1.36925 -0.0582,2.01396 -0.14319,5.96911 0.23566,11.8877 1.09767,17.82909 0.36022,2.18753 0.60324,4.4174 1.23815,6.54401 0.38173,0.65803 1.26607,0.70313 1.94819,0.63662 16.71433,-0.0377 33.42892,-0.005 50.14336,-0.0173 4.45183,-1.8e-4 8.90365,-3.6e-4 13.35547,-5.5e-4 0.19982,-0.46579 0.77048,-0.83717 0.43946,-1.35156 -4.89255,-9.46307 -6.18517,-20.65083 -3.98605,-31.04517 2.24132,-10.7743 8.53531,-20.57867 17.22628,-27.29663 6.11376,-4.77933 13.43393,-7.97291 21.09169,-9.22302 12.1525,-2.05325 25.08316,0.8897 35.07695,8.12575 9.58736,6.78657 16.49293,17.28419 18.77728,28.82073 2.05675,9.96268 0.84159,20.60957 -3.61389,29.77264 -0.12728,0.51727 -0.89988,1.127 -0.3457,1.66015 0.17277,0.68656 0.80316,0.60371 1.37302,0.56946 12.78614,-0.0752 25.57269,-0.0113 38.35901,-0.037 8.44319,-0.002 16.88882,-0.0124 25.33047,-0.0305 0.88512,-0.32316 1.01033,-1.30783 1.11293,-2.11503 0.4283,-2.30171 0.76867,-4.4633 1.08824,-6.79708 2.59993,-19.86671 -0.54618,-40.50613 -8.83092,-58.80541 -7.43426,-16.59611 -19.07097,-31.278521 -33.5304,-42.30737 -5.18411,-3.969505 -10.72159,-7.474418 -16.52344,-10.469254 -0.71858,-0.361651 -1.7003,-0.860499 -2.52682,-1.257458 -2.78059,-1.342543 -5.67185,-2.593306 -8.47807,-3.670739 -9.98255,-3.854564 -20.54006,-6.186158 -31.20605,-7.005397 -0.99382,-0.06934 -2.2424,-0.151494 -3.33399,-0.203125 -1.19818,-0.05062 -2.64656,-0.103534 -3.94372,-0.113143 -0.90093,-0.01503 -1.80178,-0.0066 -2.70276,-0.0021 z" />
<path
id="path84"
style="display:inline;fill:#00a3ff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 743.81445,52.052734 c -8.50843,0.163853 -16.99456,1.401915 -25.19726,3.667969 -0.68295,0.204626 -1.66885,0.467841 -2.46434,0.718609 -16.55536,4.986842 -31.81955,14.224833 -43.8302,26.672488 -4.30717,4.434286 -8.19853,9.269754 -11.63515,14.407731 -0.2844,0.432997 -0.76468,1.153903 -1.05537,1.618478 -4.14409,6.456781 -7.55732,13.380921 -10.16924,20.594411 -0.37617,1.06083 -0.83081,2.35887 -1.19704,3.52584 -2.78264,8.64935 -4.3411,17.68097 -4.72874,26.75541 -0.0248,0.77047 -0.0663,1.8456 -0.0708,2.7339 -0.0789,5.37854 0.28175,10.7631 1.06688,16.08446 16.01888,-0.0116 32.03776,-0.0162 48.05664,-0.0117 -4.14825,-15.21128 -1.48072,-32.21497 7.46592,-45.24383 8.64391,-12.85143 22.8949,-21.83533 38.28436,-23.813243 15.27634,-2.091675 31.38616,2.531043 43.08575,12.612053 10.71544,9.079 17.82057,22.37148 19.12656,36.38146 0.68243,6.71687 0.14157,13.56175 -1.62665,20.07919 16.01496,-0.0257 32.02995,-0.0232 48.04492,-0.043 0.58409,-3.8897 0.92056,-7.68017 1.04631,-11.62918 0.16493,-5.37198 -0.1075,-10.75624 -0.80021,-16.08567 -0.21734,-1.62572 -0.49598,-3.45939 -0.80988,-5.15604 -2.40496,-13.17161 -7.51528,-25.99286 -14.73309,-37.142783 -2.76616,-4.283166 -5.85457,-8.356915 -9.22852,-12.179688 -0.63093,-0.698442 -1.44034,-1.601308 -2.1654,-2.358529 C 805.90855,68.93666 786.72258,58.220158 766.13141,54.093242 758.79518,52.60678 751.2977,51.944561 743.81445,52.052734 Z" />
<path
id="path85"
style="display:inline;fill:#00d9ff;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.04688,60.052734 c -7.78732,0.145465 -15.68138,1.298689 -23.11329,3.332032 -11.41214,3.103148 -22.34941,8.481496 -31.74023,15.49414 -18.14419,13.548335 -31.1114,33.844174 -35.73215,56.016634 -1.57828,7.46407 -2.24041,15.34263 -1.91353,23.05513 0.0348,0.96147 0.0968,1.92138 0.15935,2.88136 10.4349,-0.004 20.86979,-0.008 31.30469,-0.0117 -1.69107,-16.35421 3.19177,-33.37511 13.6653,-46.10052 11.1555,-13.82922 28.34954,-22.697316 46.14242,-23.38044 17.63227,-0.82757 35.54684,6.052323 47.8719,18.73552 11.49163,11.63131 18.26389,27.85976 18.13811,44.23802 0.005,2.17558 -0.10467,4.35096 -0.32554,6.51523 10.4375,-0.009 20.875,-0.0182 31.3125,-0.0273 0.25066,-3.49771 0.30366,-7.1997 0.16015,-10.58008 -0.0707,-1.64 -0.18953,-3.27739 -0.33789,-4.91211 -0.0522,-0.45109 -0.13562,-1.32626 -0.18823,-1.78447 -0.18958,-1.64042 -0.40738,-3.17086 -0.66318,-4.704 -2.99985,-18.08336 -11.42547,-35.21775 -23.90249,-48.644339 -0.72335,-0.765506 -1.62083,-1.716246 -2.44259,-2.527386 -13.67724,-13.633985 -31.58814,-23.01816 -50.65417,-26.217163 -3.14987,-0.543373 -6.36122,-0.926716 -9.47811,-1.143804 -2.69472,-0.195564 -5.47112,-0.270302 -8.26302,-0.234694 z" />
<path
id="path86"
style="display:inline;fill:#89fffc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 744.26562,68.052734 c -5.30382,0.106601 -10.59695,0.697284 -15.79492,1.75586 -1.06706,0.219085 -2.38148,0.517034 -3.53542,0.805767 -9.16182,2.29343 -17.9461,6.084942 -25.89817,11.180561 -1.00965,0.642815 -2.20752,1.447801 -3.26299,2.194872 -16.4982,11.667743 -28.61669,29.337836 -33.63154,48.906686 -0.14987,0.60808 -0.38275,1.52866 -0.54943,2.26422 -0.54856,2.42095 -0.99587,4.91614 -1.3217,7.29088 -0.46336,3.43994 -0.74295,6.90695 -0.78122,10.3785 5.07292,-0.003 10.14584,-0.005 15.21875,-0.008 0.36132,-17.56525 7.40411,-34.98544 19.69184,-47.59391 13.50081,-14.115861 32.99477,-22.445135 52.56936,-21.927722 20.01131,0.319296 39.79146,9.460175 52.73225,24.777072 10.61615,12.3532 16.83223,28.44501 17.12179,44.7426 5.07161,-0.004 10.14323,-0.008 15.21484,-0.0117 -0.0779,-4.81371 -0.56792,-9.61861 -1.44726,-14.35156 -0.0784,-0.4088 -0.23673,-1.19344 -0.34571,-1.74609 -2.27053,-10.91439 -6.77483,-21.49114 -12.95507,-30.65625 -1.4411,-2.14014 -2.98607,-4.22036 -4.56717,-6.169492 -8.19488,-10.075339 -18.71348,-18.23165 -30.47385,-23.732854 -0.57348,-0.253793 -1.42939,-0.660136 -2.12403,-0.953724 -11.25951,-4.952504 -23.57663,-7.286393 -35.86035,-7.145886 z" />
</g>
<g
id="g91"
inkscape:label="Side"
style="display:inline">
<path
id="path87"
style="fill:#b6003d;fill-opacity:1;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 627.61443,154.13958 c 9e-5,65.37559 49.17394,118.18178 114.54953,118.18187 v -82.71059 c -65.48994,-0.001 -35.91309,-109.160012 0,-153.609962 -65.3756,9e-5 -114.54945,52.76308 -114.54953,118.138682 z"
sodipodi:nodetypes="ccccc" />
<path
id="path88"
style="fill:#ff1e79;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 725.92188,45.199219 c -7.07257,1.057697 -14.04409,2.809069 -20.75391,5.287109 -0.83559,0.318935 -1.93868,0.734404 -2.86845,1.110191 -16.09305,6.470414 -30.49198,17.067499 -41.4669,30.498492 -10.1086,12.249876 -17.38289,26.768939 -21.39317,42.123739 -0.22333,0.8949 -0.5296,2.06203 -0.75572,3.0684 -2.36492,10.09056 -3.34517,20.49576 -2.99818,30.85152 0.0657,1.9777 0.18696,4.15385 0.36501,6.20316 0.25624,2.99802 0.62112,5.96781 1.09648,8.88126 0.53669,3.34947 1.22998,6.68684 2.04662,9.9138 4.48737,17.84084 13.4304,34.58136 25.98603,48.04866 0.71832,0.76088 1.61728,1.7073 2.42913,2.51777 8.48786,8.51955 18.45626,15.56494 29.33845,20.6873 1.1071,0.51171 2.43454,1.12247 3.65108,1.62692 10.64205,4.50846 22.04127,7.18952 33.56571,8.01176 0,-22.31185 0,-44.6237 0,-66.93555 -8.86544,-1.18867 -17.58953,-4.80533 -24.01304,-11.14635 -6.86549,-6.66272 -11.00792,-15.69891 -12.95749,-24.97132 -2.63042,-12.19851 -2.11284,-24.84296 -0.38076,-37.12758 2.67707,-18.26356 8.29657,-36.005682 15.63513,-52.909804 3.89336,-8.878548 8.36404,-17.509879 13.4896,-25.74143 z" />
<path
id="path89"
style="fill:#ff5b87;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 708.74414,57.697266 c -17.77772,6.38886 -33.58525,18.142256 -44.77273,33.369672 -9.9334,13.383932 -16.42332,29.243942 -18.98957,45.698592 -0.66336,4.14409 -1.07616,8.3268 -1.25332,12.51963 -0.0466,1.2041 -0.0915,2.65904 -0.0959,3.96208 -0.0139,2.06261 0.0179,4.24685 0.12068,6.19204 0.0641,1.29514 0.12345,2.38947 0.23371,3.69756 0.11803,1.4807 0.27274,2.95813 0.44461,4.43347 0.12137,0.95368 0.27923,2.15798 0.43555,3.20313 0.17175,1.11482 0.39346,2.47682 0.62155,3.68282 3.77842,20.62281 13.86389,40.14932 28.96824,54.75248 11.37854,11.08431 25.56664,19.25158 40.87842,23.48781 3.56139,0.98941 7.17856,1.7769 10.82866,2.36009 0,-17.13476 0,-34.26953 0,-51.4043 -9.98872,-2.60416 -19.28313,-8.27006 -25.64892,-16.46387 -6.78513,-8.49091 -10.53146,-19.05481 -12.0831,-29.72566 -2.11572,-14.21983 -0.81182,-28.71697 1.83076,-42.77426 3.81695,-19.730635 10.65807,-38.804528 19.48083,-56.833286 0.684,-0.915487 -0.25778,-0.402913 -0.82608,-0.218392 l -0.0944,0.03289 z" />
<path
id="path90"
style="fill:#ff8fbf;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 693.61328,74.050781 c -0.81748,0.530396 -1.78234,1.171378 -2.48794,1.667049 -1.29624,0.905007 -2.55694,1.819825 -3.84954,2.830092 -7.87166,6.119516 -14.70785,13.569024 -20.1215,21.942308 -0.53063,0.81959 -1.18728,1.8722 -1.73962,2.80083 -4.69143,7.79978 -8.20601,16.29223 -10.5182,25.09175 -0.11403,0.48041 -0.32426,1.26161 -0.43999,1.75487 -1.54915,6.39934 -2.4629,12.9516 -2.72993,19.53029 -0.0393,1.01993 -0.0752,2.31118 -0.0846,3.43576 -0.085,8.53004 0.86737,17.07506 2.88537,25.36502 0.23651,0.93072 0.53881,2.1223 0.83225,3.14641 3.82213,13.66747 10.69437,26.49387 20.12479,37.11336 0.64231,0.70899 1.46325,1.61897 2.20203,2.38335 10.97517,11.49732 25.11346,19.95654 40.47765,24.06196 0,-11.89453 0,-23.78906 0,-35.6836 -11.11604,-4.16385 -20.91389,-11.9076 -27.25165,-21.97528 -6.66025,-10.27069 -9.9877,-22.38933 -11.05941,-34.50037 -1.40687,-15.43228 0.54317,-30.97295 3.86573,-46.04408 2.54718,-11.296995 6.0274,-22.375957 10.26174,-33.152141 -0.1224,0.07747 -0.24479,0.154948 -0.36719,0.232422 z" />
<path
id="path91"
style="fill:#ffbddf;fill-opacity:1;stroke:#000000;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:2.6;stroke-opacity:1;paint-order:markers stroke fill"
d="m 676.59375,100.90234 c -3.79987,5.18688 -6.99627,10.81058 -9.54883,16.71094 -0.3386,0.78548 -0.77503,1.84374 -1.13086,2.74219 -3.88386,9.87873 -5.96291,20.44778 -6.23437,31.05469 -0.0323,1.37293 -0.0492,2.97856 -0.0213,4.44214 0.20853,14.00907 3.59543,28.1953 10.18991,40.68028 0.51382,0.98381 1.02413,1.9117 1.53584,2.8021 1.45574,2.55632 3.0574,5.02765 4.76425,7.42313 0.32674,0.4314 0.83516,1.15036 1.24801,1.68312 8.4298,11.19016 19.84831,20.11078 32.76761,25.53759 0,-6.40235 0,-12.80469 0,-19.20704 -12.18854,-5.81389 -22.43372,-15.61192 -28.72656,-27.5664 -6.58805,-12.16606 -9.46066,-26.03417 -9.95117,-39.77539 -0.58324,-15.92245 1.85297,-31.80618 5.63672,-47.23438 -0.17644,0.23568 -0.35287,0.47136 -0.5293,0.70703 z" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,2 @@
cli11_proj = subproject('cli11')
cli11_dep = cli11_proj.get_variable('CLI11_dep')

View File

@@ -1,2 +1,3 @@
subdir('mfem') subdir('mfem')
subdir('libconfig') subdir('libconfig')
subdir('CLI11')

View File

@@ -0,0 +1,10 @@
[main]
core_steepness = 1.0
flattening = 0.0
include_external_domain = false
order = 3
r_core = 1.5
r_infinity = 6.0
r_instability = 1e-14
r_star = 5.0
refinement_levels = 4

View File

@@ -0,0 +1,10 @@
[main]
core_steepness = 1.0
flattening = 0.0
include_external_domain = true
order = 3
r_core = 1.5
r_infinity = 6.0
r_instability = 1e-14
r_star = 5.0
refinement_levels = 4

View File

@@ -0,0 +1,10 @@
[main]
core_steepness = 1.0
flattening = 0.2
include_external_domain = false
order = 3
r_core = 1.5
r_infinity = 6.0
r_instability = 1e-14
r_star = 5.0
refinement_levels = 4

0
docs/index.html Normal file
View File

View File

@@ -1,5 +1,27 @@
project('stroid', 'cpp', meson_version : '>= 1.3.0', version : 'v0.1.0a0.1', default_options : ['cpp_std=c++23']) project('stroid', 'cpp', meson_version : '>= 1.3.0', version : 'v0.1.0', default_options : ['cpp_std=c++23'])
subdir('build-config') subdir('build-config')
subdir('src') subdir('src')
subdir('tests')
if get_option('build_tests')
subdir('tests')
endif
if get_option('build_tools')
subdir('tools')
endif
if get_option('pkg_config')
pkg = import('pkgconfig')
pkg.generate(
name: 'stroid',
description: 'Stroid multi-block curvilinear mesh generation library',
version: meson.project_version(),
libraries: [
stroid_lib
],
subdirs: ['stroid'],
filebase: 'stroid',
install_dir: join_paths(get_option('libdir'), 'pkgconfig')
)
endif

View File

@@ -1,3 +1,3 @@
option('pkg_config', type: 'boolean', value: false, description: 'generate pkg-config file for stroid') option('pkg_config', type: 'boolean', value: false, description: 'generate pkg-config file for stroid')
option('build_tests', type: 'boolean', value: false, description: 'compile subproject tests') option('build_tests', type: 'boolean', value: true, description: 'compile subproject tests')
option('build_python', type: 'boolean', value: true, description: 'build the python bindings so you can use stroid from python.') option('build_tools', type: 'boolean', value: true, description: 'compile stroid command line tools')

122
readme.md
View File

@@ -1,2 +1,120 @@
# stroid ![stroid logo](assets/logo/Logo.png)
A focused mesh generation suite, using an O-grid approach to generate high-quality stellar structure meshes for astrophysical simulations. # Stroid
## A multi-block mesh generation tool for stellar modeling
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.
> Note: Stroid is under active development and is not yet stable. Features and interfaces may change in future releases.
## Building and Installing
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.
### Building
```bash
git clone https://github.com/4D-STAR/stroid.git
cd stroid
meson setup build
meson compile -C build
meson test -C build
meson install -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.
```bash
stroid generate --help
```
The main way to interface with this is through the subcommands (currently only `generate` and `info` are available):
```bash
stroid generate -c <path/to/config/file.toml>
```
```bash
stroid info -d
```
to save the default configuration to a file named ``default.toml``
### Configuration File
Stroid uses a TOML configuration file to specify the parameters for mesh generation. An example configuration
file is found below
```toml
[main]
core_steepness = 1.0
flattening = 0.0
include_external_domain = false
order = 3
r_core = 1.5
r_infinity = 6.0
r_instability = 1e-14
r_star = 5.0
refinement_levels = 4
```
<!-- Table of what these parameters do -->
| Parameter | Description | Default |
|-------------------------|-----------------------------------------------------------------------------------------------------|---------|
| refinement_levels | Number of uniform refinement levels to apply to the mesh after generation | 4 |
| order | The polynomial order of the finite elements in the mesh | 3 |
| include_external_domain | Whether to include an external domain extending to r_infinity | false |
| r_core | The radius of the core region of the star | 1.5 |
| r_star | The radius of the star | 5.0 |
| flattening | The flattening factor of the star (0 for spherical, >0 for oblate) | 0 |
| r_infinity | The outer radius of the external domain (if included) | 6.0 |
| r_instability | The radius at which no transformations are applied to the initial topology (to avoid singularities) | 1e-14 |
| core_steepness | The steepness of the transition between the core and envelope regions of the star | 1.0 |
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.
### C++ Interface
Stroid can be used as a library in C++ projects. After installation, include the stroid header and link against the stroid library.
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):
```c++
#include <memory>
#include "mfem.hpp"
#include "stroid/config/config.h"
#include "stroid/IO/mesh.h"
#include "stroid/topology/curvilinear.h"
#include "stroid/topology/topology.h"
#include "fourdst/config/config.h"
int main() {
const fourdst::config::Config<stroid::config::MeshConfig> cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
stroid::topology::ProjectMesh(*mesh, cfg);
stroid::IO::ViewMesh(*mesh, "Spheroidal Mesh", stroid::IO::VISUALIZATION_MODE::BOUNDARY_ELEMENT_ID);
}
```
## Example Meshes
An example mesh with the default configuration parameters is shown below (coloration indicates attribute IDs of different regions):
![Example Mesh](assets/imgs/ExampleMesh.png)
## Funding
Stroid is developed as part of the 4D-STAR project.
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.

View File

@@ -3,14 +3,42 @@
#include "mfem.hpp" #include "mfem.hpp"
namespace stroid::IO { namespace stroid::IO {
/**
* @brief Visualization modes for GLVis display.
*/
enum class VISUALIZATION_MODE : uint8_t { enum class VISUALIZATION_MODE : uint8_t {
/** @brief No attribute visualization (default rendering). */
NONE, NONE,
/** @brief Color elements by their element attribute/ID. */
ELEMENT_ID, ELEMENT_ID,
/** @brief Color boundary-adjacent elements by boundary attribute/ID. */
BOUNDARY_ELEMENT_ID BOUNDARY_ELEMENT_ID
}; };
/**
* @brief Save a mesh to MFEM's native `.mesh` format.
* @param mesh Mesh to serialize.
* @param filename Output path (including extension).
*/
void SaveMesh(const mfem::Mesh& mesh, const std::string& filename); void SaveMesh(const mfem::Mesh& mesh, const std::string& filename);
/**
* @brief Save a mesh as a ParaView VTU dataset.
* @param mesh Mesh to export.
* @param exportName Output base name (ParaView will add extensions).
*/
void SaveVTU(mfem::Mesh& mesh, const std::string& exportName); void SaveVTU(mfem::Mesh& mesh, const std::string& exportName);
void ViewMesh(mfem::Mesh &mesh, const std::string& title, VISUALIZATION_MODE mode); /**
* @brief Stream a mesh to a running GLVis server for interactive viewing.
* @param mesh Mesh to display.
* @param title Window title shown in GLVis.
* @param mode Attribute visualization mode.
* @param vishost GLVis server host.
* @param visport GLVis server port.
*/
void ViewMesh(mfem::Mesh &mesh, const std::string& title, VISUALIZATION_MODE mode, const std::string &vishost, int visport);
/**
* @brief Visualize boundary face valence (1=surface, 2=internal).
* @param mesh Mesh whose boundary faces are inspected.
*/
void VisualizeFaceValence(mfem::Mesh& mesh); void VisualizeFaceValence(mfem::Mesh& mesh);
} }

View File

@@ -1,18 +1,63 @@
#pragma once #pragma once
namespace stroid::config { namespace stroid::config {
/**
* @brief Configuration parameters for stroid mesh generation.
*
* These values are typically loaded via
* `fourdst::config::Config<stroid::config::MeshConfig>` from a TOML file.
* The README shows the expected TOML layout under the `[main]` table.
* Unspecified keys use the defaults defined here.
*/
struct MeshConfig { struct MeshConfig {
int refinement_levels = 3; /**
int order = 2; * @brief Number of uniform refinement passes applied after topology creation.
* @toml [main].refinement_levels
*/
int refinement_levels = 4;
/**
* @brief Polynomial order for high-order elements.
* @toml [main].order
*/
int order = 3;
/**
* @brief Whether to include an external domain extending to `r_infinity`.
* @details Currently this flag does not affect mesh generation.
* @toml [main].include_external_domain
*/
bool include_external_domain = false; bool include_external_domain = false;
double r_core = 2.5; /**
* @brief Radius of the stellar core region.
* @toml [main].r_core
*/
double r_core = 1.5;
/**
* @brief Radius of the stellar surface.
* @toml [main].r_star
*/
double r_star = 5.0; double r_star = 5.0;
/**
* @brief Flattening factor for spheroidal shaping (0 = spherical, >0 = oblate).
* @toml [main].flattening
*/
double flattening = 0; double flattening = 0;
/**
* @brief Outer radius of the external domain when enabled.
* @toml [main].r_infinity
*/
double r_infinity = 6.0; double r_infinity = 6.0;
/**
* @brief Radius inside which transformations are skipped to avoid singularities.
* @toml [main].r_instability
*/
double r_instability = 1e-14; double r_instability = 1e-14;
/**
* @brief Controls the smoothness/steepness of the core-to-envelope transition.
* @toml [main].core_steepness
*/
double core_steepness = 1.0; double core_steepness = 1.0;
}; };
} }

View File

@@ -0,0 +1,27 @@
python_exe = import('python').find_installation('python3')
version_parser = '''
import sys, re
ver = sys.argv[1]
if ver.startswith("v"): ver = ver[1:]
m = re.match(r"^(\d+)\.(\d+)\.(\d+)(.*)$", ver)
if m:
print(f"{m.group(1)};{m.group(2)};{m.group(3)};{m.group(4)}")
else:
print("0;0;0;unknown")
'''
ver_res = run_command(python_exe, '-c', version_parser, meson.project_version(), check: true)
ver_parts = ver_res.stdout().strip().split(';')
config = configuration_data()
config.set('STROID_VERSION_MAJOR', ver_parts[0])
config.set('STROID_VERSION_MINOR', ver_parts[1])
config.set('STROID_VERSION_PATCH', ver_parts[2])
config.set('STROID_VERSION_TAG', ver_parts[3])
configure_file(
input : 'stroid.h.in',
output : 'stroid.h',
configuration : config ,
)

View File

@@ -0,0 +1,110 @@
#pragma once
#include "stroid/config/config.h"
#include "stroid/topology/topology.h"
#include "stroid/topology/mapping.h"
#include "stroid/topology/curvilinear.h"
#include "stroid/utils/mesh_utils.h"
#include "stroid/IO/mesh.h"
/**
* @namespace stroid
* @brief Public API surface for the stroid mesh generation library.
*
* This namespace aggregates configuration, topology construction, mapping, and
* mesh utilities for building curvilinear multi-block meshes.
*
* @par Example: build a mesh programmatically
* @code
* #include <memory>
* #include "mfem.hpp"
* #include "fourdst/config/config.h"
* #include "stroid/stroid.h"
*
* int main() {
* fourdst::config::Config<stroid::config::MeshConfig> cfg;
* auto mesh = stroid::topology::BuildSkeleton(cfg);
* stroid::topology::Finalize(*mesh, cfg);
* stroid::topology::PromoteToHighOrder(*mesh, cfg);
* stroid::topology::ProjectMesh(*mesh, cfg);
* stroid::IO::SaveVTU(*mesh, "stroid");
* }
* @endcode
*
* @par Example: tweak config then visualize
* @code
* fourdst::config::Config<stroid::config::MeshConfig> cfg;
* cfg->order = 4;
* cfg->flattening = 0.1;
* auto mesh = stroid::topology::BuildSkeleton(cfg);
* stroid::topology::Finalize(*mesh, cfg);
* stroid::topology::PromoteToHighOrder(*mesh, cfg);
* stroid::topology::ProjectMesh(*mesh, cfg);
* stroid::IO::ViewMesh(*mesh, "Stroid Mesh", stroid::IO::VISUALIZATION_MODE::ELEMENT_ID, "localhost", 19916);
* @endcode
*/
namespace stroid {
/**
* @brief Version helpers for the stroid library.
*/
struct version {
static constexpr int major = @STROID_VERSION_MAJOR@;
static constexpr int minor = @STROID_VERSION_MINOR@;
static constexpr int patch = @STROID_VERSION_PATCH@;
static constexpr const char* tag = "@STROID_VERSION_TAG@";
static std::string toString() {
std::string versionStr = std::to_string(major) + "." +
std::to_string(minor) + "." +
std::to_string(patch);
if (std::string(tag) != "") {
versionStr += "-" + std::string(tag);
}
return versionStr;
}
friend std::ostream& operator<<(std::ostream& os, const version&) {
os << toString();
return os;
}
};
}
/**
* @namespace std
* @brief Standard library extensions used by stroid.
*
* Provides a `std::formatter` specialization for `stroid::version` so it can
* be used with `std::format` and related APIs.
*/
// Overload format struct
template <>
struct std::formatter<stroid::version> : std::formatter<std::string> {
auto format(const stroid::version& v, auto& ctx) {
return std::formatter<std::string>::format(stroid::version::toString(), ctx);
}
};
/**
* @namespace stroid::config
* @brief Configuration types and defaults for mesh generation.
*/
namespace stroid::config {}
/**
* @namespace stroid::topology
* @brief Topology construction and curvilinear mapping utilities.
*/
namespace stroid::topology {}
/**
* @namespace stroid::IO
* @brief Mesh serialization and visualization helpers.
*/
namespace stroid::IO {}
/**
* @namespace stroid::utils
* @brief Mesh inspection and validation utilities.
*/
namespace stroid::utils {}

View File

@@ -5,6 +5,17 @@
#include "fourdst/config/config.h" #include "fourdst/config/config.h"
namespace stroid::topology { namespace stroid::topology {
/**
* @brief Promote a mesh to high-order by attaching an H1 nodal finite element space.
* @param mesh Mesh to update in-place.
* @param config Mesh configuration (uses `order`).
*/
void PromoteToHighOrder(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config); void PromoteToHighOrder(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config);
/**
* @brief Project high-order mesh nodes using the configured curvilinear mapping.
* @details Requires nodes to be present (call PromoteToHighOrder first).
* @param mesh Mesh to update in-place.
* @param config Mesh configuration (uses radii, flattening, and mapping parameters).
*/
void ProjectMesh(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config); void ProjectMesh(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config);
} }

View File

@@ -5,11 +5,31 @@
#include "fourdst/config/config.h" #include "fourdst/config/config.h"
namespace stroid::topology { namespace stroid::topology {
/**
* @brief Apply an equiangular (gnomonic) projection to a point on a cube.
* @param pos Position vector updated in-place.
*/
void ApplyEquiangular(mfem::Vector& pos); void ApplyEquiangular(mfem::Vector& pos);
/**
* @brief Apply spheroidal flattening along the Z axis.
* @param pos Position vector updated in-place.
* @param config Mesh configuration (uses `flattening`).
*/
void ApplySpheroidal(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config); void ApplySpheroidal(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config);
/**
* @brief Apply Kelvin transform outside the stellar radius.
* @param pos Position vector updated in-place.
* @param config Mesh configuration (uses `r_star` and `r_infinity`).
*/
void ApplyKelvin(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config); void ApplyKelvin(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config);
/**
* @brief Map a point from the initial block topology to the curvilinear domain.
* @param pos Position vector updated in-place.
* @param config Mesh configuration (uses radii, flattening, instability radius, and core steepness).
* @param attribute_id Element attribute ID (currently unused).
*/
void TransformPoint(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config, int attribute_id); void TransformPoint(mfem::Vector& pos, const fourdst::config::Config<config::MeshConfig> &config, int attribute_id);
} }

View File

@@ -6,6 +6,16 @@
#include <memory> #include <memory>
namespace stroid::topology { namespace stroid::topology {
/**
* @brief Build the initial multi-block mesh topology for the star model.
* @param config Mesh configuration (uses radii and domain flags).
* @return Newly allocated mesh skeleton (not yet refined or curved).
*/
std::unique_ptr<mfem::Mesh> BuildSkeleton(const fourdst::config::Config<config::MeshConfig> & config); std::unique_ptr<mfem::Mesh> BuildSkeleton(const fourdst::config::Config<config::MeshConfig> & config);
/**
* @brief Finalize topology, validate orientation, and apply uniform refinement.
* @param mesh Mesh to finalize in-place.
* @param config Mesh configuration (uses `refinement_levels`).
*/
void Finalize(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config); void Finalize(mfem::Mesh& mesh, const fourdst::config::Config<config::MeshConfig> &config);
} }

View File

@@ -3,6 +3,16 @@
#include "mfem.hpp" #include "mfem.hpp"
namespace stroid::utils { namespace stroid::utils {
/**
* @brief Mark elements with negative Jacobian determinant.
* @details Elements detected as flipped are assigned attribute 999.
* @param mesh Mesh to scan and update in-place.
*/
void MarkFlippedElements(mfem::Mesh& mesh); void MarkFlippedElements(mfem::Mesh& mesh);
/**
* @brief Mark boundary elements whose outward normal orientation is flipped.
* @details Boundary elements detected as flipped are assigned attribute 500.
* @param mesh Mesh to scan and update in-place.
*/
void MarkFlippedBoundaryElements(mfem::Mesh& mesh); void MarkFlippedBoundaryElements(mfem::Mesh& mesh);
} }

View File

@@ -17,14 +17,13 @@ namespace stroid::IO {
void SaveVTU(mfem::Mesh &mesh, const std::string &exportName) { void SaveVTU(mfem::Mesh &mesh, const std::string &exportName) {
mfem::ParaViewDataCollection pd(exportName, &mesh); mfem::ParaViewDataCollection pd(exportName, &mesh);
pd.SetDataFormat(mfem::VTKFormat::BINARY);
pd.SetHighOrderOutput(true); pd.SetHighOrderOutput(true);
pd.Save(); pd.Save();
} }
void ViewMesh(mfem::Mesh &mesh, const std::string& title, const VISUALIZATION_MODE mode) { void ViewMesh(mfem::Mesh &mesh, const std::string& title, const VISUALIZATION_MODE mode, const std::string &vishost, int visport) {
char vishost[] = "localhost"; mfem::socketstream sol_sock(vishost.c_str(), visport);
int visport = 19916;
mfem::socketstream sol_sock(vishost, visport);
if (!sol_sock.is_open()) { if (!sol_sock.is_open()) {
std::cerr << "Unable to connect to GLVis server at " std::cerr << "Unable to connect to GLVis server at "
<< vishost << ':' << visport << std::endl; << vishost << ':' << visport << std::endl;

View File

@@ -1,8 +1,10 @@
dependencies = [ dependencies = [
mfem_dep, mfem_dep,
config_dep config_dep,
] ]
subdir('include/stroid')
stroid_include_files = include_directories('include') stroid_include_files = include_directories('include')
stroid_sources = files( stroid_sources = files(
'lib/topology/curvilinear.cpp', 'lib/topology/curvilinear.cpp',
@@ -13,7 +15,7 @@ stroid_sources = files(
) )
stroid_lib = static_library( stroid_lib = static_library(
'stroid', 'libstroid',
stroid_sources, stroid_sources,
include_directories: stroid_include_files, include_directories: stroid_include_files,
dependencies: dependencies, dependencies: dependencies,

10
subprojects/cli11.wrap Normal file
View File

@@ -0,0 +1,10 @@
[wrap-file]
directory = CLI11-2.6.1
source_url = https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.6.1.tar.gz
source_filename = CLI11-2.6.1.tar.gz
source_hash = 377691f3fac2b340f12a2f79f523c780564578ba3d6eaf5238e9f35895d5ba95
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/cli11_2.6.1-1/CLI11-2.6.1.tar.gz
wrapdb_version = 2.6.1-1
[provide]
dependency_names = CLI11

View File

@@ -1 +1,27 @@
subdir('stroid_sandbox') gtest_dep = dependency('gtest', main: true, required : true)
gtest_main = dependency('gtest_main', required: true)
gtest_nomain_dep = dependency('gtest', main: false, required : true)
# Test files for const
test_sources = [
'stroidTest.cpp'
]
foreach test_file : test_sources
exe_name = test_file.split('.')[0]
test_exe = executable(
exe_name,
test_file,
dependencies: [
stroid_dep,
gtest_dep,
gtest_main
],
)
test(
exe_name,
test_exe,
env: ['MESON_SOURCE_ROOT=' + meson.project_source_root(), 'MESON_BUILD_ROOT=' + meson.project_build_root()])
endforeach

220
tests/stroidTest.cpp Normal file
View File

@@ -0,0 +1,220 @@
#include <gtest/gtest.h>
#include "fourdst/config/config.h"
#include "stroid/config/config.h"
#include "stroid/IO/mesh.h"
#include "stroid/topology/curvilinear.h"
#include "stroid/topology/mapping.h"
#include "stroid/topology/topology.h"
#include <cmath>
#include <filesystem>
#include <cstdlib>
#include <string>
namespace {
constexpr double kPi = 3.14159265358979323846;
using Config = fourdst::config::Config<stroid::config::MeshConfig>;
std::filesystem::path GetSourceRoot() {
if (const char* env = std::getenv("MESON_SOURCE_ROOT")) {
return std::filesystem::path(env);
}
return std::filesystem::current_path();
}
Config LoadConfigFromRepo(const std::filesystem::path& relative_path) {
Config cfg;
cfg.load((GetSourceRoot() / relative_path).string());
return cfg;
}
bool IsFiniteMeshNodes(const mfem::Mesh& mesh) {
const mfem::GridFunction* nodes = mesh.GetNodes();
if (!nodes) {
return false;
}
const int vdim = nodes->FESpace()->GetVDim();
const int ndofs = nodes->FESpace()->GetNDofs();
for (int i = 0; i < ndofs; ++i) {
for (int d = 0; d < vdim; ++d) {
const double val = (*nodes)(nodes->FESpace()->DofToVDof(i, d));
if (!std::isfinite(val)) {
return false;
}
}
}
return true;
}
} // namespace
/**
* @brief Test suite for the Stroid library
*/
class stroidTest : public ::testing::Test {};
TEST_F(stroidTest, BuildSkeleton_DefaultCounts) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
ASSERT_NE(mesh, nullptr);
EXPECT_EQ(mesh->Dimension(), 3);
EXPECT_EQ(mesh->GetNV(), 16);
EXPECT_EQ(mesh->GetNE(), 7);
EXPECT_EQ(mesh->GetNBE(), 6);
}
TEST_F(stroidTest, Finalize_RefinementIncreasesElements) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
const int initial_elements = mesh->GetNE();
stroid::topology::Finalize(*mesh, cfg);
EXPECT_GT(mesh->GetNE(), initial_elements);
EXPECT_TRUE(mesh->Conforming());
}
TEST_F(stroidTest, PromoteToHighOrder_SetsNodes) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
EXPECT_NE(mesh->GetNodes(), nullptr);
EXPECT_TRUE(IsFiniteMeshNodes(*mesh));
}
TEST_F(stroidTest, ProjectMesh_ProducesFiniteNodes) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
stroid::topology::ProjectMesh(*mesh, cfg);
EXPECT_TRUE(IsFiniteMeshNodes(*mesh));
}
TEST_F(stroidTest, ApplyEquiangular_BasicTransform) {
mfem::Vector pos(3);
pos(0) = 1.0;
pos(1) = 0.5;
pos(2) = -0.25;
stroid::topology::ApplyEquiangular(pos);
const double expected_y = 1.0 * std::tan(kPi / 4.0 * (0.5 / 1.0));
const double expected_z = 1.0 * std::tan(kPi / 4.0 * (-0.25 / 1.0));
EXPECT_NEAR(pos(1), expected_y, 1e-12);
EXPECT_NEAR(pos(2), expected_z, 1e-12);
}
TEST_F(stroidTest, ApplySpheroidal_FlattensZ) {
const Config cfg = LoadConfigFromRepo("configs/test_flattening.toml");
mfem::Vector pos(3);
pos(0) = 0.0;
pos(1) = 0.0;
pos(2) = 10.0;
stroid::topology::ApplySpheroidal(pos, cfg);
EXPECT_NEAR(pos(2), 8.0, 1e-12);
}
TEST_F(stroidTest, ApplyKelvin_ExpandsOutsideStar) {
const Config cfg;
mfem::Vector pos(3);
pos(0) = 5.5;
pos(1) = 0.0;
pos(2) = 0.0;
stroid::topology::ApplyKelvin(pos, cfg);
EXPECT_NEAR(pos(0), 6.0, 1e-12);
EXPECT_NEAR(pos(1), 0.0, 1e-12);
EXPECT_NEAR(pos(2), 0.0, 1e-12);
}
TEST_F(stroidTest, TransformPoint_AxisInsideCore_NoChange) {
const Config cfg;
mfem::Vector pos(3);
pos(0) = 1.0;
pos(1) = 0.0;
pos(2) = 0.0;
stroid::topology::TransformPoint(pos, cfg, 0);
EXPECT_NEAR(pos(0), 1.0, 1e-12);
EXPECT_NEAR(pos(1), 0.0, 1e-12);
EXPECT_NEAR(pos(2), 0.0, 1e-12);
}
TEST_F(stroidTest, TransformPoint_AxisEnvelope_NoChange) {
const Config cfg;
mfem::Vector pos(3);
pos(0) = 3.0;
pos(1) = 0.0;
pos(2) = 0.0;
stroid::topology::TransformPoint(pos, cfg, 0);
EXPECT_NEAR(pos(0), 3.0, 1e-12);
EXPECT_NEAR(pos(1), 0.0, 1e-12);
EXPECT_NEAR(pos(2), 0.0, 1e-12);
}
TEST_F(stroidTest, TransformPoint_AxisOutsideStar_KelvinExpands) {
const Config cfg;
mfem::Vector pos(3);
pos(0) = 5.5;
pos(1) = 0.0;
pos(2) = 0.0;
stroid::topology::TransformPoint(pos, cfg, 0);
EXPECT_NEAR(pos(0), 6.0, 1e-12);
EXPECT_NEAR(pos(1), 0.0, 1e-12);
EXPECT_NEAR(pos(2), 0.0, 1e-12);
}
TEST_F(stroidTest, SaveMesh_WritesFile) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
const std::filesystem::path tmp_dir = std::filesystem::temp_directory_path();
const std::filesystem::path mesh_path = tmp_dir / "stroid_test_mesh.mesh";
stroid::IO::SaveMesh(*mesh, mesh_path.string());
ASSERT_TRUE(std::filesystem::exists(mesh_path));
EXPECT_GT(std::filesystem::file_size(mesh_path), 0u);
std::error_code ec;
std::filesystem::remove(mesh_path, ec);
}
TEST_F(stroidTest, EndToEnd_BuildFinalizePromoteProject) {
const Config cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
stroid::topology::ProjectMesh(*mesh, cfg);
EXPECT_GT(mesh->GetNE(), 0);
EXPECT_NE(mesh->GetNodes(), nullptr);
EXPECT_TRUE(IsFiniteMeshNodes(*mesh));
}

View File

@@ -1,27 +0,0 @@
#include <print>
#include "stroid/topology/topology.h"
#include "stroid/config/config.h"
#include "stroid/IO/mesh.h"
#include <memory>
#include "mfem.hpp"
#include "stroid/topology/curvilinear.h"
#include "stroid/utils/mesh_utils.h"
#include "fourdst/config/config.h"
int main() {
const fourdst::config::Config<stroid::config::MeshConfig> cfg;
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
stroid::topology::ProjectMesh(*mesh, cfg);
//
// stroid::utils::MarkFlippedElements(*mesh);
// stroid::utils::MarkFlippedBoundaryElements(*mesh);
stroid::IO::ViewMesh(*mesh, "Spheroidal Mesh", stroid::IO::VISUALIZATION_MODE::BOUNDARY_ELEMENT_ID);
// stroid::IO::VisualizeFaceValence(*mesh);
// stroid::IO::SaveVTU(*mesh, "SpheroidalMesh");
}

View File

@@ -1 +0,0 @@
executable('stroid_sandbox', 'main.cpp', dependencies: stroid_dep)

1
tools/meson.build Normal file
View File

@@ -0,0 +1 @@
executable('stroid', 'stroid.cpp', dependencies: [stroid_dep, cli11_dep], install: true)

84
tools/stroid.cpp Normal file
View File

@@ -0,0 +1,84 @@
#include <memory>
#include "mfem.hpp"
#include "stroid/config/config.h"
#include "stroid/IO/mesh.h"
#include "stroid/topology/curvilinear.h"
#include "stroid/topology/topology.h"
#include "stroid/stroid.h"
#include "fourdst/config/config.h"
#include "CLI/CLI.hpp"
#include <optional>
enum INFO_MODE {
VERSION,
DEFAULT_CONFIG
};
int main(int argc, char** argv) {
fourdst::config::Config<stroid::config::MeshConfig> cfg;
CLI::App app{"stroid - A tool for generating multi-block meshes for stellar modeling"};
auto* generate = app.add_subcommand("generate", "Generate a multi-block mesh for stellar modeling");
auto* info = app.add_subcommand("info", "Access information about the program stroid");
std::optional<std::string> config_filename;
std::string output_filename;
bool view_mesh;
bool no_save;
std::optional<std::string> glvis_host;
std::optional<int> glvis_port;
generate->add_option("-c,--config", config_filename, "Path to configuration file")->check(CLI::ExistingFile);
generate->add_flag("-v,--view", view_mesh, "View the generated mesh using GLVis");
generate->add_flag("-n,--nosave", no_save, "Do not save the generated mesh to a file");
generate->add_option("--glvis-host", glvis_host, "GLVis server host (default: localhost)")->default_val("localhost");
generate->add_option("--glvis-port", glvis_port, "GLVis server port (default: 19916)")->default_val(19916);
generate->add_option("-o,--output", output_filename, "Output filename for the generated mesh")->default_val("stroid");
info->add_flag_callback("-v,--version", []() {
std::println("Stroid Version {}", stroid::version::toString());
return 0;
}, "Display stroid version information");
info->add_flag_callback("-d,--default", [&cfg]() {
cfg.save("default.toml");
}, "Save the default configuration to a file default.toml");
CLI11_PARSE(app, argc, argv);
// Ensure that if view is requested, host and port are set
if (view_mesh) {
if (!glvis_host.has_value()) {
glvis_host = "localhost";
}
if (!glvis_port.has_value()) {
glvis_port = 19916;
}
}
// If config filename is provided, load configuration from file
if (config_filename.has_value()) {
cfg.load(config_filename.value());
}
const std::unique_ptr<mfem::Mesh> mesh = stroid::topology::BuildSkeleton(cfg);
stroid::topology::Finalize(*mesh, cfg);
stroid::topology::PromoteToHighOrder(*mesh, cfg);
stroid::topology::ProjectMesh(*mesh, cfg);
if (!output_filename.empty() && !no_save) {
stroid::IO::SaveVTU(*mesh, output_filename);
}
if (view_mesh) {
stroid::IO::ViewMesh(*mesh, "Spheroidal Mesh - Colored by Element ID", stroid::IO::VISUALIZATION_MODE::ELEMENT_ID, glvis_host.value(), glvis_port.value());
}
}