Feellgood
Public Member Functions | Private Attributes | List of all members
algebra::BlockDiagPrecond< BS > Class Template Reference

#include <block_precond.h>

Public Member Functions

 BlockDiagPrecond (const SparseMatrix &A, const int nbBlocks, const std::vector< int > &ld)
 
void apply (const std::vector< double > &x, std::vector< double > &y) const
 

Private Attributes

std::vector< Eigen::Matrix< double, BS, BS > > inv
 

Detailed Description

template<int BS>
class algebra::BlockDiagPrecond< BS >

block diagonal preconditioner: inverse of the BS x BS diagonal block of each node, for a system whose unknowns are numbered node by node (unknown BS*i + d is the component d of the node i). For the spin diffusion problem (BS = 3), this block holds the relaxation and the precession coupling s x u, local to each node, which the diagonal preconditioner misses (same preconditioner as the BLOCK3 of st-feeLLGood). The rows and columns of the Dirichlet components are replaced by the identity before inversion, so that the preconditioner does not mix the imposed components with the free ones.

Constructor & Destructor Documentation

◆ BlockDiagPrecond()

template<int BS>
algebra::BlockDiagPrecond< BS >::BlockDiagPrecond ( const SparseMatrix &  A,
const int  nbBlocks,
const std::vector< int > &  ld 
)
inline

computes the inverse of the diagonal block of each node of A; ld: indices of the Dirichlet components

Member Function Documentation

◆ apply()

template<int BS>
void algebra::BlockDiagPrecond< BS >::apply ( const std::vector< double > &  x,
std::vector< double > &  y 
) const
inline

y = M x, M being the block diagonal preconditioner

Member Data Documentation

◆ inv

template<int BS>
std::vector<Eigen::Matrix<double, BS, BS> > algebra::BlockDiagPrecond< BS >::inv
private

inverses of the diagonal blocks


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