DMPlexGetGeomGradData#

Gets Point, Surface and Volume Gradients with respect to changes in Control Points and their associated Weights for the Geometry attached to the DMPlex .

Synopsis#

#include "petscdmplex.h"   
PetscErrorCode DMPlexGetGeomGradData(DM dm, PetscHMapI *cpSurfGradHashTable, Mat *cpSurfGrad, PetscInt *cpArraySize, PetscScalar **gradSACP, PetscScalar **gradVolCP, PetscInt *wArraySize, PetscScalar **gradSAW, PetscScalar **gradVolW)

Not collective

Input Parameter#

  • dm - The DMPlex object with an attached PetscContainer storing a CAD Geometry object

Output Parameters#

  • cpSurfGradHashTable - Hash Table Relating the Control Point ID to the the Row in the cpSurfGrad Matrix

  • cpSurfGrad - Matrix containing the Surface Gradient with respect to the Control Point Data. Data is ranged where the Row corresponds to Control Point ID and the Columns are associated with the Geometric FACE.

  • cpArraySize - The size of arrays gradSACP and gradVolCP and is equal to 3 * total number of Control Points in the Geometry

  • gradSACP - Array containing the Surface Area Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.

  • gradVolCP - Array containing the Volume Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.

  • wArraySize - The size of arrayws gradSAW and gradVolW and is equal to the total number of Control Points in the Geometry.

  • gradSAW - Array containing the Surface Area Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.

  • gradVolW - Array containing the Volume Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.

Notes#

Must Call DMPLexGeomDataAndGrads() before calling this function.

gradVolCP and gradVolW are only available when DMPlexGeomDataAndGrads() is called with fullGeomGrad = PETSC_TRUE.

See Also#

DMPlexGeomDataAndGrads

Level#

intermediate

Location#

src/dm/impls/plex/plexegads.c

Examples#

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


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