[petsc-dev] Ghost values in sieve
Matthew Knepley
knepley at gmail.com
Fri Aug 17 14:24:31 CDT 2012
On Fri, Aug 17, 2012 at 1:21 PM, Chris Eldred <chris.eldred at gmail.com>wrote:
> I was wondering how ghost values were handled when creating a
> distributed (global) vector from a specific PetscSection over a
> DMComplex object- ie what defines the stencils used to figure out
> which values need to be ghosted? What about local vs. global indexes?
This answer will have to be long because the question is mixing levels in
the interface.
A PetscSection is only an offset structure, so it has no designated fields
for overlap information. What I do for DM is to create 2 sections: one
describing the layout of the local vector, and one describing the global
vector and ghosts. The global section can be created automatically given
the local section and a PetscSF (successor to VecScatter).
The PetscSF describes the parallel overlap, and also has scatters and
reductions.
This is created by the DMComplex instead of a scatter since it can handle
arbitrary types, and has a better query interface. DMComplex creates a
(non-overlapping) partition of some stratum of points, usually cells for
FEM.
Then the closure(p) U star(p) for each point is added to that partition, and
the dofs on any shared point are ghosted.
This is all now done using the vanilla DM interface, so DMGlobalToLocal()
and LocalToGlobal() and cousins work as normal.
Does that make sense?
Matt
>
> -Chris
>
> --
> Chris Eldred
> DOE Computational Science Graduate Fellow
> Graduate Student, Atmospheric Science, Colorado State University
> B.S. Applied Computational Physics, Carnegie Mellon University, 2009
> chris.eldred at gmail.com
>
--
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-dev/attachments/20120817/398aa50a/attachment.html>
More information about the petsc-dev
mailing list