Loading...
Searching...
No Matches
terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner > Class Template Reference

Block-diagonal preconditioner for 2x2 block operators. More...

#include <block_preconditioner_2x2.hpp>

Public Types

using OperatorType = OperatorT
 Operator type to be solved.
 
using SolutionVectorType = SrcOf< OperatorType >
 Solution vector type (must be Block2VectorLike).
 
using RHSVectorType = DstOf< OperatorType >
 Right-hand side vector type (must be Block2VectorLike).
 

Public Member Functions

 BlockDiagonalPreconditioner2x2 (const Block11T &block11, const Block22T &block22, const Block11Preconditioner &block11_preconditioner, const Block22Preconditioner &block22_preconditioner)
 Static assertions to ensure block vector types.
 
void solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b)
 Solve the block-diagonal preconditioner system.
 

Detailed Description

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
class terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >

Block-diagonal preconditioner for 2x2 block operators.

Satisfies the SolverLike concept (see solver.hpp). Applies separate preconditioners to the (1,1) and (2,2) blocks. The block-diagonal preconditioner solves:

\[ \begin{pmatrix} P_{11} & 0 \\ 0 & P_{22} \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} \]

where \( P_{11} \) and \( P_{22} \) are preconditioners for the (1,1) and (2,2) blocks, respectively.

Template Parameters
OperatorTOperator type (must satisfy Block2x2OperatorLike).
Block11TType of the (1,1) operator of the preconditioner to be (approximately) inverted
Block22TType of the (2,2) operator of the preconditioner to be (approximately) inverted
Block11PreconditionerPreconditioner for the (1,1) block (must satisfy SolverLike).
Block22PreconditionerPreconditioner for the (2,2) block (must satisfy SolverLike).

Member Typedef Documentation

◆ OperatorType

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::RHSVectorType = DstOf< OperatorType >

Right-hand side vector type (must be Block2VectorLike).

◆ SolutionVectorType

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::SolutionVectorType = SrcOf< OperatorType >

Solution vector type (must be Block2VectorLike).

Constructor & Destructor Documentation

◆ BlockDiagonalPreconditioner2x2()

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::BlockDiagonalPreconditioner2x2 ( const Block11T &  block11,
const Block22T &  block22,
const Block11Preconditioner &  block11_preconditioner,
const Block22Preconditioner &  block22_preconditioner 
)
inline

Static assertions to ensure block vector types.

Construct a block-diagonal preconditioner with given block preconditioners.

When calling solve( A, x, b ) with this preconditioner, the two passed solvers are applied to the two block passed in the constructor here. This does NOT use the (1, 1) and (2, 2) blocks of the A block in the solve() call.

Parameters
block11The (1, 1) block to approximate the inverse to.
block22The (2, 2) block to approximate the inverse to.
block11_preconditionerPreconditioner for the (1,1) block.
block22_preconditionerPreconditioner for the (2,2) block.

Member Function Documentation

◆ solve_impl()

template<Block2x2OperatorLike OperatorT, OperatorLike Block11T, OperatorLike Block22T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
void terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

Solve the block-diagonal preconditioner system.

Applies the block11 and block22 preconditioners to the respective blocks.

Parameters
AIs ignored. The two solvers are applied to the operators passed in the constructor.
xSolution block vector (output).
bRight-hand side block vector (input).

The documentation for this class was generated from the following file: