Commit bbef5211 authored by BZoennchen's avatar BZoennchen

Update README.md

parent a864a533
Pipeline #107550 failed with stages
in 136 minutes and 39 seconds
...@@ -44,14 +44,16 @@ eikmesh is part of [Vadere](http://www.vadere.org/) but can be used seperately. ...@@ -44,14 +44,16 @@ eikmesh is part of [Vadere](http://www.vadere.org/) but can be used seperately.
```java ```java
VRectangle bound = new VRectangle(-0.1, -0.1, 2.2, 2.2); VRectangle bound = new VRectangle(-0.1, -0.1, 2.2, 2.2);
IDistanceFunction d_r = IDistanceFunction.createRing(1, 1, 0.2, 1.0); IDistanceFunction d_r = IDistanceFunction.createRing(1, 1, 0.2, 1.0);
double h0 = 0.1; double h_min = 0.1;
PEikMesh meshImprover = new PEikMesh(d_r,h0,bound); PEikMesh meshImprover = new PEikMesh(d_r,h_min,bound);
meshImprover.generate(); meshImprover.generate();
``` ```
```java ```java
// read a planar straight line graph from an input stream
PSLG pslg = ... PSLG pslg = ...
PEikMesh meshImprover = new PEikMesh(pslg.getSegmentBound(), 0.02, pslg.getHoles()); double h_min = 0.02;
PEikMesh meshImprover = new PEikMesh(pslg.getSegmentBound(), h_min, pslg.getHoles());
``` ```
...@@ -61,11 +63,11 @@ VRectangle rect = new VRectangle(0.5, 0.5, 1, 1); ...@@ -61,11 +63,11 @@ VRectangle rect = new VRectangle(0.5, 0.5, 1, 1);
IDistanceFunction d_c = IDistanceFunction.createDisc(0.5, 0.5, 0.5); IDistanceFunction d_c = IDistanceFunction.createDisc(0.5, 0.5, 0.5);
IDistanceFunction d_r = IDistanceFunction.create(rect); IDistanceFunction d_r = IDistanceFunction.create(rect);
IDistanceFunction d = IDistanceFunction.substract(d_c, d_r); IDistanceFunction d = IDistanceFunction.substract(d_c, d_r);
double edgeLength = 0.03; double h_min = 0.03;
var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>( var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>(
d, d,
p -> edgeLength + 0.5 * Math.abs(d.apply(p)), p -> h_min + 0.5 * Math.abs(d.apply(p)),
edgeLength, h_min,
bound, bound,
Arrays.asList(rect), Arrays.asList(rect),
(x, y) -> new EikMeshPoint(x, y, false)); (x, y) -> new EikMeshPoint(x, y, false));
...@@ -92,11 +94,11 @@ IDistanceFunction d_union = IDistanceFunction.union(d_unionTmp, d2_c); ...@@ -92,11 +94,11 @@ IDistanceFunction d_union = IDistanceFunction.union(d_unionTmp, d2_c);
IDistanceFunction d = IDistanceFunction.substract(d_b,d_union); IDistanceFunction d = IDistanceFunction.substract(d_b,d_union);
// h_min // h_min
double edgeLength = 0.03; double h_min = 0.03;
var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>( var meshImprover = new PEikMeshGen<EikMeshPoint, Double, Double>(
d, d,
p -> edgeLength + 0.5 * Math.abs(d.apply(p)), p -> h_min + 0.5 * Math.abs(d.apply(p)),
edgeLength, edgeLength,
GeometryUtils.boundRelative(boundary.getPath()), GeometryUtils.boundRelative(boundary.getPath()),
Arrays.asList(rect), Arrays.asList(rect),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment