15 #ifndef GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERBASE_HPP_ 16 #define GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERBASE_HPP_ 30 template<
typename LAI >
94 return m_mat->numGlobalRows();
103 return m_mat->numGlobalCols();
112 return m_mat !=
nullptr;
141 GEOSX_ERROR(
"PreconditionerBase::preconditionerMatrix called!. Should be overridden." );
154 #endif //GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERBASE_HPP_ virtual globalIndex numGlobalRows() const override
Get the number of global rows.
Common interface for preconditioning operators.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
virtual void compute(Matrix const &mat, DofManager const &dofManager)
Compute the preconditioner from a matrix.
virtual globalIndex numGlobalCols() const override
Get the number of global columns.
virtual void compute(Matrix const &mat)
Compute the preconditioner from a matrix.
virtual bool hasPreconditionerMatrix() const
Check whether the preconditioner is available in matrix (explicit) form.
virtual Matrix const & preconditionerMatrix() const
Access the preconditioner in matrix form (whenever available). It must be overridden by the specific ...
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns, and generally simplifying the interaction between PhysicsSolvers and linear algebra operations.
virtual void clear()
Clean up the preconditioner setup.
typename TrilinosInterface ::ParallelMatrix Matrix
Alias for matrix type.
bool ready() const
Chech if preconditioner is ready to use.
#define GEOSX_ERROR(msg)
Raise a hard error and terminate the program.
Matrix const & matrix() const
Access the matrix the preconditioner was computed from.
#define GEOSX_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
#define GEOSX_LAI_ASSERT(expr)
LAInterface::ParallelMatrix ParallelMatrix
Alias for ParallelMatrix.
Abstract base class for linear operators.
TrilinosInterface ::ParallelVector Vector
Alias for template parameter.