[petsc-users] flux vector

Adrian Croucher a.croucher at auckland.ac.nz
Mon Jun 14 18:47:27 CDT 2021


hi Matt,

On 14/06/21 9:54 pm, Matthew Knepley wrote:
> Okay, I think it is not so hard to get what you want in parallel. 
> There are only two kinds of faces with supportSize == 1:
>
>   a) Faces on the global boundary
>
>   b) Faces which are "shared"

I think there is an unfortunate corner case in which faces can be both 
on the global boundary *and* shared.

For example: consider a square 2D mesh which is partitioned down the 
middle, so one process has the left half. With overlap = 1, a row of 
ghost cells will be added along the right-hand edge of this half of the 
mesh. The two faces at top and bottom of this row of ghost cells are on 
the global boundary and also shared.

With your algorithm these would be labelled as flux faces, but they 
shouldn't be (as they are on the global boundary). I can't see a way to 
eliminate those kinds of shared faces - can you?

- Adrian

>
> It is the second set that is somewhat confusing because PetscSF does 
> not have 2-sided information by default. However, it can make it.
> There is a two-step check for "shared":
>
>   1) Is the face in the PetscSF? Here you just check for it in the 
> sorted "locals" array from PetscSFGetGraph()
>
>   2) Is the face ghosted on another process? You can get this from 
> PetscSFGetRootRanks().
>
> I just wrote a small function to check for "shared" points. After 
> that, I think you can just run
>
>   1) After distribution, loop overall faces on current process
>
>      If face on open boundary, label face as flux face
>
>      else:
>
>        if face has supportSize != 1 or (supportSize == 1 && shared), 
> label face as flux face
>
>   Thanks,
>
>      Matt
>
-- 
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/20210615/99d8b549/attachment.html>


More information about the petsc-users mailing list