[petsc-users] dmda and vec distribution

Jed Brown jedbrown at mcs.anl.gov
Wed Jan 1 13:41:33 CST 2014


Gideon Simpson <gideon.simpson at gmail.com> writes:

> Suppose I have a 1D dmda structure distributed across N processors,
> where there are some number of degrees of freedom (dof) associated
> with each element.  Now, suppose I want to have a vec also distributed
> across the N processors, but distributed "in the same way" as the
> dmda.  That is to say, if I call
>
> DMDAGetCorners(da, &idx_lo, NULL, NULL, &idx_width, NULL, NULL);
>
> idx_lo to idx_lo+ idx_width
>
> are the same indices I'd get if I called
>
> VecGetOwnershipRange(vec, &idx_low, &idx_hi);
>
> Can I do this?  How?

What's wrong with DMCreateGlobalVector()?
-------------- 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/20140101/4a4d6b1a/attachment.pgp>


More information about the petsc-users mailing list