DMFieldShellSetDestroy — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# DMFieldShellSetDestroy

Register a destroy callback that will be invoked when a `DMFIELDSHELL` is destroyed.

## Synopsis

    #include "petscdmfield.h"
    PetscErrorCode DMFieldShellSetDestroy(DMField field, PetscErrorCode (*destroy)(DMField field))

Logically Collective

## Input Parameters

- field - the `DMField` of type `DMFIELDSHELL`

- destroy - the destroy routine, called before the shell’s own data is freed

## Calling sequence of `destroy`

- field - the `DMField` of type `DMFIELDSHELL` being destroyed

## See Also

`DMField`, `DMFIELDSHELL`, `DMFieldCreateShell()`, `DMFieldDestroy()`

## Level

intermediate

## Location

src/dm/field/impls/shell/dmfieldshell.c

## Examples

src/dm/field/tutorials/ex1.c

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