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
PetscMapGetBlockSize VecDot VecScatterCreateToZero
PetscMapGetGlobalRange VecDuplicateVecs VecScatterDestroy
PetscMapGetLocalRange VecEqual VecScatterEnd
PetscMapGetLocalSize VecGetArrays VecScatterView
PetscMapGetSize VecGetType VecSetLocalToGlobalMapping
PetscMapInitialize VecLoad VecSetLocalToGlobalMappingBlock
PetscMapSetBlockSize VecLoadIntoVector VecSetOption
PetscMapSetLocalSize VecMAXPY VecSetRandom
PetscMapSetSize VecMDot VecSetSizes
VecAXPBY VecMTDot VecSetType
VecAXPY VecMax VecSetValuesBlocked
VecAYPX VecMin VecSetValuesBlockedLocal
VecAbs VecNorm VecSetValuesLocal
VecConjugate VecNormalize VecShift
VecContourScale VecReciprocal VecStashSetInitialSize
VecCreateMPI VecRestoreArrays VecTDot
VecCreateMPIWithArray VecScale VecViewFromOptions
VecCreateSeq VecScatterBegin VecWAXPY
VecCreateSeqWithArray VecScatterCreate
VecDestroyVecs VecScatterCreateToAll
Advanced - Setting more advanced options and customization
VecAppendOptionsPrefix VecMaxPointwiseDivide VecStrideGather
VecCreateGhost VecNormBegin VecStrideGatherAll
VecCreateGhostBlock VecNormEnd VecStrideMax
VecCreateGhostBlockWithArray VecPointwiseDivide VecStrideMaxAll
VecCreateGhostWithArray VecPointwiseMax VecStrideMin
VecCreateShared VecPointwiseMaxAbs VecStrideMinAll
VecDotBegin VecPointwiseMin VecStrideNorm
VecDotEnd VecPointwiseMult VecStrideNormAll
VecGetBlockSize VecRegister VecStrideScale
VecGetOptionsPrefix VecRegisterAll VecStrideScaleAll
VecGhostGetLocalForm VecRegisterDestroy VecStrideScatter
VecGhostRestoreLocalForm VecRegisterDynamic VecStrideScatterAll
VecGhostUpdateBegin VecScatterCopy VecSwap
VecGhostUpdateEnd VecSetBlockSize VecTDotBegin
VecMDotBegin VecSetOptionsPrefix VecTDotEnd
VecMDotEnd VecSetUp Vecs
VecMTDotBegin VecStashGetInfo
VecMTDotEnd VecStashView
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
No deprecated routines

Table of Contents