Commit 236c496b authored by Benedikt Zoennchen's avatar Benedikt Zoennchen
Browse files

implement the eikonal solver for acute triangulation

parent 63fb9f74
......@@ -130,12 +130,7 @@ public class PointLocation<P extends VPoint> {
return Optional.of(edge.getFace());
}
else {
if(edge.getTwin().isPresent()) {
return Optional.of(edge.getTwin().get().getFace());
}
else {
return Optional.empty();
}
return Optional.of(edge.getTwin().getFace());
}
}
}
......@@ -6,9 +6,10 @@ import java.util.Set;
import java.util.stream.Stream;
public interface Triangulation<P extends IPoint> {
Face<P> locate(P point);
Face<P> locate(final double x, final double y);
Face<P> locate(final IPoint point);
Stream<Face<P>> streamFaces();
Set<Face<P>> getFaces();
void insert(P point);
void remove(P point);
void insert(final P point);
void remove(final P point);
}
......@@ -19,6 +19,7 @@ public class InterpolationUtil {
PotentialPoint p1 = points.get(0);
PotentialPoint p2 = points.get(1);
PotentialPoint p3 = points.get(2);
VTriangle vtriangle = new VTriangle(new VPoint(p1), new VPoint(p2), new VPoint(p3));
double totalArea = vtriangle.getArea();
......
package org.vadere.util.potential.calculators;
<<<<<<< HEAD
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.vadere.util.geometry.GeometryUtils;
......@@ -18,23 +17,16 @@ import org.vadere.util.geometry.shapes.VTriangle;
import org.vadere.util.math.InterpolationUtil;
import org.vadere.util.math.MathUtil;
import org.vadere.util.potential.PathFindingTag;
=======
import org.vadere.util.geometry.shapes.VShape;
>>>>>>> refactoring of the eikonalSolver code
import org.vadere.util.potential.timecost.ITimeCostFunction;
import org.vadere.util.geometry.mesh.iterators.FaceIterator;
import org.vadere.util.triangulation.IPointConstructor;
<<<<<<< HEAD
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.LinkedList;
=======
import java.awt.*;
>>>>>>> refactoring of the eikonalSolver code
import java.util.List;
import java.util.Optional;
import java.util.PriorityQueue;
......@@ -179,7 +171,6 @@ public class EikonalSolverFMMTriangulation<P extends PotentialPoint, E extends I
@Override
public double getValue(double x, double y) {
<<<<<<< HEAD
Optional<F> optFace = triangulation.locate(new VPoint(x, y));
double result = Double.MAX_VALUE;
......@@ -572,15 +563,4 @@ public class EikonalSolverFMMTriangulation<P extends PotentialPoint, E extends I
return halfEdge.toString();
}
}
=======
return 0;
}
@Override
public boolean isValidPoint(Point point) {
return false;
}
>>>>>>> refactoring of the eikonalSolver code
}
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