Replace Shewchuk Triangle with fortfem's MIT-licensed Triangle-compatible mesher - #27
Closed
krystophny wants to merge 5 commits into
Closed
Replace Shewchuk Triangle with fortfem's MIT-licensed Triangle-compatible mesher#27krystophny wants to merge 5 commits into
krystophny wants to merge 5 commits into
Conversation
Triangle forbids distribution as part of a commercial system without arrangement with the author, which conflicts with MEPHIT's MIT license. fortfem's clean-room triangle_compat module reproduces Triangle's behavior for the flags MEPHIT uses (BejnpqYz): on the TCFP annulus geometry of write_FreeFem_mesh, the generated outer.msh has byte-identical vertices and segments and the same triangles up to enumeration order; on the AUG annulus the file is byte-identical. The mesher is now called directly from Fortran (mephit_triangulate), so the C wrapper around triangulate() goes away along with the Triangle fetch-and-patch machinery. fortfem is fetched via FetchContent with FORTFEM_TRIANGLE_COMPAT_ONLY=ON, which builds only the dependency-free mesher library. Resolves #25
# Conflicts: # CMakeLists.txt # cmake/SetupCODE.cmake
Member
Author
This was referenced Aug 17, 2026
Member
Author
|
Closing for now; branch archived as |
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.
Replaces Shewchuk's Triangle with fortfem's clean-room, MIT-licensed
triangle_compatmesher. Triangle's distribution restriction conflicts withMEPHIT's MIT license.
Resolves #25
Changes
mephit_triangulateadapter.fixed boundary segments, q20 quality refinement, and FreeFem
.mshoutput.
fortfem_triangle_compattarget.Dependency pin
Fortfem PR #56 is now
merged. This branch pins FortFEM
mainat605dc7f.FORTFEM_PATHcan be set for local source testing.Verification
605dc7f056aa9b15cf8e0673eaa13b13ce12a273.mephittarget built successfully with gfortran.produced 262 points, 380 triangles, 144 segments, and a 20.1546 degree
minimum angle.
present in the resulting shared-library dependencies.