Vec Documentation
This page wraps functions in PETSc's Vec API. Consult the PETSc documentation for the behavior of the functions. The documentation on this page only describes differences between the Julia wrappers and the PETSc documentation.
PETSc2.PetscVec — Type.Petsc Vector type.
Not a subtype of AbstractArray because Petsc vectors do not conform to that API.
PETSc2.PetscDestroy — Method.Free a Petsc vec. Safe to call multiple times
PETSc2.PetscView — Method.PetscView for Petsc vector
PETSc2.VecAXPBY — Method.VecAXPBY
PETSc2.VecAXPBYPCZ — Method.VecAXPBYPCZ
PETSc2.VecAXPY — Method.VecAXPY
PETSc2.VecAYPX — Method.VecAYPX
PETSc2.VecAssemblyBegin — Method.VecAssemblyBegin
PETSc2.VecAssemblyEnd — Method.VecAssemblyEnd
PETSc2.VecCopy — Method.VecCopy
PETSc2.VecDot — Method.VecDot
PETSc2.VecDuplicate — Method.VecDulicate
PETSc2.VecExp — Method.VecExp
PETSc2.VecGetArray — Method.VecGetArray. Users must call VecRestoreArray when finished.
Inputs
vec: the Petsc vector
Outputs
arr: a Julia Array{PetscScalar, 1}
PETSc2.VecGetArrayRead — Method.Similar to VecGetArray, but produces the array must not be written to.
PETSc2.VecGetLocalSize — Method.VecGetLocalSize
Inputs
vec: a Petsc vector
Outputs
the size
PETSc2.VecGetOwnershipRange — Method.VecGetOwnershipRange
Inputs
vec: Petsc vector
Outputs
low: lowest index (zero-based) that is owned
high: highest index + 1 that is owned
PETSc2.VecGetSize — Method.VeGetSize
Inputs
vec: a Petsc vector
Outputs
the size
PETSc2.VecGetValues — Method.VecGetValues with length of idx inferred from idx
Inputs
vec: the Petsc vector
idx: array of PetscInt indices
y: array of PetscScalar values
PETSc2.VecGetValues — Method.VecGetValues
PETSc2.VecLog — Method.VecLog
PETSc2.VecMAXPY — Method.VecMAXPY
PETSc2.VecMax — Method.VecMax
Inputs
vec: PetscVec
Output
r: the maximum value
idx: the (zero-based) index of the maximum value
PETSc2.VecMin — Method.VecMin. Same interface as VecMax
PETSc2.VecNorm — Method.VecNorm
Inputs
obj: Petsc vector
normtype: the Petsc enum for the norm type
Output
the norm value
PETSc2.VecPointwiseDivide — Method.VecPointwiseDivide
PETSc2.VecPointwiseMult — Method.VecPointwiseMult
PETSc2.VecReciprocal — Method.VecReciprocal
PETSc2.VecRestoreArray — Method.VecRestoreArray. Users must not access the array after calling this function.
Inputs
vec: the PetscVector passed into
VecGetArrayarr: the array returned by `VecGetArray
PETSc2.VecRestoreArrayRead — Method.Similar to VecRestoreArray, but corresponds to VecGetArrayRead
PETSc2.VecScale — Method.VecScale
PETSc2.VecSet — Method.VecSet
PETSc2.VecSetSizes — Method.VecSetSizes
PETSc2.VecSetType — Method.VecSetType
PETSc2.VecSetValues — Method.VecSetValues
PETSc2.VecSetValues — Method.VecSetValues method that implicitly uses INSERT_VALUES
PETSc2.VecShift — Method.VecShift
PETSc2.VecSqrtAbs — Method.VecSqrtAbs
PETSc2.VecSum — Method.VecSum
PETSc2.VecSwap — Method.VecSwap
PETSc2.VecTDot — Method.VecTDot
PETSc2.VecWAXPY — Method.VecWAXPY
PETSc2.AllVectors — Constant.Union{AbstractVector, PetscVec}
PETSc2.VecAssemble — Method.Convenience function for calling VecAssemblyBegin, and VecAssemblyEnd, in one go.