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