petsc-3.7.1 2016-05-15
Report Typos and Errors

DMRegister

Adds a new DM component implementation

Synopsis

#include "petscdm.h"          
#include "petscdmlabel.h"     
PetscErrorCode  DMRegister(const char sname[],PetscErrorCode (*function)(DM))
Not Collective Many br

Input Parameters

name - The name of a new user-defined creation routine Many br
create_func - The creation routine itself Many br

Notes

DMRegister() may be called multiple times to add several user-defined DMs Many br

Sample usage

    DMRegister("my_da", MyDMCreate);
Many br

Then, your DM type can be chosen with the procedural interface via Many br

    DMCreate(MPI_Comm, DM *);
    DMSetType(DM,"my_da");
Many bror at runtime via the option Many br
    -da_type my_da
Many br

Many br

Keywords

DM, register

See Also

DMRegisterAll(), DMRegisterDestroy()

Level:advanced
Location:
src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages