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 VecRestoreArray4d
NORM_1_AND_2 VecDestroyVecsF90 VecRestoreArrayF90
NORM_2 VecDuplicate VecScatter
NORM_FROBENIUS VecDuplicateVecsF90 VecSet
NORM_INFINITY VecGetArray VecSetFromOptions
NORM_MAX VecGetArray4d VecSetValue
NormType VecGetArrayF90 VecSetValueLocal
VECMPI VecGetLocalSize VecSetValues
VECSEQ VecGetOwnershipRange VecSqrt
Vec VecGetOwnershipRanges VecSum
VecAssemblyBegin VecGetSize VecType
VecAssemblyEnd VecGetValues VecView
VecCopy VecPermute VecZeroEntries
VecCreate VecRestoreArray
Intermediate - Setting options for algorithms and data structures
PetscMapGetBlockSize VecDestroyVecs VecScatterCreateLocal
PetscMapGetGlobalRange VecDot VecScatterCreateToAll
PetscMapGetLocalRange VecDuplicateVecs VecScatterCreateToZero
PetscMapGetLocalSize VecEqual VecScatterDestroy
PetscMapGetSize VecGetArrays VecScatterEnd
PetscMapInitialize VecGetType VecScatterView
PetscMapSetBlockSize VecLoad VecSetLocalToGlobalMapping
PetscMapSetLocalSize VecLoadIntoVector VecSetLocalToGlobalMappingBlock
PetscMapSetSize VecMAXPY VecSetOption
PetscMapSetUp VecMDot VecSetRandom
VecAXPBY VecMTDot VecSetSizes
VecAXPY VecMax VecSetType
VecAYPX VecMin VecSetValuesBlocked
VecAbs VecNorm VecSetValuesBlockedLocal
VecConjugate VecNormalize VecSetValuesLocal
VecContourScale VecReciprocal VecShift
VecCreateMPI VecRestoreArrays VecStashSetInitialSize
VecCreateMPIWithArray VecScale VecTDot
VecCreateSeq VecScatterBegin VecViewFromOptions
VecCreateSeqWithArray VecScatterCreate VecWAXPY
Advanced - Setting more advanced options and customization
VecAppendOptionsPrefix VecMTDotEnd VecStashView
VecCreateGhost VecMaxPointwiseDivide VecStrideGather
VecCreateGhostBlock VecNormBegin VecStrideGatherAll
VecCreateGhostBlockWithArray VecNormEnd VecStrideMax
VecCreateGhostWithArray VecPointwiseDivide VecStrideMaxAll
VecCreateShared VecPointwiseMax VecStrideMin
VecDotBegin VecPointwiseMaxAbs VecStrideMinAll
VecDotEnd VecPointwiseMin VecStrideNorm
VecDotNorm2 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
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
ISInitializePackage VecPlaceArray VecRestoreArray3d
VecGetArray1d VecReplaceArray VecScatterGetMerged
VecGetArray2d VecResetArray VecScatterRemap
VecGetArray3d VecRestoreArray1d VecValid
VecInitializePackage VecRestoreArray2d
No deprecated routines

Table of Contents