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. | |
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.
| 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 |
| Block11Preconditioner | Preconditioner for the (1,1) block (must satisfy SolverLike). |
| Block22Preconditioner | Preconditioner for the (2,2) block (must satisfy SolverLike). |
| using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::OperatorType = OperatorT |
Operator type to be solved.
| using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::RHSVectorType = DstOf< OperatorType > |
Right-hand side vector type (must be Block2VectorLike).
| using terra::linalg::solvers::BlockDiagonalPreconditioner2x2< OperatorT, Block11T, Block22T, Block11Preconditioner, Block22Preconditioner >::SolutionVectorType = SrcOf< OperatorType > |
Solution vector type (must be Block2VectorLike).
|
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.
| block11 | The (1, 1) block to approximate the inverse to. |
| block22 | The (2, 2) block to approximate the inverse to. |
| block11_preconditioner | Preconditioner for the (1,1) block. |
| block22_preconditioner | Preconditioner for the (2,2) block. |
|
inline |
Solve the block-diagonal preconditioner system.
Applies the block11 and block22 preconditioners to the respective blocks.
| 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). |