Skip to main content
`Ctrl`+`K`

# DMGeomModelRegister

Adds a geometry model to `DM`

## Synopsis

    #include "petscdm.h"
    PetscErrorCode DMGeomModelRegister(const char sname[], PetscErrorCode (*fnc)(DM, PetscInt, PetscInt, const PetscScalar[], PetscScalar[]))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of a new user-defined geometry model

- fnc - geometry model function

## Example Usage

       DMGeomModelRegister("my_geom_model", MySnapToGeomModel);

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

      DMSetGeomModel(dm, "my_geom_model",...)

or at runtime via the option

      -dm_geom_model my_geom_model

## Note

`DMGeomModelRegister()` may be called multiple times to add several user-defined generators

## See Also

`DM`, `DMGeomModelRegisterAll()`, `DMPlexGeomModel()`, `DMGeomModelRegisterDestroy()`

## Level

advanced

## Location

src/dm/interface/dmgeommodel.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages