PARALUTION  1.0.0
PARALUTION
chebyshev.hpp
Go to the documentation of this file.
1 #ifndef PARALUTION_KRYLOV_CHEBYSHEV_HPP_
2 #define PARALUTION_KRYLOV_CHEBYSHEV_HPP_
3 
4 #include "solver.hpp"
5 
6 #include <vector>
7 
8 namespace paralution {
9 
10 template <class OperatorType, class VectorType, typename ValueType>
11 class Chebyshev : public IterativeLinearSolver<OperatorType, VectorType, ValueType> {
12 
13 public:
14 
15  Chebyshev();
16  virtual ~Chebyshev();
17 
18  virtual void Print(void) const;
19 
20  void Set(const ValueType lambda_min, const ValueType lambda_max);
21 
22  virtual void Build(void);
23  virtual void Clear(void);
24 
25 protected:
26 
27  virtual void SolveNonPrecond_(const VectorType &rhs,
28  VectorType *x);
29  virtual void SolvePrecond_(const VectorType &rhs,
30  VectorType *x);
31 
32  virtual void PrintStart_(void) const;
33  virtual void PrintEnd_(void) const;
34 
35  virtual void MoveToHostLocalData_(void);
36  virtual void MoveToAcceleratorLocalData_(void);
37 
38 private:
39 
42 
43  VectorType r_, z_;
44  VectorType p_;
45 
46 };
47 
48 
49 }
50 
51 #endif // PARALUTION_KRYLOV_CHEBYSHEV_HPP_
VectorType z_
Definition: chebyshev.hpp:43
virtual void PrintStart_(void) const
Print starting msg of the solver.
Definition: chebyshev.cpp:72
Definition: chebyshev.hpp:11
virtual void Build(void)
Build the solver (data allocation, structure computation, numerical computation)
Definition: chebyshev.cpp:103
virtual ~Chebyshev()
Definition: chebyshev.cpp:28
VectorType r_
Definition: chebyshev.hpp:43
bool init_lambda_
Definition: chebyshev.hpp:40
virtual void MoveToHostLocalData_(void)
Move all local data to the host.
Definition: chebyshev.cpp:170
Base class for all linear (iterative) solvers.
Definition: solver.hpp:94
virtual void SolvePrecond_(const VectorType &rhs, VectorType *x)
Preconditioned solution procedure.
Definition: chebyshev.cpp:283
VectorType p_
Definition: chebyshev.hpp:44
void Set(const ValueType lambda_min, const ValueType lambda_max)
Definition: chebyshev.cpp:38
ValueType lambda_max_
Definition: chebyshev.hpp:41
virtual void PrintEnd_(void) const
Print ending msg of the solver.
Definition: chebyshev.cpp:88
Definition: backend_manager.cpp:43
virtual void Print(void) const
Print information about the solver.
Definition: chebyshev.cpp:54
const IndexType const IndexType const IndexType const ValueType const ValueType const ValueType * x
Definition: cuda_kernels_coo.hpp:91
virtual void Clear(void)
Clear (free all local data) the solver.
Definition: chebyshev.cpp:144
Chebyshev()
Definition: chebyshev.cpp:18
ValueType lambda_min_
Definition: chebyshev.hpp:41
virtual void MoveToAcceleratorLocalData_(void)
Move all local data to the accelerator.
Definition: chebyshev.cpp:190
virtual void SolveNonPrecond_(const VectorType &rhs, VectorType *x)
Non-preconditioner solution procedure.
Definition: chebyshev.cpp:209