11.08., 9:00 - 11:00: Due to updates GitLab will be unavailable for some minutes between 09:00 and 11:00.

Commit 13b93b28 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

Update README.md

parent ce63bb95
Pipeline #107539 failed with stages
in 125 minutes and 32 seconds
# EikMesh
# EikMesh - A parallel mesh generator for 2D unstructured meshes
\ No newline at end of file
## Introduction
The EIKMESH Java library contains multiple algorithms and data structures to generate, change and use unstructured 2D triangular meshes.
The library implements a generic version of the edge based half-edge data structure also called doubly connected edge list (DCEL).
User defined data types can be easily stored at and accessed via mesh elements (vertices, (half-)edges, faces / triangles).
Given some mesh elements, adjacent elements can be accessed in O(1) time.
Each generated mesh is conforming. Holes are supported.
The aim was to provide a fast, light and user-friendly meshing tool with parametric input, generic data types and advanced visualization capabilities.
EIKMESH generates
- exact Delaunay triangulations (DT),
- constrained Delaunay triangulations (CDT),
- conforming Delaunay triangulations (CCDT),
- Voronoi diagrams, and
- high-quality unstructured and conforming triangular meshes.
## EikMesh
The EikMesh mesh generator was published in [1] and is heavily based on DistMesh a simple and mesh generator (in MATLAB) which was developed by Per-Olof Persson and Gilbert Strang.
EikMesh inherits its specification of the geometry via signed distance functions and the concept of iterative smoothing by converging towards a force equilibrium from DistMesh.
However, EikMesh completely avoids the computation of the Delaunay triangulation, generates a different and cache friendly initial triangulation and treats boundary elements more carefully.
Additionally, EikMesh supports geometries defined by a [segment bounded planar straight-line graphs](https://en.wikipedia.org/wiki/Planar_straight-line_graph) (PSLG).
## Documentation
- EIKMESH - a Java library for 2D unstructured triangular meshes
- [A parallel generator for sparse unstructured meshes to solve the eikonal equation](https://doi.org/10.1016/j.jocs.2018.09.009)
- Wiki
## Download
The source code is available at [GitLab](https://gitlab.lrz.de/vadere/vadere/tree/master/VadereMeshing).
A pre-compiled version can be download [here](TODO).
EikMesh is distributed under the LGPL license.
## Examples
### Videos
### Code
VRectangle bound = new VRectangle(-0.1, -0.1, 2.2, 2.2);
IDistanceFunction d_r = IDistanceFunction.createRing(1, 1, 0.2, 1.0);
double h0 = 0.1;
PEikMesh meshImprover = new PEikMesh(d_r,h0,bound);
PSLG pslg = ...
PEikMesh meshImprover = new PEikMesh(pslg.getSegmentBound(), 0.02, pslg.getHoles());
VRectangle bound = ...
VRectangle rect = new VRectangle(0.5, 0.5, 1, 1);
IDistanceFunction d_c = IDistanceFunction.createDisc(0.5, 0.5, 0.5);
IDistanceFunction d_r = IDistanceFunction.create(rect);
IDistanceFunction d = IDistanceFunction.substract(d_c, d_r);
double edgeLength = 0.03;
var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>(
p -> edgeLength + 0.5 * Math.abs(d.apply(p)),
(x, y) -> new EikMeshPoint(x, y, false));
// inner rectangle
VRectangle rect = new VRectangle(-0.5, -0.5, 1, 1);
// outer rectangle
VRectangle boundary = new VRectangle(-2,-0.7,4,1.4);
// construction of the distance function, define the 2 discs
IDistanceFunction d1_c = IDistanceFunction.createDisc(-0.5, 0, 0.5);
IDistanceFunction d2_c = IDistanceFunction.createDisc(0.5, 0, 0.5);
// define the two rectangles
IDistanceFunction d_r = IDistanceFunction.create(rect);
IDistanceFunction d_b = IDistanceFunction.create(boundary);
// combine distance functions
IDistanceFunction d_unionTmp = IDistanceFunction.union(d1_c, d_r)
IDistanceFunction d_union = IDistanceFunction.union(d_unionTmp, d2_c);
IDistanceFunction d = IDistanceFunction.substract(d_b,d_union);
// h_min
double edgeLength = 0.03;
var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>(
p -> edgeLength + 0.5 * Math.abs(d.apply(p)),
(x, y) -> new EikMeshPoint(x, y, false));
// generate the mesh
var triangulation = meshImprover.generate();
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment