petsc-3.11.4 2019-09-28
Report Typos and Errors


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


#include "petscvec.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()




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