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 VecDestroyVecs VecScatterCreateToAll
PetscMapGetGlobalRange VecDot VecScatterCreateToZero
PetscMapGetLocalRange VecDuplicateVecs VecScatterDestroy
PetscMapGetLocalSize VecEqual VecScatterEnd
PetscMapGetSize VecGetArrays VecScatterView
PetscMapInitialize VecGetType VecSetLocalToGlobalMapping
PetscMapSetBlockSize VecLoad VecSetLocalToGlobalMappingBlock
PetscMapSetLocalSize VecLoadIntoVector VecSetOption
PetscMapSetSize VecMAXPY VecSetRandom
PetscMapSetUp 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
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
None: Not yet cataloged
VecScatterCreateLocal

Table of Contents