15 #ifndef GEOS_LINEARALGEBRA_SOLVERS_PRECONDITIONERBASE_HPP_
16 #define GEOS_LINEARALGEBRA_SOLVERS_PRECONDITIONERBASE_HPP_
30 template<
typename LAI >
81 return m_mat->numGlobalRows();
90 return m_mat->numGlobalCols();
99 return m_mat->numLocalRows();
108 return m_mat->numLocalCols();
118 virtual MPI_Comm
comm()
const override
120 return m_mat->comm();
129 return m_mat !=
nullptr;
158 GEOS_ERROR(
"PreconditionerBase::preconditionerMatrix called. This is not supposed to happen."
159 "Check the value of hasPreconditionerMatrix() before accessing this function." );
#define GEOS_ERROR(msg)
Raise a hard error and terminate the program.
Abstract base class for linear operators.
VECTOR Vector
Alias for template parameter.
Common interface for preconditioning operators.
virtual void clear()
Clean up the preconditioner setup.
virtual Matrix const & preconditionerMatrix() const
Access the preconditioner in matrix form (whenever available). It must be overridden by the specific ...
virtual MPI_Comm comm() const override
Get the MPI communicator the matrix was created with.
virtual localIndex numLocalCols() const override
Get the number of local columns.
virtual bool hasPreconditionerMatrix() const
Check whether the preconditioner is available in matrix (explicit) form.
bool ready() const
Chech if preconditioner is ready to use.
virtual void setup(Matrix const &mat)
Compute the preconditioner from a matrix.
virtual globalIndex numGlobalCols() const override
Get the number of global columns.
virtual localIndex numLocalRows() const override
Get the number of local rows.
Matrix const & matrix() const
Access the matrix the preconditioner was computed from.
virtual globalIndex numGlobalRows() const override
Get the number of global rows.
typename Base::Vector Vector
Alias for vector type.
typename LAI::ParallelMatrix Matrix
Alias for matrix type.
#define GEOS_LAI_ASSERT_MSG(expr, msg)
#define GEOS_LAI_ASSERT(expr)
GEOSX_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
LAInterface::ParallelMatrix ParallelMatrix
Alias for ParallelMatrix.
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).