Vectors: Examples

PETSc vectors (Vec objects) are used to store the field variables in PDE-based (or other) simulations.

Beginner - Basic usage
NORM_1 VecDestroy VecRestoreArray2d
NORM_1_AND_2 VecDestroyVecsF90 VecRestoreArray3d
NORM_2 VecDuplicate VecRestoreArrayF90
NORM_FROBENIUS VecDuplicateVecsF90 VecScatter
NORM_INFINITY VecGetArray VecSet
NORM_MAX VecGetArray1d VecSetFromOptions
NormType VecGetArray2d VecSetValue
PetscMapCreate VecGetArray3d VecSetValueLocal
VECMPI VecGetArrayF90 VecSetValues
VECSEQ VecGetLocalSize VecSqrt
Vec VecGetOwnershipRange VecSum
VecAssemblyBegin VecGetSize VecType
VecAssemblyEnd VecPermute VecView
VecCopy VecRestoreArray
VecCreate VecRestoreArray1d
Intermediate - Setting options for algorithms and data structures
PetscMapGetType VecGetArrays VecScatterCreateToZero
PetscMapPrintHelp VecGetType VecScatterDestroy
PetscMapSetFromOptions VecLoad VecScatterEnd
PetscMapSetType VecLoadIntoVector VecScatterView
VecAXPBY VecMAXPY VecSetLocalToGlobalMapping
VecAXPY VecMDot VecSetLocalToGlobalMappingBlock
VecAYPX VecMTDot VecSetOption
VecAbs VecMax VecSetRandom
VecConjugate VecMin VecSetSizes
VecContourScale VecNorm VecSetType
VecCreateMPI VecNormalize VecSetValuesBlocked
VecCreateMPIWithArray VecPrintHelp VecSetValuesBlockedLocal
VecCreateSeq VecReciprocal VecSetValuesLocal
VecCreateSeqWithArray VecRestoreArrays VecShift
VecDestroyVecs VecScale VecStashSetInitialSize
VecDot VecScatterBegin VecTDot
VecDuplicateVecs VecScatterCreate VecViewFromOptions
VecEqual VecScatterCreateToAll VecWAXPY
Advanced - Setting more advanced options and customization
PetscMap VecMaxPointwiseDivide VecStrideMax
PetscMapRegisterAll VecNormBegin VecStrideMaxAll
PetscMapRegisterDestroy VecNormEnd VecStrideMin
PetscMapRegisterDynamic VecPointwiseDivide VecStrideMinAll
VecCreateGhost VecPointwiseMult VecStrideNorm
VecCreateGhostBlock VecRegister VecStrideNormAll
VecCreateGhostBlockWithArray VecRegisterAll VecStrideScale
VecCreateGhostWithArray VecRegisterDestroy VecStrideScaleAll
VecCreateShared VecRegisterDynamic VecStrideScatter
VecDotBegin VecScatterCopy VecStrideScatterAll
VecDotEnd VecScatterPostRecvs VecSwap
VecGetBlockSize VecSetBlockSize VecTDotBegin
VecGhostGetLocalForm VecStashGetInfo VecTDotEnd
VecGhostRestoreLocalForm VecStashView Vecs
VecGhostUpdateBegin VecStrideGather
VecGhostUpdateEnd VecStrideGatherAll
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
PetscMapCreateMPI PetscMapGetSize VecPlaceArray
PetscMapDestroy PetscMapSetLocalSize VecReplaceArray
PetscMapGetGlobalRange PetscMapSetSize VecResetArray
PetscMapGetLocalRange VecGetPetscMap VecScatterRemap
PetscMapGetLocalSize VecInitializePackage VecValid

Table of Contents