Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 73892c53 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

remove triangles from the triangulation if they intersect any obstacle.

parent d5f26c20
...@@ -532,6 +532,10 @@ public abstract class DefaultModel<T extends DefaultConfig> extends Observable i ...@@ -532,6 +532,10 @@ public abstract class DefaultModel<T extends DefaultConfig> extends Observable i
fireChangeViewportEvent(bound); fireChangeViewportEvent(bound);
} }
} }
psDistmesh.cleanUp();
triangulation = psDistmesh.getTriangles();
setChanged();
fireChangeViewportEvent(bound);
}); });
t.start(); t.start();
......
...@@ -124,16 +124,16 @@ public class VRectangle extends Rectangle2D.Double implements VShape { ...@@ -124,16 +124,16 @@ public class VRectangle extends Rectangle2D.Double implements VShape {
return new VPolygon(this); return new VPolygon(this);
} }
@Override @Override
public boolean intersect(final VShape shape) { public boolean intersect(final VShape shape) {
if(shape instanceof VRectangle){ if(shape instanceof VRectangle){
return intersects(((VRectangle)shape)); return intersects(((VRectangle)shape));
} }
else if(shape instanceof VPolygon) { else if(shape instanceof VPolygon) {
return shape.intersect(this); return shape.intersect(this);
} }
else { else {
throw new UnsupportedOperationException("not yet implemented"); throw new UnsupportedOperationException("not yet implemented");
} }
} }
} }
...@@ -100,6 +100,14 @@ public class PSDistmesh { ...@@ -100,6 +100,14 @@ public class PSDistmesh {
return steps >= Parameters.MAX_NUMBER_OF_STEPS; return steps >= Parameters.MAX_NUMBER_OF_STEPS;
} }
/**
* Remove all triangles intersecting any obstacle shape.
*/
public void cleanUp() {
triangulation = triangulation.stream()
.filter(triple -> obstacles.stream().noneMatch(obstacle -> tripleToTriangle(triple).intersect(obstacle))).collect(Collectors.toSet());
}
/* /*
Stellt den Verlauf der Iterationen dar. Innerhalb der while(true) passiert eine Iteration des Algorithmus Stellt den Verlauf der Iterationen dar. Innerhalb der while(true) passiert eine Iteration des Algorithmus
*/ */
......
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