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

Static assertion: BlockDiagonalPreconditioner2x2 satisfies SolverLike concept. 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

 BlockTriangularPreconditioner2x2 (const Block11T &block11, const Block22T &block22, const Block12T &block12, SolutionVectorType &tmp, 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-triangular preconditioner system by block-backward substitution.
 

Detailed Description

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

Static assertion: BlockDiagonalPreconditioner2x2 satisfies SolverLike concept.

Block-triangular 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-triangular preconditioner solves:

\[ \begin{pmatrix} P_{11} & B^T \\ 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
Block12TType of the (1,2) operator of the preconditioner/Stokes operator, the gradient block
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, OperatorLike Block12T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
using terra::linalg::solvers::BlockTriangularPreconditioner2x2< OperatorT, Block11T, Block22T, Block12T, Block11Preconditioner, Block22Preconditioner >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

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

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

◆ SolutionVectorType

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

Solution vector type (must be Block2VectorLike).

Constructor & Destructor Documentation

◆ BlockTriangularPreconditioner2x2()

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

Static assertions to ensure block vector types.

Construct a block-triangular preconditioner with given block preconditioners and the gradient block.

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.
block12The (1, 2) gradient block.
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, OperatorLike Block12T, SolverLike Block11Preconditioner, SolverLike Block22Preconditioner>
void terra::linalg::solvers::BlockTriangularPreconditioner2x2< OperatorT, Block11T, Block22T, Block12T, Block11Preconditioner, Block22Preconditioner >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

Solve the block-triangular preconditioner system by block-backward substitution.

First, solve for the pressure block (second block row) by applying the schur preconditioner. Backward substitute the result into the first block row, multiply by 12/gradient block. Obtain the velocity solution by solving the 11 block/applying the velocity preconditioner. The Schur complement has a negative sign which is implemented in between.

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: