Julia interfaces

For the main PETSc objects (Vec,Mat,KSP, etc...) we provide high-level Julia interfaces that are easy to use and integrate with Julia's Array and SparseArray APIs. For distributed arrays, we support `PartitionedArrays.jl APIs.

GridapPETSc.InitMethod
GridapPETSc.Init(;args=String[],file="",help="",finalize_atexit=true)

Initialize PETSc with optional command line arguments, a file name, and help text. Wrapper for PetscInitializeNoPointers.

source
GridapPETSc.destroyMethod
GridapPETSc.destroy(a)

Call the appropriate PETSc destroy function for the object a. This is a collective operation and must be called on all processes at the same time.

source
GridapPETSc.gridap_petsc_gcMethod
GridapPETSc.gridap_petsc_gc()

Call PetscObjectRegisterDestroyAll to destroy all PETSc objects registered for destruction. This is a collective operation and must be called on all processes at the same time.

source
GridapPETSc.withMethod
GridapPETSc.with(f; kwargs...)

Similar to the Base.with execution block, but for PETSc:

Usage:

  GridapPETSc.with() do
    # PETSc-dependent code here
  end
source