NUMCXX  0.13.20181108
Numerical library for small projects and teaching purposes
tprecon-jacobi.hxx
Go to the documentation of this file.
1 #ifndef TPRECON_JACOBI_HXX
7 #define TPRECON_JACOBI_HXX
8 
9 #include "tsparsematrix.hxx"
10 
11 namespace numcxx
12 {
13 
15  template<typename T>
16  class TPreconJacobi: public TLinSolver<T>
17  {
18 
19  public:
20  std::shared_ptr< TArray1<T> > pInvDiag;
21 
23  TPreconJacobi(const std::shared_ptr<TSparseMatrix<T>> pA);
25 
27 
29  static std::shared_ptr<TPreconJacobi<T>> create(const std::shared_ptr<TSparseMatrix<T>> pA);
30 
32  void update(TSparseMatrix<T> &A);
33 
35  void solve( TArray<T> & Sol, const TArray<T> & Rhs) const;
36  };
37 }
38 
39 #include "tprecon-jacobi.ixx"
40 
41 #endif
42 
static std::shared_ptr< TPreconJacobi< T > > create(const std::shared_ptr< TSparseMatrix< T >> pA)
Create preconditioner.
Jacobi preconditioner class.
Sparse matrix class using CRS storage scheme.
void solve(TArray< T > &Sol, const TArray< T > &Rhs) const
Solve preconditioning system.
TPreconJacobi(const std::shared_ptr< TSparseMatrix< T >> pA)
Create Preconditioner.
TArray is the common template base class for arrays and dense matrices of the numcxx project...
Definition: tarray.hxx:17
Base class for linear solvers and preconditioners.
Definition: tarray.hxx:275
std::shared_ptr< TArray1< T > > pInvDiag
virtual void update(void)
Definition: tarray.hxx:280
Header for class numcxx::TSparseMatrix.
Numcxx template library.
Definition: expression.ixx:41