[petsc-users] DMCreateGlobalVector and DMGetGlobalVector

Jed Brown jed at jedbrown.org
Wed Feb 4 01:16:58 CST 2015


bichinhoverde <bichinhoverde at spwinternet.com.br> writes:

> Hi. I have some questions.
>
> What is the difference between DMCreateGlobalVector and DMGetGlobalVector
> (and the local counterparts)?

Create creates a vector that the caller owns.  Get merely gets access to
a vector from a managed pool (creating it if necessary), to be returned
via DMRestoreGlobalVector().

> What happens when one calls SNESSolve with NULL for the solution vector, as
> in src/snes/examples/tutorials/ex7.c:158? SNESSolve(snes,NULL,NULL);

A vector is created automatically.  You can get access to it with
SNESGetSolution.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150204/de1ed3a5/attachment.pgp>


More information about the petsc-users mailing list