[petsc-users] A Question about Vec

Ryan Yan vyan2000 at gmail.com
Wed Feb 3 22:58:59 CST 2010

Hi all,
Can someone help me to understand the "Vec"?

My question is: in the following piece of code, will "a" be changed, if "b"
is changed by the subroutine "SNESComputeFunction"? I did see that both a
and b are both pointers to an object.

Vec a = b;
Vec c;

initalize c;
SNESComputeFunction(snes, c, b);

If the answer is yes, then I guess what is modified is actually "*b" in the
above code, is that right?

BTW, I am wondering is there any explicit way that one can compare two
variables in the instance above in PETSc , especially when the content of
the object is rich.

Thanks you very much,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100203/93931dcd/attachment.htm>

More information about the petsc-users mailing list