12#ifndef TBCI_SOLVER_DILUPRECOND_H
13#define TBCI_SOLVER_DILUPRECOND_H
15#include "tbci/solver/precond.h"
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))
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);
const Vector< T > const Vector< T > & x
#define BCHK(cond, exc, txt, ind, rtval)
#define LIKELY(expr)
branch prediction note that we sometimes on purpose mark the unlikely possibility likely and vice ver...
#define BCHKNR(cond, exc, txt, ind)
provides basic Vector functionality but arithmetic operators (+=, - , *, /...).
unsigned long size() const HOT
tbci_traits< T >::const_refval_type get(const unsigned long idx) const HOT
The class BdMatrix is an implementation to store and do operations on sparse Matrices with a band str...
BVector< T * > bdiag
pointers to upper and lower diagonals
BVector< unsigned > diagconf
configuration
DILU_BdMatrixPreconditioner()
TVector< T > transSolve(TVector< T > tv) const
DILU_BdMatrixPreconditioner(const BdMatrix< T > &A)
void update(const BdMatrix< T > &A)
~DILU_BdMatrixPreconditioner()
TVector< T > transSolve(const Vector< T > &v) const
TVector< T > solve(TVector< T > x) const
TVector< T > solve(const Vector< T > &v) const
Temporary Base Class Idiom: Class TVector is used for temporary variables.