Vectors: Examples

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

Beginner - Basic usage
ESICreateIndexSpace VecDuplicateVecsF90 VecRestoreArray2d
NormType VecGetArray VecRestoreArray3d
PetscMapCreate VecGetArray1d VecRestoreArrayF90
PetscMapSerialize VecGetArray2d VecScatter
Vec VecGetArray3d VecSerialize
VecAssemblyBegin VecGetArrayF90 VecSet
VecAssemblyEnd VecGetLocalSize VecSetValue
VecCopy VecGetOwnershipRange VecSetValues
VecCreate VecGetSize VecSqrt
VecDestroy VecPermute VecSum
VecDestroyVecsF90 VecRestoreArray VecType
VecDuplicate VecRestoreArray1d VecView
Intermediate - Setting options for algorithms and data structures
PetscMapGetSerializeType VecESISetType VecScatterEnd
PetscMapGetType VecESISetVector VecScatterView
PetscMapPrintHelp VecEqual VecSetFromOptions
PetscMapSetFromOptions VecGetArrays VecSetLocalToGlobalMapping
PetscMapSetSerializeType VecGetSerializeType VecSetLocalToGlobalMappingBlock
PetscMapSetType VecGetType VecSetOption
VecAXPBY VecLoad VecSetRandom
VecAXPY VecLoadIntoVector VecSetSerializeType
VecAYPX VecMAXPY VecSetSizes
VecAbs VecMDot VecSetStashInitialSize
VecConjugate VecMTDot VecSetType
VecContourScale VecMax VecSetValuesBlocked
VecConvertMPIToMPIZero VecMin VecSetValuesBlockedLocal
VecConvertMPIToSeqAll VecNorm VecSetValuesLocal
VecCreateMPI VecPrintHelp VecShift
VecCreateMPIWithArray VecReciprocal VecStrideMin
VecCreateSeq VecRestoreArrays VecTDot
VecCreateSeqWithArray VecScale VecViewFromOptions
VecDestroyVecs VecScatterBegin VecWAXPY
VecDot VecScatterCreate
VecDuplicateVecs VecScatterDestroy
Advanced - Setting more advanced options and customization
M VecGhostGetLocalForm VecSetBlockSize
PetscMap VecGhostRestoreLocalForm VecStashView
PetscMapRegisterAll VecGhostUpdateBegin VecStrideGather
PetscMapSerializeRegisterAll VecGhostUpdateEnd VecStrideGatherAll
PetscMapSerializeRegisterDestroy VecNormBegin VecStrideMax
VecCreateGhost VecNormEnd VecStrideNorm
VecCreateGhostBlock VecPointwiseDivide VecStrideScatter
VecCreateGhostBlockWithArray VecPointwiseMult VecStrideScatterAll
VecCreateGhostWithArray VecRegisterAll VecSwap
VecCreateShared VecScatterCopy VecTDotBegin
VecDotBegin VecScatterPostRecvs VecTDotEnd
VecDotEnd VecSerializeRegisterAll
VecGetBlockSize VecSerializeRegisterDestroy
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