petsc-3.7.5 2017-01-01
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

Input Parameters

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

Notes

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

Sample usage

    DMRegister("my_da", MyDMCreate);

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

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

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