petsc-3.13.6 2020-09-29
Report Typos and Errors

DMPlexGenerateRegister

Adds a grid generator to DMPlex

Synopsis

#include "petscdmplex.h"   
PetscErrorCode  DMPlexGenerateRegister(const char sname[],PetscErrorCode (*fnc)(DM, PetscBool,DM*), PetscErrorCode (*rfnc)(DM, double*,DM*),PetscInt dim)
Not Collective

Input Parameters

name_solver - name of a new user-defined grid generator
fnc - generator function
rfnc - refinement function
dim - dimension of boundary of domain

Notes

DMPlexGenerateRegister() may be called multiple times to add several user-defined solvers.

Sample usage

   DMPlexGenerateRegister("my_generator",MyGeneratorCreate,MyGeneratorRefiner,dim);

Then, your generator can be chosen with the procedural interface via

    DMPlexGenerate(dm,"my_generator",...)
or at runtime via the option
    -dm_plex_generator my_generator

See Also

DMPlexGenerateRegisterAll(), DMPlexGenerate(), DMPlexGenerateRegisterDestroy()

Level

advanced

Location

src/dm/impls/plex/plexgenerate.c
Index of all DMPLEX routines
Table of Contents for all manual pages
Index of all manual pages