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)
86 pivots.set(i) = A.
diag[
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>
111 for (
unsigned int i = 0;
i < dimension; ++
i)
#define BCHKNR(cond, exc, txt, ind)
const Vector< T > const Vector< T > & x
Abstract base class for all Preconditioners.
T & setval(const unsigned long i) const
provides basic Vector functionality but arithmetic operators (+=, - , *, /...).
TVector< T > transSolve(const Vector< T > &v) const
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()
DILU_BdMatrixPreconditioner()
TVector< T > solve(TVector< T > x) const
tbci_traits< T >::const_refval_type get(const unsigned long idx) const HOT
TVector< T > transSolve(TVector< T > tv) const
unsigned long size() const
BVector< unsigned > diagconf
configuration
Temporary Base Class Idiom: Class TVector is used for temporary variables.
const Vector< T > Vector< T > Vector< T > Vector< T > & y
const Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > Vector< T > long int int char v
< find minimun of func on grid with resolution res
#define LIKELY(expr)
branch prediction note that we sometimes on purpose mark the unlikely possibility likely and vice ver...
TVector< T > solve(const Vector< T > &v) const