optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 33 forks source link

levelset: add support for evaluating the levelset on unstructured grids #293

Closed andrea-iob closed 2 years ago

andrea-iob commented 2 years ago

It is now possible to evaluate the levelset on unstructured grids.

edoardolombardi commented 2 years ago

I don't know the relationship with the pull request, but (at least) tests 1,2,3,4,6 of surfunstructured and tests 1,4 of sunrfunstructured parallel fail. On master branch all of them pass.

andrea-iob commented 2 years ago

There were some failures with the leveset tests that are now fixed. I don't see problems with the surfunstructured tests.

andrea-iob commented 2 years ago

Rebased on current master and added support for generic segmentation elements (before the change, only triangles were supported for three-dimensional segmentations).

andrea-iob commented 2 years ago

The new levelset test was failing because generalized barycentric coordinates cannot be evaluated for degenerate polygons (i.e. polygons with consecutive collinear edges). We may need to introduce some checks in the CG module to find out if a polygon is degenerate. For now, I slightly modified the geometry of the test case to avoid degenerate polygons.