Implementation of a 2D simplicial mesh generator using the constrained Delaunay algorithm. DMG takes a 2D boundary mesh as input, and outputs a 2D simplicial volume mesh.
You can get the sources from here by typing in your terminal :
git clone https://github.com/gabriel-suau/delaunay-mesh-generator.git DMG
DMG uses CMake to generate a Makefile based on the user's configuration. To build the dmg
executable, execute the following commands in your terminal (assuming you are in the project's top directory) :
mkdir build
cd build
cmake ..
make
This will produce an executable called dmg
inside a bin
directory located in the project's top directory. To execute the program, you can type :
/path/to/dmg input_boundary.mesh output_mesh.mesh
For the moment, DMG can only read and write meshes in the ASCII Medit format. More formats may (or may not) be added in the future.
Here is a small checklist of the implemented features and the features that still need to be implemented :
- Read a discretized boundary of a 2D domain from a Medit formatted file,
- Create a rectangular bounding box divided in 2 triangles,
- Insert the boundary points using the Bowyer-Watson algorithm,
- Enforce the boundary edges,
- Mark the subdomains and delete the bounding box,
- Refine the mesh by inserting volume points in order to achieve a desired edge length.
- Optimizations (edge swaps, collapses and node relocation)
You can find some examples of input boundary meshes in the meshes/input
directory. To launch the tests, enable the BUILD_TESTING
option when configuring with Cmake, build DMG
with make
, and type
make test
or
ctest
The output meshes and solution files are written in the meshes/output
directory.
A Doxygen documentation can be built by enabling the DMG_DOC
option when configuring the project (no, that is a lie, the documentation is not available yet).
All credits go to Gabriel Suau and Lucas Trautmann.
This project is distributed under the GNU-GPLv3 license. A copy of the whole license is included in the repository.