PetscDSRegister#

Adds a new PetscDS implementation

Synopsis#

#include "petscds.h" 
PetscErrorCode PetscDSRegister(const char sname[], PetscErrorCode (*function)(PetscDS))

Not Collective

Input Parameters#

  • name - The name of a new user-defined creation routine

  • create_func - The creation routine itself

Notes#

PetscDSRegister() may be called multiple times to add several user-defined PetscDSs

Sample usage#

    PetscDSRegister("my_ds", MyPetscDSCreate);

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

or at runtime via the option

    -petscds_type my_ds

Not available from Fortran

See Also#

PetscDSRegisterAll(), PetscDSRegisterDestroy()

Level#

advanced

Location#

src/dm/dt/interface/dtds.c


Edit on GitLab

Index of all DT routines
Table of Contents for all manual pages
Index of all manual pages