petsc-3.8.4 2018-03-24
Report Typos and Errors

PetscSpaceRegister

Adds a new PetscSpace implementation

Synopsis

#include "petscfe.h" 
PetscErrorCode PetscSpaceRegister(const char sname[], PetscErrorCode (*function)(PetscSpace))
Not Collective

Input Parameters

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

Notes

PetscSpaceRegister() may be called multiple times to add several user-defined PetscSpaces

Sample usage

    PetscSpaceRegister("my_space", MyPetscSpaceCreate);

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

    PetscSpaceCreate(MPI_Comm, PetscSpace *);
    PetscSpaceSetType(PetscSpace, "my_space");
or at runtime via the option
    -petscspace_type my_space

Keywords

PetscSpace, register

See Also

PetscSpaceRegisterAll(), PetscSpaceRegisterDestroy()

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