[petsc-users] Vector with ghost values using DMDA
Jed Brown
jed at jedbrown.org
Wed Oct 5 09:28:21 CDT 2016
Praveen C <cpraveen at gmail.com> writes:
> So I have to create a global vector AND a local vector using
> DMCreateLocalVector.
>
> Then I do DMGlobalToLocalBegin/End. Does this not lead to too much copying
> ?
It's typically more efficient -- the solver gets to work with contiguous
vectors and doesn't have unused "ghost" storage in every vector of a
Krylov space, for example.
> I see there is VecCreateGhost but no such thing for DMDA ?
That would necessitate non-contiguous indexing which would kill
performance. Also note that the ghost points in a VecGhost would exist
but be unused in every vector of a Krylov space, every stage of a
Runge-Kutta method, etc. Much better to have one or two local vectors
that you use while evaluating residuals.
> PS: Would be nice if the reply-to was set to mailing list. I frequently
> forget to do Reply All.
Then make reply-all your default instead of asking to break (individual)
reply for everyone else.
http://www.unicom.com/pw/reply-to-harmful.html
http://woozle.org/~neale/papers/reply-to-still-harmful.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161005/986707a1/attachment.pgp>
More information about the petsc-users
mailing list