PARALUTION  1.0.0
PARALUTION
amg.hpp
Go to the documentation of this file.
1 #ifndef PARALUTION_AMG_HPP_
2 #define PARALUTION_AMG_HPP_
3 
4 #include "../solver.hpp"
5 #include "base_amg.hpp"
6 
7 #include <vector>
8 
9 namespace paralution {
10 
11 enum _interp {
14 };
15 
16 template <class OperatorType, class VectorType, typename ValueType>
17 class AMG : public BaseAMG<OperatorType, VectorType, ValueType> {
18 
19 public:
20 
21  AMG();
22  virtual ~AMG();
23 
24  virtual void Print(void) const;
25 
27  virtual void BuildSmoothers(void);
28 
30  virtual void SetCouplingStrength(const ValueType eps);
32  virtual void SetInterpolation(_interp interpType);
34  virtual void SetInterpRelax(const ValueType relax);
36  virtual void SetOverInterp(const ValueType overInterp);
37 
38 protected:
39 
41  virtual void Aggregate(const OperatorType &op,
44  OperatorType *coarse);
45 
46  virtual void PrintStart_(void) const;
47  virtual void PrintEnd_(void) const;
48 
49 private:
50 
52  ValueType eps_;
53 
55  ValueType relax_;
56 
58  ValueType over_interp_;
59 
62 
63 };
64 
65 
66 }
67 
68 #endif // PARALUTION_AMG_HPP_
_interp
Definition: amg.hpp:11
virtual void SetInterpRelax(const ValueType relax)
Sets the relaxation parameter for smoothed aggregation.
Definition: amg.cpp:100
_interp interp_type_
interpolation type for grid transfer operators
Definition: amg.hpp:61
Definition: amg.hpp:17
virtual void SetOverInterp(const ValueType overInterp)
Sets over-interpolation parameter for aggregation.
Definition: amg.cpp:110
ValueType over_interp_
Over-interpolation parameter for aggregation.
Definition: amg.hpp:58
ValueType relax_
Relaxation parameter for smoothed aggregation.
Definition: amg.hpp:55
Definition: amg.hpp:13
virtual void PrintEnd_(void) const
Print ending msg of the solver.
Definition: amg.cpp:86
virtual void SetCouplingStrength(const ValueType eps)
Sets coupling strength.
Definition: amg.cpp:120
Definition: amg.hpp:12
Definition: base_amg.hpp:12
virtual void SetInterpolation(_interp interpType)
Sets the interpolation type.
Definition: amg.cpp:93
virtual void Aggregate(const OperatorType &op, Operator< ValueType > *pro, Operator< ValueType > *res, OperatorType *coarse)
Constructs the prolongation, restriction and coarse operator.
Definition: amg.cpp:163
Operator class defines the generic interface for applying an operator (e.g. matrix, stencil) from/to global and local vectors.
Definition: operator.hpp:19
Definition: backend_manager.cpp:43
virtual void PrintStart_(void) const
Print starting msg of the solver.
Definition: amg.cpp:62
AMG()
Definition: amg.cpp:15
ValueType eps_
Coupling strength.
Definition: amg.hpp:52
virtual ~AMG()
Definition: amg.cpp:29
virtual void BuildSmoothers(void)
Build AMG smoothers.
Definition: amg.cpp:130
virtual void Print(void) const
Print information about the solver.
Definition: amg.cpp:39