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

PetscSpaceRegister

Adds a new PetscSpace implementation

Synopsis

#include "petscfe.h" 
PetscErrorCode PetscSpaceRegister(const char sname[], PetscErrorCode (*function)(PetscSpace))
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

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

Sample usage

    PetscSpaceRegister("my_space", MyPetscSpaceCreate);
Many br

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

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

Many br

Keywords

PetscSpace, register

See Also

PetscSpaceRegisterAll(), PetscSpaceRegisterDestroy()

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