MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::itl::pc::block_diagonal< Matrix > Class Template Reference

Block diagonal preconditioner: extracts diagonal blocks and uses dense LU. More...

#include <block_diagonal.hpp>

Public Member Functions

 block_diagonal (const Matrix &A, size_type block_size)
template<typename VecX, typename VecB>
void solve (VecX &x, const VecB &b) const
template<typename VecX, typename VecB>
void adjoint_solve (VecX &x, const VecB &b) const
 Solve M^H x = b, block by block.

Detailed Description

template<FieldMatrix Matrix>
class mtl::itl::pc::block_diagonal< Matrix >

Block diagonal preconditioner: extracts diagonal blocks and uses dense LU.

Constructor & Destructor Documentation

◆ block_diagonal()

template<FieldMatrix Matrix>
mtl::itl::pc::block_diagonal< Matrix >::block_diagonal ( const Matrix & A,
size_type block_size )
inline

Member Function Documentation

◆ adjoint_solve()

template<FieldMatrix Matrix>
template<typename VecX, typename VecB>
void mtl::itl::pc::block_diagonal< Matrix >::adjoint_solve ( VecX & x,
const VecB & b ) const
inline

Solve M^H x = b, block by block.

This used to delegate to solve(), commented "approximate". It is not an approximation: a diagonal block of a non-symmetric A is itself non-symmetric, so the wrong operator was applied outright. bicg and qmr are the only callers and both failed to converge (#394).

◆ solve()

template<FieldMatrix Matrix>
template<typename VecX, typename VecB>
void mtl::itl::pc::block_diagonal< Matrix >::solve ( VecX & x,
const VecB & b ) const
inline

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