Commit 61f8ed1f authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

update to a fmm+eikmesh test

parent 15cc6e4a
Pipeline #162788 passed with stages
in 129 minutes and 24 seconds
......@@ -61,7 +61,7 @@ public class EikMeshPlots {
//roomLFS();
//cornerLFS();
uniformRing(0.3);
//uniformRing(0.3);
}
public static void randomDelaunay() throws IOException {
......
......@@ -35,8 +35,8 @@ public class EikMeshPoly {
//meshPoly("/poly/bridge.poly");
//meshPoly("/poly/room.poly");
//meshPoly("/poly/corner.poly");
//meshPoly("/poly/railing.poly");
displayPolyFile("/poly/muenchner_freiheit.poly");
meshPoly("/poly/railing.poly");
//displayPolyFile("/poly/muenchner_freiheit.poly");
}
public static void meshPoly(@NotNull final String fileName) throws IOException, InterruptedException {
......
......@@ -698,7 +698,7 @@ public class GenEikMesh<V extends IVertex, E extends IHalfEdge, F extends IFace>
}
private boolean isSlidePoint(@NotNull V vertex) {
return getMesh().isAtBoundary(vertex) && !isFixPoint(vertex);
return getMesh().isAtBoundary(vertex) && !isFixPoint(vertex) && boundaryPointToLine.containsKey(vertex);
}
/**
......
......@@ -10,6 +10,7 @@ import org.vadere.meshing.mesh.gen.PMesh;
import org.vadere.meshing.mesh.gen.PVertex;
import org.vadere.meshing.mesh.inter.IIncrementalTriangulation;
import org.vadere.meshing.utils.io.poly.MeshPolyReader;
import org.vadere.meshing.utils.io.poly.MeshPolyWriter;
import org.vadere.simulator.models.potential.solver.calculators.EikonalSolver;
import org.vadere.simulator.models.potential.solver.calculators.mesh.EikonalSolverFMMTriangulation;
import org.vadere.simulator.models.potential.solver.timecost.UnitTimeCostFunction;
......@@ -27,8 +28,8 @@ public class TestFMMEikMesh {
@Test
public void testTriangulationFMM() throws IOException {
final InputStream inputStream = MeshExamples.class.getResourceAsStream("/poly/muenchner_freiheit.poly");
MeshPolyReader<PVertex, PHalfEdge, PFace> meshPolyWriter = new MeshPolyReader<>(() -> new PMesh());
var mesh = meshPolyWriter.readMesh(inputStream);
MeshPolyReader<PVertex, PHalfEdge, PFace> meshReader = new MeshPolyReader<>(() -> new PMesh());
var mesh = meshReader.readMesh(inputStream);
IIncrementalTriangulation<PVertex, PHalfEdge, PFace> triangulation = new IncrementalTriangulation<>(mesh);
......@@ -50,6 +51,10 @@ public class TestFMMEikMesh {
log.info("FFM finished");
log.info("time: " + (System.currentTimeMillis() - ms));
System.out.println(mesh.toPythonTriangulation(v -> triangulation.getMesh().getDoubleData(v, "potential")));
MeshPolyWriter<PVertex, PHalfEdge, PFace> meshPolyWriter = new MeshPolyWriter<>();
System.out.println(meshPolyWriter.to2DPoly(triangulation.getMesh(), 1, i -> "potential", v -> false));
//System.out.println(mesh.toPythonTriangulation(v -> triangulation.getMesh().getDoubleData(v, "potential")));
}
}
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