GridapPETSc.jl extension
Building on top of GridapPETSc.jl, GridapSolvers provides specific solvers for some particularly complex PDEs:
GridapSolvers.PETScElasticitySolver
— FunctionPETScElasticitySolver(space::FESpace; maxiter=500, atol=1.e-12, rtol=1.e-8)
GMRES + AMG solver, specifically designed for linear elasticity problems.
Follows PETSc's documentation for PCAMG and MatNullSpaceCreateRigidBody.
GridapSolvers.PETScElasticitySolver
— MethodPETScElasticitySolver(space::FESpace; maxiter=500, atol=1.e-12, rtol=1.e-8)
GMRES + AMG solver, specifically designed for linear elasticity problems.
Follows PETSc's documentation for PCAMG and MatNullSpaceCreateRigidBody.
GridapSolvers.CachedPETScNS
— FunctionCachedPETScNS(ns::PETScLinearSolverNS,x::AbstractVector,b::AbstractVector)
Wrapper around a PETSc NumericalSetup, providing highly efficiend reusable caches:
When converting julia vectors/PVectors to PETSc vectors, we purposely create aliasing of the vector values. This means we can avoid copying data from one to another before solving, but we need to be careful about it.
This structure takes care of this, and makes sure you do not attempt to solve the system with julia vectors that are not the ones you used to create the solver cache. Once this structure is created, you can only solve the system with the same vectors you used to create it.