On Wed, 2011-08-31 at 16:23 -0400, Likun Tan wrote: > Hello, > > I have a quick question about DA. When use DAVecGetArray() to set values > to the array and run the program with mpiexec, does DAVecGetArray() > compute in parallel? >
DAVecGetArray() only gives you access to the local portion (plus any ghost nodes) of the global vec. The portion of the data you get is indexed by global numbering, so the indices into the pointer should range from xs --> xs+m where these values are given by DAGetGhostCorners() or DAGetCorners() http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/DA/DAGetGhostCorners.html#DAGetGhostCorners So yes, you should only do the local portion of the calculation to set set the values. Ethan > Thanks in advance, > Likun > > > > -- ------------------------------------ Ethan Coon Post-Doctoral Researcher Applied Mathematics - T-5 Los Alamos National Laboratory 505-665-8289 http://www.ldeo.columbia.edu/~ecoon/ ------------------------------------
