[petsc-users] DMDA questions

Xiangdong epscodes at gmail.com
Tue Feb 25 10:12:02 CST 2014

Hello PETSc team,

I have a few quick questions about the DMDA:

1) The ordering. The global vector is using natural ordering and the local
vector is using petsc ordering. In other words, if I create a DM with width
0 (no ghost layers), the local portion of global vector and the local
vector are still different. I tested and it seems ture, just want to

2) DOF. In each cell, I have two unknowns, say ux and uy. One way is to
store them using one global vector with dof=2. The other way is to create
two global vectors for each ux and uy with dof=1. Is one approach better
than the other?

3) Matrix compatibility. When I specify the entries of my sparse matrix by
looping each row from ns to ne (obtained from MatGetOwnershipRange), the
local portion of global vector also has the range from ns to ne. However,
the local vector on that processor may have different ranges (or different
portion) due to ordering. If the entries depends on the portion from ns to
ne + its ghost  points, what is the best way to do it?

4) Name convention. Some function are names as DMXX, while others have
DMDAXX. Why do they have different prefix?

Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140225/20ddd9f5/attachment-0001.html>

More information about the petsc-users mailing list