[petsc-users] (no subject)

Barry Smith bsmith at mcs.anl.gov
Thu Dec 27 08:18:19 CST 2012


  ierr = DMDACreateNaturalVector(da,&natural);CHKERRQ(ierr);
    ierr = DMDAGlobalToNaturalBegin(da,xin,INSERT_VALUES,natural);CHKERRQ(ierr);
    ierr = DMDAGlobalToNaturalEnd(da,xin,INSERT_VALUES,natural);CHKERRQ(ierr);

Now do VecScatterCreateToZero() from natural and the vector will be in the natural ordering on process zero with the dof interlaced.


   Barry

On Dec 27, 2012, at 12:22 AM, amlan barua <abarua at iit.edu> wrote:

> Hi,
> Is there an analogue of VecScatterCreateToZero for DA vectors? The DMDA object has more than one degrees of freedom.
> If there isn't any, should I use an IS object to do the scattering?
> Amlan



More information about the petsc-users mailing list