#include "petscdmplex.h" PetscErrorCode DMPlexGenerateRegister(const char sname[],PetscErrorCode (*fnc)(DM, PetscBool,DM*), PetscErrorCode (*rfnc)(DM, double*,DM*),PetscInt dim)Not Collective
name_solver | - name of a new user-defined solver | |
fnc | - generator function | |
rfnc | - refinement function | |
dim | - dimension of boundary of domain |
DMPlexGenerateRegister("my_generator",MyGeneratorCreate);
Then, your generator can be chosen with the procedural interface via
DMPlexGenerateSetType(ksp,"my_generator")or at runtime via the option
-dmplex_generate_type my_generator