[petsc-users] flux vector
Adrian Croucher
a.croucher at auckland.ac.nz
Thu Jun 10 23:44:02 CDT 2021
hi
I have a DMPlex in a finite volume simulation and I want to create a Vec
containing flux data only on the mesh faces where fluxes are computed
(e.g. not on closed boundaries). Basically these are all the faces with
support size 2 (aside from some complications related to boundary
conditions).
To do this I clone the DM using DMClone() and create a section on it
with DMPlexCreateSection(), passing in a label which has value 1 on all
the required faces. The problem then consists of labelling the
appropriate faces.
The tricky part is that when a face exists on more than one process, you
have to make sure it has the same label value on all processes,
otherwise an error results when you try and create a global vector on
the DM. Because I distribute the DMPlex with overlap = 1, a face can
have different support sizes on different processes.
So on each process, I need to label a face if it has support size 2 on
*any* process.
Would it be possible to use PetscSFBcast and the point SF from
DMGetPointSF() to somehow broadcast the support sizes? Or is there a
simpler way?
- 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
More information about the petsc-users
mailing list