[Trilinos-Users] Handling of ghosts in distributed vectors

Bart Janssens bart.janssens at lid.kviv.be
Fri Apr 19 15:36:51 MDT 2013

On Fri, Apr 19, 2013 at 8:36 PM, Hoemmen, Mark <mhoemme at sandia.gov> wrote:

> If you want to handle storing ghost nodes in the Vectors yourself, but
> want to let Epetra handle communication of ghost nodes, here is what you do.
> 1. Begin by creating Vectors with the CrsMatrix's column Map.
> 2. Give "domain Map views" of these column Map Vectors to the Apply()
> method.

We actually only need the ghosts for information exchange with the mesh
structure, so in the mean time I worked around the problem in a different
way: instead of directly using an Epetra_Vector for storage, it is now a
view constructed over an std::vector. The Epetra_Vector has the correct
domain map (no ghosts), but the data vector does contain the ghosts at the
end, invisible to the Epetra_Vector. This allows us to retain our
implementation with minimal changes and still use Epetra/Thyra without
issues. The code is at
case anyone wants to see the details.

> Please let us know if you have any further questions.

Thank you very much for your very extensive and clear answer! I do have one
more question about converting to Thyra:
The docs for Thyra::create_Vector [1]  state that a copy is created, but
looking at the code and running some tests suggests this is not the case,
and it is just a view. The docs also mention that modifications are not
guaranteed to propagate until the Thyra copy is destroyed, but this also
appears to be unnecessary.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130419/9ee4ecce/attachment.html 

More information about the Trilinos-Users mailing list