[petsc-users] flux vector

Mark Adams mfadams at lbl.gov
Fri Jun 11 05:29:55 CDT 2021


This is a Matt question, but You can set a "Boundary" label (
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMPLEX/DMPlexMarkBoundaryFaces.html)
and that will label boundaries.
Next you want the dual of that ...

On Fri, Jun 11, 2021 at 12:44 AM Adrian Croucher <a.croucher at auckland.ac.nz>
wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210611/49b047d6/attachment.html>


More information about the petsc-users mailing list