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