[petsc-dev] DMDA_*PERIODIC and DMDA_XYZGHOSTED

Jed Brown jed at 59A2.org
Tue Dec 7 15:16:35 CST 2010


On Tue, Dec 7, 2010 at 21:52, Barry Smith <bsmith at mcs.anl.gov> wrote:

> I like this model for its consistency. The "default" DM is currently
> essentially PetscLayout. But have resisted making the model public because
> it is yet one more object class people need to learn about to do anything,
> forcing people to know about DM (or PetscLayout) before they can create a
> vector. Plus all Vecs have a PetscLayout (hidden) even if they also have a
> more sophisticated DM as well, I don't like that because I think it can be
> confusing to people that sometimes there are two "DMS".
>

I think, but could be terribly wrong, that the "flat" DM could be hidden.
 In the default case, it's just a dispatch mechanism that the user wouldn't
need to know about (I don't believe in explicitly passing a DM everywhere a
Vec goes).  They could only possibly need the dispatch flexibility if they
were already using DM, in which case they could use the more flexible
DMVecView if they wanted to view it relative to a DM other than the embedded
one.


>  IS, Vec, Mat, KSP (SNES and TS)  --> IS, DM, Vec, Mat, KSP. Yes it is just
> one more object but difficulty of use grows exponentially with number of
> object types.
>

Yeah, not a change to take lightly, but still worth considering, I think.
DM currently serves several purposes, on different levels of the hierarchy.

1. It specifies an "overlap" in Dmitry/Matt language.  That is, it defines
"local" spaces.
2a. It defines a function space for things like viewing and interpolation.
2b. It can coarsen and refine (so it knows about a continuum space that it
is a subspace of).
3. It helps the user build residuals and preallocate matrices.

I have separated 3 from 2a because this API is only for the user (not other
components of PETSc).  Most of 3 is specialized on the type of DM.

Jed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20101207/d96b3c3f/attachment.html>


More information about the petsc-dev mailing list