firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
520 stars 160 forks source link

Fix point location in parallel #3804

Closed connorjward closed 1 month ago

connorjward commented 1 month ago

Description

I believe that this fixes #3151 and supersedes #3293. It certainly seems to fix this issue on my machine.

github-actions[bot] commented 1 month ago
TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake complex8078 ran6459 passed1582 skipped37 failed
github-actions[bot] commented 1 month ago
TestsPassed ✅Skipped ⏭️Failed ❌
Firedrake real8084 ran7262 passed786 skipped36 failed
connorjward commented 1 month ago

Turns out that this is harder than expected. With my changes, if we consider the interval mesh

           p0   |      p1
        o-----o | -----o-----o
                |

and want to locate points A and B on p0 (note the extra cell from p1 is not visible)

           p0   |   p1
        o-----o | -----o
                |  A     B

then our strategy for identifying missing points means that both A and B are considered as being claimed by 'cells that we can't see' and both are removed. This is clearly wrong.

Unfortunately I can't currently think of a way to fix this in a non-invasive manner at present. I do have some general thoughts:

connorjward commented 1 month ago

Closing as this was poorly thought out (though in my defence this is extremely confusing). I will attempt to get #3293 merged.