Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
61f8ed1f
Commit
61f8ed1f
authored
Oct 10, 2019
by
Benedikt Zoennchen
Browse files
update to a fmm+eikmesh test
parent
15cc6e4a
Pipeline
#162788
passed with stages
in 129 minutes and 24 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
VadereMeshing/src/org/vadere/meshing/examples/EikMeshPlots.java
View file @
61f8ed1f
...
...
@@ -61,7 +61,7 @@ public class EikMeshPlots {
//roomLFS();
//cornerLFS();
uniformRing
(
0.3
);
//
uniformRing(0.3);
}
public
static
void
randomDelaunay
()
throws
IOException
{
...
...
VadereMeshing/src/org/vadere/meshing/examples/EikMeshPoly.java
View file @
61f8ed1f
...
...
@@ -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
{
...
...
VadereMeshing/src/org/vadere/meshing/mesh/triangulation/improver/eikmesh/gen/GenEikMesh.java
View file @
61f8ed1f
...
...
@@ -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
)
;
}
/**
...
...
VadereSimulator/tests/org/vadere/simulator/models/potential/solver/TestFMMEikMesh.java
View file @
61f8ed1f
...
...
@@ -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
>
mesh
PolyWrit
er
=
new
MeshPolyReader
<>(()
->
new
PMesh
());
var
mesh
=
mesh
PolyWrit
er
.
readMesh
(
inputStream
);
MeshPolyReader
<
PVertex
,
PHalfEdge
,
PFace
>
mesh
Read
er
=
new
MeshPolyReader
<>(()
->
new
PMesh
());
var
mesh
=
mesh
Read
er
.
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")));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment