petsc-3.12.5 2020-03-29
Report Typos and Errors

PetscSectionExtractDofsFromArray

Extracts elements of an array corresponding to DOFs of specified points.

Synopsis

#include "petscsection.h"   
PetscErrorCode PetscSectionExtractDofsFromArray(PetscSection origSection, MPI_Datatype dataType, const void *origArray, IS points, PetscSection *newSection, void *newArray[])
Not collective

Input Parameters

origSection - the PetscSection describing the layout of the array
dataType - MPI_Datatype describing the data type of the array (currently only MPIU_INT, MPIU_SCALAR, MPIU_REAL)
origArray - the array; its size must be equal to the storage size of origSection
points - IS with points to extract; its indices must lie in the chart of origSection

Output Parameters

newSection - the new PetscSection desribing the layout of the new array (with points renumbered 0,1,... but preserving numbers of DOFs)
newArray - the array of the extracted DOFs; its size is the storage size of newSection

See Also

PetscSectionGetChart(), PetscSectionGetDof(), PetscSectionGetStorageSize(), PetscSectionCreate()

Level

developer

Location

src/vec/is/section/interface/section.c
Index of all PetscSection routines
Table of Contents for all manual pages
Index of all manual pages