In January 2021 we will introduce a 10 GB quota for project repositories. Higher limits for individual projects will be available on request. Please see https://doku.lrz.de/display/PUBLIC/GitLab for more information.

Commit 251c0b36 authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

BugFix: Wrong virtual angle computation for obtuse triangles for eikonal solvers on the mesh.

parent e41fd5ee
Pipeline #329902 passed with stages
in 129 minutes and 36 seconds
......@@ -93,7 +93,7 @@ public interface MeshEikonalSolver<V extends IVertex, E extends IHalfEdge, F ext
}
default double computeCosPhi(@NotNull final V p1, @NotNull final V p, @NotNull final V p2) {
return Math.cos(GeometryUtils.angle3D(getMesh().getX(p1), getMesh().getY(p1), getMesh().getX(p), getMesh().getY(p), getMesh().getX(p2), getMesh().getY(p2)));
return Math.cos(GeometryUtils.angle(getMesh().getX(p1), getMesh().getY(p1), getMesh().getX(p), getMesh().getY(p), getMesh().getX(p2), getMesh().getY(p2)));
}
/**
......
......@@ -1390,8 +1390,11 @@ public class GeometryUtils {
* @return the (smallest possible) angle3D at C from the triangle ACB.
*/
public static double angle(@NotNull final IPoint A, @NotNull final IPoint C, @NotNull final IPoint B) {
double phi1 = angleTo(A, C);
double phi2 = angleTo(B, C);
return angle(A.getX(), A.getY(), C.getX(), C.getY(), B.getX(), B.getY());
}
public static double angle(final double xa, final double ya, final double xc, final double yc, final double xb, final double yb) {
double phi1 = angleTo(xa, ya, xc, yc);
double phi2 = angleTo(xb, yb, xc, yc);
double phi = Math.abs(phi1 - phi2);
return Math.min(phi, 2 * Math.PI - phi);
}
......
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