NUMCXX  0.13.20181108
Numerical library for small projects and teaching purposes
tsolver-umfpack.hxx
Go to the documentation of this file.
1 #ifndef TSOLVER_UMFPACK_HXX
7 #define TSOLVER_UMFPACK_HXX
8 
9 #include "tsparsematrix.hxx"
10 
11 namespace numcxx
12 {
13 
19  template<typename T>
20  class TSolverUMFPACK: public TLinSolver<T>
21  {
23  const std::shared_ptr< TSparseMatrix<T> > pMatrix;
24 
26  void * Symbolic;
27 
29  void * Numeric;
30 
32  std::shared_ptr<TArray1<int>> pIA;
33 
35  std::shared_ptr<TArray1<int>> pJA;
36 
38  std::shared_ptr<TArray1 <T> > pA;
39 
40  public:
42 
44  TSolverUMFPACK(const std::shared_ptr<TSparseMatrix<T>> pA);
45 
48 
49  TSolverUMFPACK(const TSolverUMFPACK<T>& A)=delete;
50 
53 
54  static std::shared_ptr<TSolverUMFPACK<T>> create(const std::shared_ptr<TSparseMatrix<T>> pA);
55 
57  void update();
58 
60  void update(const TSparseMatrix<T>&A);
61 
62 
64  void solve( TArray<T> & Sol, const TArray<T> & Rhs);
65 
66  void solve( std::shared_ptr< TArray<T> > Sol, const std::shared_ptr<TArray<T> > Rhs) {solve(*Sol,*Rhs);};
67 
68  };
69 }
70 
71 #include "tsolver-umfpack.ixx"
72 
73 #endif
74 
static std::shared_ptr< TSolverUMFPACK< T > > create(const std::shared_ptr< TSparseMatrix< T >> pA)
Create LU factorization class.
void solve(std::shared_ptr< TArray< T > > Sol, const std::shared_ptr< TArray< T > > Rhs)
std::shared_ptr< TArray1< int > > pIA
Row pointer of matrix.
Sparse matrix class using CRS storage scheme.
const std::shared_ptr< TSparseMatrix< T > > pMatrix
The corresponding matrix.
TArray is the common template base class for arrays and dense matrices of the numcxx project...
Definition: tarray.hxx:17
void solve(TArray< T > &Sol, const TArray< T > &Rhs)
Solve LU factorized system.
Base class for linear solvers and preconditioners.
Definition: tarray.hxx:275
std::shared_ptr< TArray1< int > > pJA
Column indices.
Header for class numcxx::TSparseMatrix.
Numcxx template library.
Definition: expression.ixx:41
std::shared_ptr< TArray1< T > > pA
Entries.
Bridge class for using umfpack as solver for vmatrix.
void * Numeric
Pointer to numeric factorization data.
Inline method definitions for class numcxx::TSolverUMFPACK.
void * Symbolic
Pointer to symbolic factorization data.
void update()
Perform actual computation of LU factorization.