12 #ifndef TBCI_SOLVER_DILUPRECOND_H 13 #define TBCI_SOLVER_DILUPRECOND_H 15 #include "tbci/solver/precond.h" 24 template <
typename T>
class BdMatrix;
69 unsigned int dimension;
80 if (pivots.size() != dimension)
81 pivots.resize(dimension);
82 BCHK(pivots.size() == 0,
VecErr,
"Null ptr in DILUBdMPrecCond::update", 0, );
85 for (
i = 0;
i < dimension; ++
i)
87 for (
i = 0;
i < dimension; ++
i) {
94 for (
unsigned j = 0; j < ds; j++) {
96 if (
LIKELY(df < (
signed)dimension - (
signed)
i))
102 template <
typename T>
107 BCHKNR(dimension !=
y.size(),
VecErr,
"DILU_BdMPreCond::solve: Dimension mismatch",
y.size());
111 for (
unsigned int i = 0;
i < dimension; ++
i)
112 y.setval(
i) *= pivots.get(
i);
#define BCHKNR(cond, exc, txt, ind)
Abstract base class for all Preconditioners.
provides basic Vector functionality but arithmetic operators (+=, - , *, /...).
The class BdMatrix is an implementation to store and do operations on sparse Matrices with a band str...
DILU_BdMatrixPreconditioner(const BdMatrix< T > &A)
unsigned long size() const HOT
void update(const BdMatrix< T > &A)
BVector< T * > bdiag
pointers to upper and lower diagonals
#define BCHK(cond, exc, txt, ind, rtval)
~DILU_BdMatrixPreconditioner()
const Vector< T > const Vector< T > & x
TVector< T > transSolve(TVector< T > tv) const
DILU_BdMatrixPreconditioner()
TVector< T > transSolve(const Vector< T > &v) const
TVector< T > solve(TVector< T > x) const
tbci_traits< T >::const_refval_type get(const unsigned long idx) const HOT
BVector< unsigned > diagconf
configuration
TVector< T > solve(const Vector< T > &v) const
Temporary Base Class Idiom: Class TVector is used for temporary variables.
#define LIKELY(expr)
branch prediction note that we sometimes on purpose mark the unlikely possibility likely and vice ver...