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.PETSCGridapPETSc.PETScIndexSetGridapPETSc.PETScLinearSolverGridapPETSc.PETScMatrixGridapPETSc.PETScNonlinearSolverGridapPETSc.PETScVectorGridapPETSc.FinalizeGridapPETSc.InitGridapPETSc.InitializedGridapPETSc.destroyGridapPETSc.gridap_petsc_gcGridapPETSc.with
GridapPETSc.PETScIndexSet — Type
struct PETScIndexSetJulia interface for a PETSc IS object.
GridapPETSc.PETScLinearSolver — Type
struct PETScLinearSolver <: LinearSolverJulia interface for a PETSc KSP object.
GridapPETSc.PETScMatrix — Type
struct PETScMatrix <: AbstractMatrix{PetscScalar}Julia interface for a PETSc Mat object.
GridapPETSc.PETScNonlinearSolver — Type
struct PETScNonlinearSolver{F} <: NonlinearSolverJulia interface for a PETSc SNES object.
GridapPETSc.PETScVector — Type
struct PETScVector <: AbstractVector{PetscScalar}Julia interface for a PETSc Vec object.
GridapPETSc.Finalize — Method
GridapPETSc.Finalize()Finalize PETSc and clean up resources. Wrapper for PetscFinalize.
GridapPETSc.Init — Method
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.
GridapPETSc.Initialized — Method
GridapPETSc.Initialized()Returns true if PETSc has been initialized. Wrapper for PetscInitialized.
GridapPETSc.destroy — Method
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.
GridapPETSc.gridap_petsc_gc — Method
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.
GridapPETSc.with — Method
GridapPETSc.with(f; kwargs...)Similar to the Base.with execution block, but for PETSc:
Usage:
GridapPETSc.with() do
# PETSc-dependent code here
end