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 VecRestoreArrayF90
NORM_1_AND_2 VecDestroyVecsF90 VecScatter
NORM_2 VecDuplicate VecSet
NORM_FROBENIUS VecDuplicateVecsF90 VecSetFromOptions
NORM_INFINITY VecGetArray VecSetValue
NORM_MAX VecGetArray4d VecSetValueLocal
NormType VecGetArrayF90 VecSetValues
VECMPI VecGetLocalSize VecSqrt
VECSEQ VecGetOwnershipRange VecSum
Vec VecGetSize VecType
VecAssemblyBegin VecGetValues VecView
VecAssemblyEnd VecPermute VecZeroEntries
VecCopy VecRestoreArray
VecCreate VecRestoreArray4d
Intermediate - Setting options for algorithms and data structures
VecAXPBY VecLoadIntoVector VecScatterEnd
VecAXPY VecMAXPY VecScatterView
VecAYPX VecMDot VecSetLocalToGlobalMapping
VecAbs VecMTDot VecSetLocalToGlobalMappingBlock
VecConjugate VecMax VecSetOption
VecContourScale VecMin VecSetRandom
VecCreateMPI VecNorm VecSetSizes
VecCreateMPIWithArray VecNormalize VecSetType
VecCreateSeq VecPrintHelp VecSetValuesBlocked
VecCreateSeqWithArray VecReciprocal VecSetValuesBlockedLocal
VecDestroyVecs VecRestoreArrays VecSetValuesLocal
VecDot VecScale VecShift
VecDuplicateVecs VecScatterBegin VecStashSetInitialSize
VecEqual VecScatterCreate VecTDot
VecGetArrays VecScatterCreateToAll VecViewFromOptions
VecGetType VecScatterCreateToZero VecWAXPY
VecLoad VecScatterDestroy
Advanced - Setting more advanced options and customization
VecAppendOptionsPrefix VecMaxPointwiseDivide VecStashView
VecCreateGhost VecNormBegin VecStrideGather
VecCreateGhostBlock VecNormEnd VecStrideGatherAll
VecCreateGhostBlockWithArray VecPointwiseDivide VecStrideMax
VecCreateGhostWithArray VecPointwiseMax VecStrideMaxAll
VecCreateShared VecPointwiseMaxAbs VecStrideMin
VecDotBegin VecPointwiseMin VecStrideMinAll
VecDotEnd VecPointwiseMult VecStrideNorm
VecGetBlockSize VecRegister VecStrideNormAll
VecGetOptionsPrefix VecRegisterAll VecStrideScale
VecGhostGetLocalForm VecRegisterDestroy VecStrideScaleAll
VecGhostRestoreLocalForm VecRegisterDynamic VecStrideScatter
VecGhostUpdateBegin VecScatterCopy VecStrideScatterAll
VecGhostUpdateEnd VecScatterPostRecvs VecSwap
VecMDotBegin VecSetBlockSize VecTDotBegin
VecMDotEnd VecSetOptionsPrefix VecTDotEnd
VecMTDotBegin VecSetUp Vecs
VecMTDotEnd VecStashGetInfo
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
VecGetArray1d VecReplaceArray VecScatterGetMerged
VecGetArray2d VecResetArray VecScatterRemap
VecGetArray3d VecRestoreArray1d VecValid
VecInitializePackage VecRestoreArray2d
VecPlaceArray VecRestoreArray3d

Table of Contents