Vec Documentation

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.PetscVecType.

Petsc Vector type.

Not a subtype of AbstractArray because Petsc vectors do not conform to that API.

source

Free a Petsc vec. Safe to call multiple times

source
PETSc2.PetscViewMethod.

PetscView for Petsc vector

source
PETSc2.VecAXPBYMethod.

VecAXPBY

source
PETSc2.VecAXPBYPCZMethod.

VecAXPBYPCZ

source
PETSc2.VecAXPYMethod.

VecAXPY

source
PETSc2.VecAYPXMethod.

VecAYPX

source

VecAssemblyBegin

source

VecAssemblyEnd

source
PETSc2.VecCopyMethod.

VecCopy

source
PETSc2.VecDotMethod.

VecDot

source

VecDulicate

source
PETSc2.VecExpMethod.

VecExp

source
PETSc2.VecGetArrayMethod.

VecGetArray. Users must call VecRestoreArray when finished.

Inputs

  • vec: the Petsc vector

Outputs

  • arr: a Julia Array{PetscScalar, 1}

source

Similar to VecGetArray, but produces the array must not be written to.

source

VecGetLocalSize

Inputs

  • vec: a Petsc vector

Outputs

  • the size

source

VecGetOwnershipRange

Inputs

  • vec: Petsc vector

Outputs

  • low: lowest index (zero-based) that is owned

  • high: highest index + 1 that is owned

source
PETSc2.VecGetSizeMethod.

VeGetSize

Inputs

  • vec: a Petsc vector

Outputs

  • the size

source

VecGetValues with length of idx inferred from idx

Inputs

  • vec: the Petsc vector

  • idx: array of PetscInt indices

  • y: array of PetscScalar values

source

VecGetValues

source
PETSc2.VecLogMethod.

VecLog

source
PETSc2.VecMAXPYMethod.

VecMAXPY

source
PETSc2.VecMaxMethod.

VecMax

Inputs

  • vec: PetscVec

Output

  • r: the maximum value

  • idx: the (zero-based) index of the maximum value

source
PETSc2.VecMinMethod.

VecMin. Same interface as VecMax

source
PETSc2.VecNormMethod.

VecNorm

Inputs

  • obj: Petsc vector

  • normtype: the Petsc enum for the norm type

Output

  • the norm value

source

VecPointwiseDivide

source

VecPointwiseMult

source

VecReciprocal

source

VecRestoreArray. Users must not access the array after calling this function.

Inputs

  • vec: the PetscVector passed into VecGetArray

  • arr: the array returned by `VecGetArray

source

Similar to VecRestoreArray, but corresponds to VecGetArrayRead

source
PETSc2.VecScaleMethod.

VecScale

source
PETSc2.VecSetMethod.

VecSet

source
PETSc2.VecSetSizesMethod.

VecSetSizes

source
PETSc2.VecSetTypeMethod.

VecSetType

source

VecSetValues

source

VecSetValues method that implicitly uses INSERT_VALUES

source
PETSc2.VecShiftMethod.

VecShift

source
PETSc2.VecSqrtAbsMethod.

VecSqrtAbs

source
PETSc2.VecSumMethod.

VecSum

source
PETSc2.VecSwapMethod.

VecSwap

source
PETSc2.VecTDotMethod.

VecTDot

source
PETSc2.VecWAXPYMethod.

VecWAXPY

source
PETSc2.AllVectorsConstant.

Union{AbstractVector, PetscVec}

source
PETSc2.VecAssembleMethod.

Convenience function for calling VecAssemblyBegin, and VecAssemblyEnd, in one go.

source