16 #ifndef GEOS_LINEARALGEBRA_SOLVERS_PRECONDITIONERJACOBI_HPP_
17 #define GEOS_LINEARALGEBRA_SOLVERS_PRECONDITIONERJACOBI_HPP_
20 #include "linearAlgebra/common/PreconditionerBase.hpp"
29 template<
typename LAI >
50 m_diagInv.createWithLocalSize( mat.numLocalRows(), mat.comm() );
51 mat.extractDiagonal( m_diagInv );
52 m_diagInv.reciprocal();
78 return m_diagInv.globalSize();
88 return m_diagInv.globalSize();
98 Vector & dst )
const override
104 m_diagInv.pointwiseProduct( src, dst );
Abstract base class for linear operators.
Common interface for preconditioning operators.
typename Base::Vector Vector
Alias for vector type.
typename LAI::ParallelMatrix Matrix
Alias for matrix type.
Common interface for identity preconditioning operator.
virtual globalIndex numGlobalRows() const override final
Get the number of global rows.
typename Base::Vector Vector
Alias for vector type.
virtual void setup(Matrix const &mat) override
Compute the preconditioner from a matrix.
virtual void clear() override
Clean up the preconditioner setup.
virtual globalIndex numGlobalCols() const override final
Get the number of global columns.
virtual void apply(Vector const &src, Vector &dst) const override
Apply operator to a vector.
#define GEOS_LAI_ASSERT_EQ(lhs, rhs)
#define GEOS_LAI_ASSERT(expr)
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).