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
521 stars 160 forks source link

allow for ghost only mesh #3743

Closed ksagiyam closed 2 months ago

ksagiyam commented 3 months ago

Allow for ghost only meshes.

plex.pointSF.ilocal is an array of leaf points on each rank. If the array is trivial (i.e., ilocal = [0, 1, 2, ...]), ilocal is set to NULL. So typically we use this array as point = ilocal[i] if ilocal else i, but in some places we simply do point = ilocal[I]. This is fine if a rank at least owns one cell (ilocal is nontrivial due to plex point numbering convention) or does not have cells at all, but not fine if the rank sees and only sees ghost cells (ilocal is trivial, so ilocal becomes NULL) . It turned out that we need to handle the latter case if submeshes are involved the submesh PR.

ksagiyam commented 2 months ago

Thanks! I think it is fine.