DMPlexVecGetOrientedClosure#
Get an array of the values on the closure of ‘point’ with a given orientation, optionally applying the closure permutation.
Synopsis#
#include "petscdmplex.h"
PetscErrorCode DMPlexVecGetOrientedClosure(DM dm, PetscSection section, PetscBool useClPerm, Vec v, PetscInt point, PetscInt ornt, PetscInt *csize, PetscScalar *values[])
Not collective
Input Parameters#
dm - The
DM
section - The section describing the layout in
v
, orNULL
to use the default sectionuseClPerm - Flag for whether the provided closure permutation should be applied to the values
v - The local vector
point - The point in the
DM
ornt - The orientation of the cell, an integer giving the prescription for cone traversal. Typically, this will be 0.
Input/Output Parameters#
csize - The size of the input values array, or
NULL
; on output the number of values in the closurevalues - An array to use for the values, or *values =
NULL
to have it allocated automatically; if the user providedNULL
, it is a borrowed array and should not be freed, useDMPlexVecRestoreClosure()
to return it
Notes#
DMPlexVecGetOrientedClosure()
/DMPlexVecRestoreClosure()
only allocates the values array if it set to NULL
in the
calling function. This is because DMPlexVecGetOrientedClosure()
is typically called in the inner loop of a Vec
or Mat
assembly function, and a user may already have allocated storage for this operation.
Fortran Notes#
The csize
argument is present in the Fortran binding. Since the Fortran values
array contains its length information this argument may not be needed.
In that case one may pass PETSC_NULL_INTEGER
for csize
.
values
must be declared with
PetscScalar,dimension(:),pointer :: values
and it will be allocated internally by PETSc to hold the values returned
See Also#
DMPlex: Unstructured Grids, DM
, DMPLEX
, DMPlexVecGetClosure()
, DMPlexGetCellCoordinates()
, DMPlexVecRestoreClosure()
, DMPlexVecSetClosure()
Level#
advanced
Location#
Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages