-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No link between mesh and DM coordinates breaks VertexOnlyMesh #2185
Comments
ReubenHill
added a commit
that referenced
this issue
Aug 18, 2021
They won't work! Also add tests. CF issue #2185
Merged
ReubenHill
added a commit
that referenced
this issue
Aug 19, 2021
They won't work! Also add tests. CF issue #2185
ReubenHill
added a commit
that referenced
this issue
Aug 26, 2021
They won't work! Also add tests. CF issue #2185
ReubenHill
added a commit
that referenced
this issue
Aug 26, 2021
They won't work! Also add tests. CF issue #2185
This was referenced May 11, 2022
No longer failing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failing Script
Consider the below (as reported by @JDBetteridge )
if run on more than one rank, this fails with
Thoughts
My belief is that the line
is naughty.
The
mesh
is sitting on top of a DMPlex which has an implicit coordinates field (made when_from_cell_list
infiredrake/mesh.py
is called) which I don’t think is updated.This break things like creating a
VertexOnlyMesh
which relies on that underlying-plex coordinate field to decide on parallel distribution of the DMSwarm and whether-or-not the DMSwarm coordinates (theVertexOnlyMesh
vertices) are within the coordinates field of themesh
:firedrake/firedrake/mesh.py
Line 2119 in 9e7c358
Specific cause of the observed error
When calling
firedrake/firedrake/cython/dmcommon.pyx
Line 2710 in 9e7c358
at
firedrake/firedrake/mesh.py
Line 2002 in 9e7c358
some of the swarm coordinates are no longer inside the
mesh
as reported by themesh
's coordinates field (mesh.dat.coordinates
) despite the DMPlex happily reporting that they are inside the mesh and therefore not filtering them out.At this point in the code it’s assumed that you’ve already filtered out all out-of-(local)-mesh points at the previously mentioned
firedrake/firedrake/mesh.py
Line 2119 in 9e7c358
Therefore
firedrake/firedrake/cython/dmcommon.pyx
Line 2710 in 9e7c358
returns a
None
which is not thePetscInt
type that cython is expecting.Fixes
Quick (specific to this issue)
We could switch to filtering points using
locate_cell_and_reference_coordinate
before rank locating them relative to the DMPlexHarder (specific to this issue)
We could go “full firedrake” and, rather than using PETSc’s in built swarm functionality, abandon use of the DMPlex coordinates field altogether.
Ideal (more general)
Find a way to maintain the link between the DMPlex coordinates field and firedrake
mesh.coordinates
field.The text was updated successfully, but these errors were encountered: