DMPlexComputeCellGeometryFVM#

Compute the volume for a given cell

Synopsis#

#include "petscdmplex.h"   
#include "petscfe.h"       
PetscErrorCode DMPlexComputeCellGeometryFVM(DM dm, PetscInt cell, PetscReal *vol, PetscReal centroid[], PetscReal normal[])

Not Collective

Input Parameters#

  • dm - the DMPLEX

  • cell - the cell

Output Parameters#

  • vol - the cell volume

  • centroid - the cell centroid

  • normal - the cell normal, if appropriate

Note#

Local coordinates must be available before calling this routine in a noncollective loop. If needed, call DMGetCoordinatesLocalSetUp() and, when using cellwise coordinates, DMGetCellCoordinatesLocalSetUp() collectively beforehand.

See Also#

DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()

Level#

advanced

Location#

src/dm/impls/plex/plexgeometry.c

Examples#

src/dm/impls/plex/tutorials/ex10.c
src/dm/impls/plex/tutorials/ex17.c
src/dm/impls/plex/tutorials/ex18.c
src/dm/impls/plex/tutorials/ex19.c
src/dm/impls/plex/tutorials/ex3f90.F90
src/dm/impls/plex/tests/ex16.c
src/dm/impls/plex/tests/ex17.c
src/dm/impls/plex/tests/ex32.c
src/dm/impls/plex/tests/ex37.c
src/dm/impls/plex/tests/ex60.c


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