GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
203 stars 80 forks source link

Robust point location for degenerate configurations #3202

Open sframba opened 2 days ago

sframba commented 2 days ago

This PR adds a new method to determine if a point lies inside or outsilde a (convex) polyhedral cell. Compared to the current method, the new implementation is slower, but handles gracefully the degenerate conditions of points lying on mesh vertices, edges and faces. It does so by:

The only ambiguity left is when the point lies on a face/edge/vertex that is a boundary for an MPI rank, but an interior face/edge/vertex for another rank. In this case, both ranks will claim the point. However, at least one of them will consider the point to belong to a ghost element. This is a desirable outcome, since the desired behaviour in this case can be different according to the specific application (e.g., sources vs. receivers for the seismic wave case). This outcome leaves the choice to the caller method on how to handle this case, using ghost rank information.

The new point location algorithm is used for wave propagation kernels, fixing issue 3104 and issue 2888.

codecov[bot] commented 2 days ago

Codecov Report

Attention: Patch coverage is 72.11155% with 70 lines in your changes missing coverage. Please review.

Project coverage is 55.77%. Comparing base (94a0e86) to head (de5c110).

Files Patch % Lines
...omponents/mesh/utilities/ComputationalGeometry.hpp 67.56% 48 Missing :warning:
...n/anisotropic/AcousticVTIWaveEquationSEMKernel.hpp 0.00% 14 Missing :warning:
...rderEqn/anisotropic/AcousticVTIWaveEquationSEM.cpp 0.00% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3202 +/- ## =========================================== + Coverage 55.75% 55.77% +0.02% =========================================== Files 1041 1041 Lines 88534 88715 +181 =========================================== + Hits 49358 49481 +123 - Misses 39176 39234 +58 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.