[petsc-users] A question about ghost cells

leejearl leejearl at 126.com
Fri Oct 28 08:05:06 CDT 2016


Hi, Matt:
     Thank you for your help. It is the answer which I expect.
     But, I have an another equestion. Can I obtain the coordinates of 
the ghost cells:
     Thanks,

leejearl

On 2016年10月28日 19:56, Matthew Knepley wrote:
> On Fri, Oct 28, 2016 at 6:32 AM, leejearl <leejearl at 126.com 
> <mailto: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/a9529276/attachment.html>


More information about the petsc-users mailing list