VecGetArray and VecCreateGhostWithArray
Chris Kees
Christopher.E.Kees at usace.army.mil
Tue Sep 9 22:34:44 CDT 2008
In going from 2.3.3-p12 to petsc-dev, I'm getting a change in behavior that
I don't understand. With 2.3.3 I could allocate a local ghosted array, build
a Vec with it, and then be sure of getting the exact same array from
GetArray. Now I have to use PlaceArray to get that behavior. For example I
now have to include the commented line below or the assertion fails:
VecCreateGhostWithArray(PETSC_COMM_WORLD,n,N,nghost,&ghosts[0],array,&v);
//VecPlaceArray(v,array);
VecGetArray(v,&varray);
assert(varray==array);
Does this mean VecCreateGhostWithArray is allocating it's own memory? This
is on mac osx 10.5 built as i386. The code works fine using VecPlaceArray so
it's not that big of a deal.
Chris
More information about the petsc-dev
mailing list