[petsc-users] DMDA and vector PDE
Alexander Grayver
agrayver at gfz-potsdam.de
Tue Nov 1 11:06:09 CDT 2011
On 01.11.2011 16:14, Jed Brown wrote:
> On Tue, Nov 1, 2011 at 09:08, Alexander Grayver
> <agrayver at gfz-potsdam.de <mailto:agrayver at gfz-potsdam.de>> wrote:
>
> I solve 3D vector PDE using FD, so my solution vector b has size
> 3N, where N stands for total number of grid cells.
> Each part of b contains solution for corresponding dimension, i.e.
> fx = b(1:N), fy = b(N+1:2N), fz = b(2N+1:3*N).
>
>
> You set the number of degrees of freedom per node to 3. Then these
> vectors are interlaced in b.
Thanks Jed, looks easy. I've read about this parameter in documentation,
but it wasn't obvious how to use it.
May be it's worth to mention it shortly in "2.4.4 Accessing the Vector
Entries for DMDA Vectors" or somewhere else.
How then can I ensure correct ordering between my system matrix and
vectors in case of dof > 1?
Can I say that dof_i always corresponds to g((i-1)*N+1:i*N) in global DM
vector?
Regards,
Alexander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111101/0fb8b983/attachment.htm>
More information about the petsc-users
mailing list