Dump the outer-boundary input next to outer.msh - #41
Open
krystophny wants to merge 4 commits into
Open
Conversation
write_FreeFem_mesh already writes the mesh Triangle produces; it does not write what Triangle was given. Reconstructing that from outside MEPHIT means rebuilding MEPHIT, which is the reason every experiment replacing Triangle so far (#27, #40) was judged on a hand-made circle instead of a real boundary. Write npt_inner, npt_outer, the hole marker and the two boundary loops to outer_boundary.dat, at 17 significant digits so the dump round-trips the double precision input exactly. A shorter format changes the refinement: truncating at 16 digits moves the tcfp_hip production case from 2470 to 2472 triangles, because the geometry sits at R ~ 1.7e5 cm. The dumps from this change now drive github.com/krystophny/tokamak-annulus-mesh-bench, which compares meshers on this exact problem without a MEPHIT build. Claude-Session: https://claude.ai/code/session_01ReV3pqLhWXFrM5DsrcSgWL
Member
Author
|
Dependency follow-up: this branch now pins libneo bridge |
Member
Author
|
Correction: the compatible main-line libneo bridge is PR itpplasma/libneo#414 at commit 7262c32bf0406594a8ef27e84654d249aef2cb86. This replaces the FortFEM-specific bridge reference; it consumes standalone Fortio PR lazy-fortran/fortio#68. The consumer branch has been updated and CI restarted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
write_FreeFem_meshwrites the mesh Triangle produces but not the input Triangle was given, so reproducing the annulus meshing problem outside MEPHIT requires a MEPHIT build. That is why both Triangle-replacement experiments so far (#27, #40) were judged on a hand-made circle rather than a real boundary.This writes
outer_boundary.datnext toouter.mshon every meshing run:17 significant digits, so the dump round-trips the double precision input. A shorter format is not neutral: truncating at 16 digits moves the
TCFP_hipproduction case from 2470 to 2472 triangles, because the KiLCA cases sit atR ~ 1.7e5 cmwith 0.5 cm edges.Eleven lines, one extra ~45 kB text file per run, no behaviour change.
What it enabled
Dumps from this branch now drive https://github.com/krystophny/tokamak-annulus-mesh-bench, which runs fortfem's
triangle_compat, Delaunay32 and Triangle on the same.mshcontract with no MEPHIT build. Measured on real boundaries fromdata/mephit_g000001.0001_TCFP_hip.inatmax_Delta_rad3.0 / 1.0 / 0.45 cm:fortfem matches Triangle exactly on all three. Delaunay32 preserves topology and area but, having no Steiner refinement, drops from 2.56° at 126 boundary points to 0.44° at 814 — the 128-point fixture in #40 overstated it by about a factor of six.
Relates to #25.
https://claude.ai/code/session_01ReV3pqLhWXFrM5DsrcSgWL