Commit 98212d94 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

fix eikmesh edge callapse for fix points.

parent 131f2145
Pipeline #167702 passed with stages
in 136 minutes and 36 seconds
......@@ -787,11 +787,11 @@ public class GenEikMesh<V extends IVertex, E extends IHalfEdge, F extends IFace>
V v1 = getMesh().getVertex(edge);
V v2 = getMesh().getTwinVertex(edge);
if(!getMesh().isAtBoundary(v1) || !getMesh().isAtBoundary(v2)) {
if((!getMesh().isAtBoundary(v1) && !isFixPoint(v1)) || (!getMesh().isAtBoundary(v2) && !isFixPoint(v2))) {
VPoint newPosition;
if(getMesh().isAtBoundary(v1)) {
if(getMesh().isAtBoundary(v1) || isFixPoint(v1)) {
newPosition = new VPoint(v1.getX(), v1.getY());
} else if(getMesh().isAtBoundary(v2)) {
} else if(getMesh().isAtBoundary(v2) || isFixPoint(v2)) {
newPosition = new VPoint(v2.getX(), v2.getY());
} else {
newPosition = new VPoint((v1.getX() + v2.getX()) * 0.5, (v1.getY() + v2.getY()) * 0.5);
......
......@@ -146,6 +146,9 @@ public class EikonalSolverFMMTriangulation<V extends IVertex, E extends IHalfEdg
for(V vertex : targetVertices) {
this.targetVertices.add(vertex);
for(V neighbouringVertices : getMesh().getAdjacentVertexIt(vertex)) {
this.targetVertices.add(neighbouringVertices);
}
}
}
......
......@@ -74,7 +74,7 @@ public class TestFMMEikMesh {
@Ignore
@Test
public void testFilledChickenFMM() throws IOException {
testTriangulationFMM("/poly/filled_chicken.poly", new VPoint(2,2), 1.0);
testTriangulationFMM("/poly/filled_chicken.poly", new VPoint(2,2), 3.0);
}
@Ignore
......@@ -122,7 +122,6 @@ public class TestFMMEikMesh {
log.info("FFM finished");
log.info("time: " + (System.currentTimeMillis() - ms));
// 4. print the result to the console i.e. standard out
MeshPolyWriter<PVertex, PHalfEdge, PFace> meshPolyWriter = new MeshPolyWriter<>();
System.out.println(meshPolyWriter.to2DPoly(eikMesh.getMesh(), 1, i -> "potential", v -> false));
......
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