[petsc-users] Question on DMMGSetSNESLocal from snes/example/tutorials/ex19.c
Jed Brown
jed at jedbrown.org
Sat May 31 12:52:06 CDT 2014
"Sun, Hui" <hus003 at ucsd.edu> writes:
> Continue this topic. Right now I'm looking at ex19.c from PETSc v3.3
> and v3.4, both containing a user defined function NonlinearGS(SNES,
> Vec, Vec, void*), I'm wondering why the arguments are not passed by
> reference or pointers?
All PETSc objects (like SNES, Vec, etc.) are pointers to private
structures.
typedef struct _p_Vec *Vec;
You cannot dereference the pointer because the implementation is
private, but it is passed around as a pointer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140531/aeb91d25/attachment.pgp>
More information about the petsc-users
mailing list