Repository navigation
fix(ariadne): fe_lab meshes intervals through cvc::tetrahedralize2 - #845
Merged
Merged
Conversation
#808 fixed tetrahedralize2's interval path: it reaches LBIE's TETRA2 mode and meshes the layer as the solid min(v - lo, hi - v) >= 0, with the isovalues in either order. fe_lab's tetrahedralize_interval built that same solid itself as a Float volume and meshed it with the single-isovalue tetrahedralize, waiting for this fix. It now calls tetrahedralize2 with the original volume and only chooses the two bounds: - A bound samples sit on is passed on half way to the nearest value beyond it, so the interval stays inclusive ([1, 3] on labels is [0.5, 3.5]). tetrahedralize2 on its own counts a sample on an isovalue as outside and keeps label 2 alone; a new check pins that down. - A bound no sample lies beyond is moved far enough past the data that the other bound's side of the min wins at every sample, so it adds no sheet; with neither passed, the whole box. - The rule that raised samples on a bound to keep the surface a quarter of a grid edge away is gone: since #808's QEF clamping the ball shell has no slivers and every boundary normal points out of the shell without it, and the shell no longer bulges at those samples. cvcgl_fe_interval, the acceptance test: on the SDF ball's shell 6 <= r <= 10 (grid points on both bounds), Poisson's peak is 2.048 vs 2.014 exact (it was ~22% low before #808) and the shell's volume is 1.8% over (2.1% before). The bound tightens from 30% to 10%, and the sliver count (0) becomes a check. fem_gallery's --iso2 passes the two isovalues as given (tetrahedralize2 takes either order). Docs: mesh_nodes.h, TRANSFER_FUNCTIONS.md section 6, and GEOMETRY_API.md (samples on an isovalue count as outside of a tetrahedralize2 layer).
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.
fe_lab's interval mesher now calls
cvc::tetrahedralize2. That was the follow-up planned once #808 fixedtetrahedralize2's interval path. #808 madetetrahedralize2reach LBIE's TETRA2 mode and mesh the layer as the solidmin(v - lo, hi - v) >= 0, with the isovalues in either order. fe_lab'stetrahedralize_intervalhad been building that same solid itself, as a Float volume, and meshing it with the single-isovaluetetrahedralize.What changes
cvc::gl::ariadne::tetrahedralize_intervalpasses the original volume totetrahedralize2and only chooses the two bounds:[1, 3]on labels meshes as[0.5, 3.5]and keeps labels 1 and 3.tetrahedralize2on its own counts a sample on an isovalue as outside: on the same labels it keeps label 2 alone. A new check pins that down.H >= 2 vmax - L). With neither bound passed, the whole box is meshed.fem_gallery --iso2passes the two isovalues as given;tetrahedralize2takes either order.Acceptance test:
cvcgl_fe_intervalThe test meshes the SDF ball's shell 6 <= r <= 10 at 33³, with grid points on both bounds.
The Poisson bound tightens from 30% to 10% (peak and mean error), and the sliver count is now a check (at most 0.1% of the tets).
Tests (Windows, MSVC Release, with libigl)
cvcgl_fe_interval: all checks pass, including the newtetrahedralize2labels check: r in [5.25, 9.77], label 2 only.cvcgl_tf_bindingandcvcgl_ariadne_realizepass. The cvcgl_* tests are not part of CI's recipe jobs.fem_gallery --mesh stanford.bunny --problem mesh --dim 48 --iso2 -0.012gives an even shell: 230,713 tets, min/mean dihedral angle 0.2° / 46.3°.Docs:
mesh_nodes.h, TRANSFER_FUNCTIONS.md §6, and GEOMETRY_API.md, which now says a sample exactly on an isovalue counts as outside atetrahedralize2layer.