Skip to main content
`Ctrl`+`K`

# DMPlexGeomDataAndGrads

Exposes Control Points and Control Point Weights defining the underlying geometry allowing user manipulation of the geometry.

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexGeomDataAndGrads(DM dm, PetscBool fullGeomGrad) PeNS

Collective

## Input Parameters

- dm - The DM object representing the mesh with PetscContainer containing an EGADS geometry model

- fullGeomGrad - PetscBool flag. Determines how the Surface Area and Volume Gradients wrt to Control Points and Control Point Weights are calculated. PETSC_FALSE :: Surface Area Gradient wrt Control Points and Control Point Weights are calculated using the change in the local FACE changes (not the entire body). Volume Gradients are not calculated. Faster computations. PETSC_TRUE :: Surface Area Gradietn wrt to Control Points and Control Point Weights are calculated using the change observed in the entire solid body. Volume Gradients are calculated. Slower computation due to the need to generate a new solid body geometry for every Control Point and Control Point Weight change.

## Output Parameter

- dm - The updated DM object representing the mesh with PetscContainers containing the Control Point, Control Point Weight and Gradient Data.

## Note

Calculates the DM Point location, surface area and volume gradients wrt to Control Point and Control Point Weights using Finite Difference (small perturbation of Control Point coordinates or Control Point Weight value).

## See Also

`DMPLEX`, `DMCreate()`, `DMPlexCreateGeom()`, `DMPlexModifyEGADSGeomModel()`

## Level

intermediate

## Location

src/dm/impls/plex/plexegads.c

## Examples

src/dm/impls/plex/tutorials/ex19.c
src/dm/impls/plex/tutorials/ex18.c

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