A 2D/3D, an-/isotropic triangular/tetrahedral mesh generator based on the DistMesh algorithm in modern Fortran
(NOTE: this is a work in progress!).
- GNU compiler (e.g., gfortran and gcc)
- Qhull (static re-entrant libraries)
- Python3+ (for visualization of mesh and for development of mesh size functions)
- Enter into the work directory.
- In the makefile, change the path to the include directory (CPP) and library directory (LDFLAGS).
- In make.inc, change the type of build configuration (i.e., dbg, optimised, etc.)
- Run make and the generated binary should be installed in work/bin.
It requires a Planar Straight Line graph (in 2D) or PSLG that describes the boundary of the domain. % The PSLG is a text file called "PSLG.txt" in the working directory in the following format:
5 2 ! # of points and dimension
-1.0 1.0 ! x and y coordinates of each point
1.0 1.0
1.0 -1.0
-1.0 -1.0
-1.0 1.0
It requires the user define their own mesh size function in the module src/YourMeshSizeFunction.F90. The mesh size function takes a vector of coordinates and returns a desired element size and orientation (i.e., anisotropic) In the simplest case, you can simply write a function to return only a element size (isotropic).