PARALUTION  1.0.0
PARALUTION
bicgstab.hpp
Go to the documentation of this file.
1 #ifndef PARALUTION_KRYLOV_BICGSTAB_HPP_
2 #define PARALUTION_KRYLOV_BICGSTAB_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 BiCGStab : public IterativeLinearSolver<OperatorType, VectorType, ValueType> {
12 
13 public:
14 
15  BiCGStab();
16  virtual ~BiCGStab();
17 
18  virtual void Print(void) const;
19 
20  virtual void Build(void);
21  virtual void Clear(void);
22 
23 protected:
24 
25  virtual void SolveNonPrecond_(const VectorType &rhs,
26  VectorType *x);
27  virtual void SolvePrecond_(const VectorType &rhs,
28  VectorType *x);
29 
30  virtual void PrintStart_(void) const;
31  virtual void PrintEnd_(void) const;
32 
33  virtual void MoveToHostLocalData_(void);
34  virtual void MoveToAcceleratorLocalData_(void);
35 
36 private:
37 
38  VectorType r_, z_, q_;
39  VectorType p_, v_, r0_, s_, t_;
40 
41 };
42 
43 
44 }
45 
46 #endif // PARALUTION_KRYLOV_BICGSTAB_HPP_
VectorType t_
Definition: bicgstab.hpp:39
Definition: bicgstab.hpp:11
VectorType z_
Definition: bicgstab.hpp:38
virtual void PrintEnd_(void) const
Print ending msg of the solver.
Definition: bicgstab.cpp:69
virtual void PrintStart_(void) const
Print starting msg of the solver.
Definition: bicgstab.cpp:53
virtual void Print(void) const
Print information about the solver.
Definition: bicgstab.cpp:37
virtual void SolveNonPrecond_(const VectorType &rhs, VectorType *x)
Non-preconditioner solution procedure.
Definition: bicgstab.cpp:215
VectorType r_
Definition: bicgstab.hpp:38
Base class for all linear (iterative) solvers.
Definition: solver.hpp:94
virtual void SolvePrecond_(const VectorType &rhs, VectorType *x)
Preconditioned solution procedure.
Definition: bicgstab.cpp:392
VectorType p_
Definition: bicgstab.hpp:39
BiCGStab()
Definition: bicgstab.cpp:19
virtual void Build(void)
Build the solver (data allocation, structure computation, numerical computation)
Definition: bicgstab.cpp:84
VectorType r0_
Definition: bicgstab.hpp:39
virtual ~BiCGStab()
Definition: bicgstab.cpp:27
VectorType v_
Definition: bicgstab.hpp:39
virtual void Clear(void)
Clear (free all local data) the solver.
Definition: bicgstab.cpp:137
Definition: backend_manager.cpp:43
const IndexType const IndexType const IndexType const ValueType const ValueType const ValueType * x
Definition: cuda_kernels_coo.hpp:91
VectorType q_
Definition: bicgstab.hpp:38
virtual void MoveToAcceleratorLocalData_(void)
Move all local data to the accelerator.
Definition: bicgstab.cpp:192
VectorType s_
Definition: bicgstab.hpp:39
virtual void MoveToHostLocalData_(void)
Move all local data to the host.
Definition: bicgstab.cpp:169