[petsc-dev] Need mechanism to set LocalToGlobal mapping in a DMShell

Jed Brown jedbrown at mcs.anl.gov
Thu Feb 21 12:58:15 CST 2013


On Thu, Feb 21, 2013 at 12:48 PM, Peter Brune <prbrune at gmail.com> wrote:

> Jed, I disagree; It's quite natural to want custom bindings for these
> things if you want some new mesh type to have local-to-global and
> global-to-local operations over that mesh.  Having it abstracted out to the
> matrix or vector is constraining.
>
> They should totally be in there and should be implementation-level in
> DMShell.
>

There is a member dm->ltogmap that these access, not a member of DM_Shell.
I'm saying that almost nobody uses those at present. Yes, they should be
implemented for symmetry, but it is unlikely to be necessary for Rich to
have some capability _now_. I foresee more solvers using it in the future,
and it's cleaner to get it from the DM than from the Vecs, so I agree that
it should be set.

The scatter DMGlobalToLocalBegin/End is a different matter. It is currently
never called by the solvers directly, but it may be convenient for Rich's
code to call the same function for DMShell and others. This should perhaps
be called DMShellSetGlobalToLocal(DM dm,PetscErrorCode
(*begin)(DM,Vec,InsertMode,Vec),PetscErrorCode
(*end)(DM,Vec,InsertMode,Vec));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130221/b27b401e/attachment.html>


More information about the petsc-dev mailing list