15 #ifndef GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERJACOBI_HPP_ 16 #define GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERJACOBI_HPP_ 19 #include "linearAlgebra/solvers/PreconditionerBase.hpp" 28 template<
typename LAI >
49 m_diagInv.createWithLocalSize( mat.numLocalRows(), mat.getComm() );
50 mat.extractDiagonal( m_diagInv );
51 m_diagInv.reciprocal();
89 return m_diagInv.globalSize();
99 return m_diagInv.globalSize();
109 Vector & dst )
const override 115 m_diagInv.pointwiseProduct( src, dst );
126 #endif //GEOSX_LINEARALGEBRA_SOLVERS_PRECONDITIONERJACOBI_HPP_ virtual void compute(Matrix const &mat) override
Compute the preconditioner from a matrix.
Common interface for preconditioning operators.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
Common interface for identity preconditioning operator.
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() override
Clean up the preconditioner setup.
virtual void compute(Matrix const &mat, DofManager const &dofManager) override
Compute the preconditioner from a matrix.
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.
typename LAI::ParallelMatrix Matrix
Alias for matrix type.
#define GEOSX_LAI_ASSERT_EQ(lhs, rhs)
#define GEOSX_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
virtual globalIndex numGlobalRows() const override final
Get the number of global rows.
#define GEOSX_LAI_ASSERT(expr)
Abstract base class for linear operators.
typename Base::Vector Vector
Alias for vector type.