16 #include "libmesh/preconditioner.h" 17 #include "libmesh/linear_implicit_system.h" 18 #include "libmesh/enum_preconditioner_type.h" 46 std::vector<unsigned int> off_diag,
76 std::vector<libMesh::LinearImplicitSystem *>
_systems;
virtual void setup()
This is called every time the "operator might have changed".
virtual void apply(const NumericVector< Number > &x, NumericVector< Number > &y)
Computes the preconditioned vector "y" based on input "x".
std::vector< std::vector< unsigned int > > _off_diag
Holds which off diagonal blocks to compute.
std::vector< libMesh::LinearImplicitSystem * > _systems
List of linear system that build up the preconditioner.
std::vector< libMesh::PreconditionerType > _pre_type
Which preconditioner to use for each solve.
PreconditionerType type() const
NonlinearSystemBase & _nl
The nonlinear system this PBP is associated with (convenience reference)
virtual void clear()
Release all memory and clear data structures.
Base class for MOOSE preconditioners.
virtual void init()
Initialize data structures if not done so already.
Nonlinear system to be solved.
static InputParameters validParams()
Constructor.
virtual ~PhysicsBasedPreconditioner()
PhysicsBasedPreconditioner(const InputParameters ¶ms)
Implements a segregated solve preconditioner.
std::vector< std::vector< libMesh::SparseMatrix< Number > * > > _off_diag_mats
Holds pointers to the off-diagonal matrices.
std::vector< unsigned int > _solve_order
Holds the order the blocks are solved for.
std::vector< std::unique_ptr< libMesh::Preconditioner< Number > > > _preconditioners
Holds one Preconditioner object per small system to solve.
void addSystem(unsigned int var, std::vector< unsigned int > off_diag, libMesh::PreconditionerType type=libMesh::AMG_PRECOND)
Add a diagonal system + possibly off-diagonals ones as well, also specifying type of preconditioning...