[petsc-dev] DMPlex redistribution

Adrian Croucher a.croucher at auckland.ac.nz
Mon Mar 27 17:57:48 CDT 2023


hi Matt,

On 28/03/23 00:14, Matthew Knepley wrote:
> Yes, it is a new check. I do not expect cells that are shared until we 
> create an overlap. We
> can just put in a flag to shut it off, since otherwise it is a great 
> check for finding bugs. Can
> you show me how you add cells, so we can make a small example that 
> tests this to go in
> PETSc?

Essentially I'm adding (one or more) cells nested "inside" some of the 
original DM cells to simulate dual porosity. As well as new cells I also 
create a new face between the original cell and the new one, and a new 
edge and point for the face (so the DAG is the same depth everywhere - 
otherwise it causes trouble).

In the code, I create a new DMPlex, figure out the chart including the 
new cells etc., set the cone sizes and the cones. I symmetrize it, copy 
labels over from the original DM, set cell types (using 
DM_POLYTOPE_INTERIOR_GHOST for the new points) and set up the point SF 
for the new DM. If something is wrong with that point SF, would it cause 
the error I'm seeing when I redistribute?

The code for setting up the new point SF is here (hope this link works):

https://github.com/waiwera/waiwera/blob/55d26483b3392b70985fb25f998fbda3297c6154/src/mesh.F90#L3408

- Adrian

-- 
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email:a.croucher at auckland.ac.nz
tel: +64 (0)9 923 4611
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20230328/7c67a7dc/attachment.html>


More information about the petsc-dev mailing list