petsc-main 2021-04-16
Report Typos and Errors

Vectors: Examples

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

Beginner - Basic usage
NORM_1 VecDuplicate VecRealPart
NORM_1_AND_2 VecDuplicateVecsF90 VecRestoreArray
NORM_2 VecExp VecRestoreArray4d
NORM_FROBENIUS VecGetArray VecRestoreArray4dRead
NORM_INFINITY VecGetArray4d VecRestoreArray4dWrite
NORM_MAX VecGetArray4dRead VecRestoreArrayAndMemType
NormType VecGetArray4dWrite VecRestoreArrayF90
SCATTER_FORWARD VecGetArrayAndMemType VecRestoreArrayRead
SCATTER_REVERSE VecGetArrayF90 VecRestoreArrayReadAndMemType
ScatterMode VecGetArrayRead VecRestoreArrayReadF90
VECCUDA VecGetArrayReadAndMemType VecRestoreArrayWrite
VECMPI VecGetArrayReadF90 VecRestoreLocalVector
VECMPICUDA VecGetLocalSize VecRestoreLocalVectorRead
VECMPIVIENNACL VecGetLocalVector VecSet
VECSEQ VecGetLocalVectorRead VecSetFromOptions
VECSEQCUDA VecGetOwnershipRange VecSetValue
VECSEQVIENNACL VecGetOwnershipRanges VecSetValueLocal
VECSTANDARD VecGetSize VecSetValues
VECVIENNACL VecGetValues VecSqrtAbs
Vec VecImaginaryPart VecSum
VecAssemblyBegin VecLockGet VecTaggerBox
VecAssemblyEnd VecLockReadPop VecType
VecCopy VecLockReadPush VecView
VecCreate VecLockWriteSet_Private VecZeroEntries
VecDestroy VecLog
VecDestroyVecsF90 VecPermute
Intermediate - Setting options for algorithms and data structures
PetscSectionVecNorm VecCreateSeqViennaCLWithArrays VecRestoreArrays
VECNEST VecCreateSeqWithArray VecScale
VecAXPBY VecDestroyVecs VecSetLocalToGlobalMapping
VecAXPBYPCZ VecDot VecSetOption
VecAXPY VecDotRealPart VecSetRandom
VecAYPX VecDuplicateVecs VecSetSizes
VecAbs VecEqual VecSetType
VecBindToCPU VecGetArrayWrite VecSetValuesBlocked
VecCUDAGetArray VecGetArrays VecSetValuesBlockedLocal
VecCUDAGetArrayRead VecGetOffloadMask VecSetValuesLocal
VecCUDARestoreArray VecGetType VecShift
VecCUDARestoreArrayRead VecHIPGetArray VecStashSetInitialSize
VecCUDARestoreArrayWrite VecHIPGetArrayRead VecStepMaxBounded
VecChop VecHIPRestoreArray VecTDot
VecConjugate VecHIPRestoreArrayRead VecUniqueEntries
VecCreateMPI VecHIPRestoreArrayWrite VecViennaCLGetCLContext
VecCreateMPICUDAWithArray VecLoad VecViennaCLGetCLMem
VecCreateMPICUDAWithArrays VecMAXPY VecViennaCLGetCLMemRead
VecCreateMPIViennaCLWithArray VecMDot VecViennaCLGetCLMemWrite
VecCreateMPIViennaCLWithArrays VecMTDot VecViennaCLGetCLQueue
VecCreateMPIWithArray VecMax VecViennaCLPlaceArray
VecCreateSeq VecMin VecViennaCLRestoreCLMem
VecCreateSeqCUDA VecNorm VecViennaCLRestoreCLMemWrite
VecCreateSeqCUDAWithArray VecNormAvailable VecViewFromOptions
VecCreateSeqCUDAWithArrays VecNormalize VecWAXPY
VecCreateSeqViennaCL VecPow
VecCreateSeqViennaCLWithArray VecReciprocal
Advanced - Setting more advanced options and customization
ISComplementVec VecPointwiseDivide VecTaggerAndGetSubs
PetscCommSplitReductionBegin VecPointwiseMax VecTaggerAndSetSubs
VecAppendOptionsPrefix VecPointwiseMaxAbs VecTaggerCDFGetBox
VecBoundGradientProjection VecPointwiseMin VecTaggerCDFGetMethod
VecCUDAGetArrayWrite VecPointwiseMult VecTaggerCDFIterativeGetTolerances
VecConcatenate VecRegister VecTaggerCDFIterativeSetTolerances
VecCreateGhost VecRegisterAll VecTaggerCDFMethod
VecCreateGhostBlock VecRestoreSubVector VecTaggerCDFSetBox
VecCreateGhostBlockWithArray VecSetBlockSize VecTaggerCDFSetMethod
VecCreateGhostWithArray VecSetOperation VecTaggerComputeBoxes
VecCreateNest VecSetOptionsPrefix VecTaggerComputeIS
VecCreateShared VecSetUp VecTaggerCreate
VecDotBegin VecStashGetInfo VecTaggerDestroy
VecDotEnd VecStashView VecTaggerGetBlockSize
VecDotNorm2 VecStepBoundInfo VecTaggerGetInvert
VecGetBlockSize VecStepMax VecTaggerGetType
VecGetLocalToGlobalMapping VecStrideGather VecTaggerOrGetSubs
VecGetOptionsPrefix VecStrideGatherAll VecTaggerOrSetSubs
VecGetSubVector VecStrideMax VecTaggerRegister
VecGhostGetLocalForm VecStrideMaxAll VecTaggerRegisterAll
VecGhostIsLocalForm VecStrideMin VecTaggerRelativeGetBox
VecGhostRestoreLocalForm VecStrideMinAll VecTaggerRelativeSetBox
VecGhostUpdateBegin VecStrideNorm VecTaggerSetBlockSize
VecGhostUpdateEnd VecStrideNormAll VecTaggerSetFromOptions
VecHIPGetArrayWrite VecStrideScale VecTaggerSetInvert
VecISAXPY VecStrideScaleAll VecTaggerSetType
VecISCopy VecStrideScatter VecTaggerSetUp
VecISSet VecStrideScatterAll VecTaggerType
VecMDotBegin VecStrideSet VecTaggerView
VecMDotEnd VecStrideSubSetGather VecWhichBetween
VecMPISetGhost VecStrideSubSetScatter VecWhichBetweenOrEqual
VecMTDotBegin VecSwap VecWhichEqual
VecMTDotEnd VecTDotBegin VecWhichGreaterThan
VecMaxPointwiseDivide VecTDotEnd VecWhichInactive
VecMedian VecTagger VecWhichLessThan
VecNormBegin VecTaggerAbsoluteGetBox Vecs
VecNormEnd VecTaggerAbsoluteSetBox
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
ISFinalizePackage VecGetArray3dRead VecResetArray
ISInitializePackage VecGetArray3dWrite VecRestoreArray1d
PetscOffloadMask VecGetArrayPair VecRestoreArray1dRead
PetscSectionVecView VecGetLayout VecRestoreArray1dWrite
SCATTER_FORWARD_LOCAL VecGetPinnedMemoryMin VecRestoreArray2d
SCATTER_REVERSE_LOCAL VecGetValuesSection VecRestoreArray2dRead
VecCUDAPlaceArray VecHIPPlaceArray VecRestoreArray2dWrite
VecCUDAReplaceArray VecHIPReplaceArray VecRestoreArray3d
VecCUDAResetArray VecHIPResetArray VecRestoreArray3dRead
VecFinalizePackage VecInitializePackage VecRestoreArray3dWrite
VecGetArray1d VecNestGetSize VecRestoreArrayPair
VecGetArray1dRead VecNestGetSubVec VecSetLayout
VecGetArray1dWrite VecNestGetSubVecs VecSetPinnedMemoryMin
VecGetArray2d VecNestSetSubVec VecSetValuesSection
VecGetArray2dRead VecNestSetSubVecs VecTaggerFinalizePackage
VecGetArray2dWrite VecPlaceArray VecTaggerInitializePackage
VecGetArray3d VecReplaceArray VecViennaCLResetArray
Deprecated - Functionality scheduled for removal in future versions
VecLockPop VecLockPush

Table of Contents