20 #ifndef GEOS_LINEARALGEBRA_SOLVERS_BLOCKPRECONDITIONER_HPP_
21 #define GEOS_LINEARALGEBRA_SOLVERS_BLOCKPRECONDITIONER_HPP_
24 #include "linearAlgebra/common/PreconditionerBase.hpp"
100 template<
typename LAI >
141 std::vector< DofManager::SubComponent > blockDofs,
143 real64 const scaling = 1.0 );
183 void applyBlockScaling();
188 void computeSchurComplement();
200 std::array< std::vector< DofManager::SubComponent >, 2 > m_blockDofs;
203 std::array< Matrix, 2 > m_restrictors;
206 std::array< Matrix, 2 > m_prolongators;
212 std::array< std::unique_ptr< PreconditionerBase< LAI > >, 2 > m_solvers;
215 std::array< real64, 2 > m_scaling;
General 2x2 block preconditioner.
void setupBlock(localIndex const blockIndex, std::vector< DofManager::SubComponent > blockDofs, std::unique_ptr< PreconditionerBase< LAI > > solver, real64 const scaling=1.0)
Setup data for one of the two blocks.
BlockPreconditioner(BlockShapeOption const shapeOption, SchurComplementOption const schurOption, BlockScalingOption const scalingOption)
Constructor.
virtual void clear() override
Clean up the preconditioner setup.
typename Base::Vector Vector
Alias for the vector type.
typename Base::Matrix Matrix
Alias for the matrix type.
virtual void apply(Vector const &src, Vector &dst) const override
Apply operator to a vector.
virtual void setup(Matrix const &mat) override
Compute the preconditioner from a matrix.
virtual ~BlockPreconditioner() override
Destructor.
The DoFManager is responsible for allocating global dofs, constructing sparsity patterns,...
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.
BlockScalingOption
Type of block row scaling to apply.
@ UserProvided
User-provided scaling.
@ FrobeniusNorm
Equilibrate Frobenius norm of the diagonal blocks.
double real64
64-bit floating point type.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
SchurComplementOption
Type of Schur complement approximation used.
@ FirstBlockDiagonal
Approximate first block with its diagonal.
@ None
No Schur complement - just block-GS/block-Jacobi preconditioner.
@ FirstBlockUserDefined
User defined preconditioner for the first block.
@ RowsumDiagonalProbing
Rowsum-preserving diagonal approximation constructed with probing.
BlockShapeOption
Shape of the block preconditioner.
@ LowerUpperTriangular
(LDU)^{-1}
@ UpperTriangular
(DU)^{-1}