[petsc-users] DMPlex ghost cells

Adrian Croucher a.croucher at auckland.ac.nz
Thu Aug 3 22:52:04 CDT 2017


Would it also work if I just didn't use DMPlexGetHybridBounds() to 
differentiate between partition ghost cells and boundary ghost cells, 
but instead checked the value of the "ghost" DMLabel?

It appears that DMPlexConstructGhostCells() labels boundary ghosts with 
the ghost label value 1, and partition ghosts with value 2 (in 
DMPlexShiftLabels_Internal()).

If that is reliable, then it might save me having to make sure the 
boundary ghosts always come last.

- Adrian


On 04/08/17 15:11, Matthew Knepley wrote:
> On Thu, Aug 3, 2017 at 10:07 PM, Adrian Croucher 
> <a.croucher at auckland.ac.nz <mailto:a.croucher at auckland.ac.nz>> wrote:
>
>     I am adding cells onto a DMPlex (for dual porosity). I notice that
>     normally the ghost cells in a DMPlex are at the end of the cell list.
>
>     Does it matter if the cells I add come after those ghost cells, or
>     should the ghosts always come last?
>
>     It seems to me it probably shoudn't matter if the partition ghosts
>     (created by DMPlexDistribute()) are not at the end. In my cell
>     loops I just check the value of the ghost DMLabel and skip them if
>     necessary.
>
>     But perhaps the boundary ghosts (created by
>     DMPlexConstructGhostCells()) need to come last? Otherwise the
>     output from DMPlexGetHybridBounds() (to get the bounds on
>     'interior' cells, i.e. non-boundary-ghosts) probably wouldn't make
>     much sense?
>
>
> Yes, the only reason to have them last is to have GetHybridBounds() 
> work for that case.
>
>   Thanks,
>
>      Matt
>
>
>     - Adrian
>
>     -- 
>     Dr Adrian Croucher
>     Senior Research Fellow
>     Department of Engineering Science
>     University of Auckland, New Zealand
>     email: a.croucher at auckland.ac.nz <mailto:a.croucher at auckland.ac.nz>
>     tel: +64 (0)9 923 4611 <tel:%2B64%20%280%299%20923%204611>
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their 
> experiments is infinitely more interesting than any results to which 
> their experiments lead.
> -- Norbert Wiener
>
> http://www.caam.rice.edu/~mk51/ <http://www.caam.rice.edu/%7Emk51/>

-- 
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/20170804/08f1ea4f/attachment.html>


More information about the petsc-users mailing list