[petsc-users] A question about ghost cells

Matthew Knepley knepley at gmail.com
Fri Oct 28 06:56:12 CDT 2016


On Fri, Oct 28, 2016 at 6:32 AM, leejearl <leejearl at 126.com> wrote:

> Hi, everyone:
>
>     I have a distributed DMPlex representing a 2D finite volume mesh. I
> distributed it using the function "DMPlexDistribute()".
>
> Then, I constructed the ghost cells using "DMPlexConstructGhostCells()".
>
>    The question is that I want to determine which cell is ghosted. I
> obtained all the cells using "DMPlexGetHeightStratum()", and
>
> how can I kown which cell is ghosted?
>

1) The ghost cells are marked as "hybrid", so you can call

  ierr  = DMPlexGetHybridBounds(dm, &cEndInterior, NULL, NULL,
NULL);CHKERRQ(ierr);
  ierr  = DMPlexGetHeightStratum(dm, 0, NULL, &cEnd);CHKERRQ(ierr);

and then the ghost cells are [cEndInterior, cEnd).

2) There is also a label "ghost" which marks the ghost faces, and ghost
cells which are non-local

  Thanks,

    Matt


>    Thanks, all the helps are appreciated.
>
>
> leejearl
>
>
>
>


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


More information about the petsc-users mailing list