DMPlexGetGeomBodyMassProperties — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# DMPlexGetGeomBodyMassProperties

Returns the Volume, Surface Area, Center of Gravity, and Inertia about the Body’s Center of Gravity

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexGetGeomBodyMassProperties(DM dm, PetscGeom body, PetscScalar *volume, PetscScalar *surfArea, PetscScalar **centerOfGravity, PetscInt *COGsize, PetscScalar **inertiaMatrixCOG, PetscInt *IMCOGsize) PeNS

Not collective

## Input Parameters

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

- body - PetscGeom BODY object

## Output Parameters

- volume - Volume of the CAD Body attached to the DM Plex

- surfArea - Surface Area of the CAD Body attached to the DM Plex

- centerOfGravity - Array with the Center of Gravity coordinates of the CAD Body attached to the DM Plex [x, y, z]

- COGszie - Size of centerOfGravity[] Array

- inertiaMatrixCOG - Array containing the Inertia about the Body’s Center of Gravity [Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz]

- IMCOGsize - Size of inertiaMatrixCOG[] Array

## See Also

## 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