Class documentation of Concepts

Loading...
Searching...
No Matches
gmresFabric.hh
Go to the documentation of this file.
1
6#ifndef GMResfabric_hh
7#define GMResfabric_hh
8
9#if __GNUC__ == 2
10# include <float.h>
11# define EPS DBL_EPSILON
12#else
13# include <limits>
14# define EPS std::numeric_limits<double>::epsilon()
15#endif
16#include "operator/gmres.hh"
18
19namespace concepts {
20
21 // *********************************************************** GMResFabric **
22
26 template<typename F>
27 class GMResFabric : public SolverFabric<F> {
28 public:
36 int maxit = 0, uint rs = 0, uint relres = 0)
37 : maxeps_(maxeps), maxit_(maxit), rs_(rs), relres_(relres) {}
38 virtual Operator<F>* operator()(Operator<F>& matrix) {
39 return new GMRes<F>(matrix, maxeps_, maxit_, rs_, relres_);
40 }
41 protected:
42 virtual std::ostream& info(std::ostream& os) const {
43 return os << "GMResFabric(maxeps = " << maxeps_ << ", maxit = "
44 << maxit_ << ", rs = " << rs_ << ", relres = "
45 << relres_ << ")";
46 }
47 private:
49 Real maxeps_;
51 int maxit_;
53 uint rs_;
55 uint relres_;
56 };
57
58} // concepts
59
60#endif // GMResfabric_hh
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
GMResFabric(Real maxeps=EPS, int maxit=0, uint rs=0, uint relres=0)
virtual Operator< F > * operator()()=0
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320