NUMCXX  0.13.20181108
Numerical library for small projects and teaching purposes
tprecon-ilu.hxx
Go to the documentation of this file.
1 #ifndef TPRECON_ILU_HXX
7 #define TPRECON_ILU_HXX
8 
9 #include "tsparsematrix.hxx"
10 
11 namespace numcxx
12 {
13 
15  template<typename T>
16  class TPreconILU: public TLinSolver<T>
17  {
18 
19  public:
20  std::shared_ptr< TArray1<T> > pInvDiag;
21  std::shared_ptr< TArray1<int> > pDiagIdx;
22 
24  TPreconILU(const std::shared_ptr<TSparseMatrix<T>> pA);
26 
28 
30  static std::shared_ptr<TPreconILU<T>> create(const std::shared_ptr<TSparseMatrix<T>> pA);
31 
33  void update(TSparseMatrix<T> &A);
34 
36  void solve(TArray<T> & Sol, const TArray<T> & Rhs) const;
37 
38  private:
39  std::shared_ptr<TArray1<T>> pA;
40  std::shared_ptr<TArray1<int>> pIA;
41  std::shared_ptr<TArray1<int>> pJA;
42  };
43 }
44 
45 #include "tprecon-ilu.ixx"
46 
47 #endif
48 
Sparse matrix class using CRS storage scheme.
std::shared_ptr< TArray1< T > > pA
Definition: tprecon-ilu.hxx:39
std::shared_ptr< TArray1< int > > pIA
Definition: tprecon-ilu.hxx:40
std::shared_ptr< TArray1< T > > pInvDiag
Definition: tprecon-ilu.hxx:20
TPreconILU(const std::shared_ptr< TSparseMatrix< T >> pA)
Create Preconditioner.
Definition: tprecon-ilu.ixx:7
TArray is the common template base class for arrays and dense matrices of the numcxx project...
Definition: tarray.hxx:17
static std::shared_ptr< TPreconILU< T > > create(const std::shared_ptr< TSparseMatrix< T >> pA)
Create preconditioner.
Definition: tprecon-ilu.ixx:24
Base class for linear solvers and preconditioners.
Definition: tarray.hxx:275
ILU preconditioner class.
Definition: tprecon-ilu.hxx:16
std::shared_ptr< TArray1< int > > pJA
Definition: tprecon-ilu.hxx:41
virtual void update(void)
Definition: tarray.hxx:280
Header for class numcxx::TSparseMatrix.
void solve(TArray< T > &Sol, const TArray< T > &Rhs) const
Solve preconditioning system.
Definition: tprecon-ilu.ixx:80
Numcxx template library.
Definition: expression.ixx:41
std::shared_ptr< TArray1< int > > pDiagIdx
Definition: tprecon-ilu.hxx:21