... | ... | @@ -454,35 +454,19 @@ For more details we refer to [Zönnchen and Köster, 2018](https://www.sciencedi |
|
|
|
|
|
## Examples
|
|
|
|
|
|
### Example 1 (Uniform mesh)
|
|
|
### Example 1 (Uniform ring)
|
|
|
|
|
|
In this example we use the mi
|
|
|
```java
|
|
|
// define the bounding box
|
|
|
VPolygon boundary = GeometryUtils.polygonFromPoints2D(
|
|
|
new VPoint(0,0),
|
|
|
new VPoint(0, 1),
|
|
|
new VPoint(1, 1),
|
|
|
new VPoint(1,0));
|
|
|
|
|
|
// define the initial edge length h0
|
|
|
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;
|
|
|
|
|
|
// define the EikMesh mesh generator
|
|
|
PEikMeshGen<EikMeshPoint, Double, Double> meshImprover = new PEikMeshGen<>(
|
|
|
boundary,
|
|
|
h0,
|
|
|
(x, y) -> new EikMeshPoint(x, y, false));
|
|
|
|
|
|
// generate the mesh
|
|
|
PEikMesh meshImprover = new PEikMesh(d_r,h0,bound);
|
|
|
meshImprover.generate();
|
|
|
|
|
|
// get the generated mesh
|
|
|
meshImprover.getMesh()
|
|
|
```
|
|
|
|
|
|
#### Result:
|
|
|
<img src="uploads/bf06693e56e09d5ad4264d9316f00173/rectUniformMesh.png" alt="Uniform rect mesh" width="200"/>
|
|
|
![uniform_ring](uploads/f70853ddb85fdd6b7b976a90454ef157/uniform_ring.png)
|
|
|
|
|
|
### Example 2 (Uniform mesh)
|
|
|
|
... | ... | |