19 #ifndef GEOS_LINEARALGEBRA_SOLVERS_BLOCKPRECONDITIONER_HPP_
20 #define GEOS_LINEARALGEBRA_SOLVERS_BLOCKPRECONDITIONER_HPP_
23 #include "linearAlgebra/common/PreconditionerBase.hpp"
99 template<
typename LAI >
140 std::vector< DofManager::SubComponent > blockDofs,
142 real64 const scaling = 1.0 );
182 void applyBlockScaling();
187 void computeSchurComplement();
199 std::array< std::vector< DofManager::SubComponent >, 2 > m_blockDofs;
202 std::array< Matrix, 2 > m_restrictors;
205 std::array< Matrix, 2 > m_prolongators;
211 std::array< std::unique_ptr< PreconditionerBase< LAI > >, 2 > m_solvers;
214 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.
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}
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).