#include "petscfe.h" PetscErrorCode PetscSpaceRegister(const char sname[], PetscErrorCode (*function)(PetscSpace))Not Collective
name | - The name of a new user-defined creation routine | |
create_func | - The creation routine itself |
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