[petsc-dev] I question the existence of PetscErrorCode (*createlocaltoglobalmapping)(DM); PetscErrorCode (*createlocaltoglobalmappingblock)(DM);

Jed Brown jedbrown at mcs.anl.gov
Wed Mar 20 08:45:54 CDT 2013


On Wed, Mar 20, 2013 at 8:32 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

> I question the existence of   PetscErrorCode
> (*createlocaltoglobalmapping)(DM);   PetscErrorCode
> (*createlocaltoglobalmappingblock)(DM);
>
> 1) They have no public interface function
>

The local-to-global mapping is a significant amount of memory when using
explicit methods or matrix-free multigrid, so these ops allow the mapping
to be constructed lazily. Some DMs build the mapping eagerly and thus don't
implement the callback. The public API is DMGetLocalToGlobalMapping().


> 2) They only exist for a couple of DM types
>
> Shouldn't they just be private functions for those types? Why do they go
> in the function table?
>

DMGetLocalToGlobalMapping() is called generically by
DMCreateMatrix_Composite and perhaps by users rolling their own composite
spaces.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130320/6b1dec1e/attachment.html>


More information about the petsc-dev mailing list