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. | |
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.
| OperatorT | Operator type (must satisfy Block2x2OperatorLike). |
| Block11T | Type of the (1,1) operator of the preconditioner to be (approximately) inverted |
| Block22T | Type of the (2,2) operator of the preconditioner to be (approximately) inverted |
| Block12T | Type of the (1,2) operator of the preconditioner/Stokes operator, the gradient block |
| Block11Preconditioner | Preconditioner for the (1,1) block (must satisfy SolverLike). |
| Block22Preconditioner | Preconditioner for the (2,2) block (must satisfy SolverLike). |
| using terra::linalg::solvers::BlockTriangularPreconditioner2x2< OperatorT, Block11T, Block22T, Block12T, Block11Preconditioner, Block22Preconditioner >::OperatorType = OperatorT |
Operator type to be solved.
| using terra::linalg::solvers::BlockTriangularPreconditioner2x2< OperatorT, Block11T, Block22T, Block12T, Block11Preconditioner, Block22Preconditioner >::RHSVectorType = DstOf< OperatorType > |
Right-hand side vector type (must be Block2VectorLike).
| using terra::linalg::solvers::BlockTriangularPreconditioner2x2< OperatorT, Block11T, Block22T, Block12T, Block11Preconditioner, Block22Preconditioner >::SolutionVectorType = SrcOf< OperatorType > |
Solution vector type (must be Block2VectorLike).
|
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.
| block11 | The (1, 1) block to approximate the inverse to. |
| block22 | The (2, 2) block to approximate the inverse to. |
| block12 | The (1, 2) gradient block. |
| block11_preconditioner | Preconditioner for the (1,1) block. |
| block22_preconditioner | Preconditioner for the (2,2) block. |
|
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.
| A | Is ignored. The two solvers are applied to the operators passed in the constructor. |
| x | Solution block vector (output). |
| b | Right-hand side block vector (input). |