Class documentation of Concepts

Loading...
Searching...
No Matches
bicgstabFabric.hh
Go to the documentation of this file.
1
6#ifndef BiCGStabfabric_hh
7#define BiCGStabfabric_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 "bicgstab.hh"
17#include "solverFabric.hh"
18
19namespace concepts {
20
21 // ************************************************************** BiCGStabFabric **
22
26 template<typename F, typename G = F>
27 class BiCGStabFabric : public PrecondSolverFabric<F,G> {
28 public:
36 int maxit = 0, bool relres = false, bool throwing = true)
37 : maxeps_(maxeps), maxit_(maxit), relres_(relres),
38 throwing_(throwing) {}
40 return NULL;
41 }
42 virtual Operator<F>* operator()(Operator<F>& matrix) {
43 return new BiCGStab<F>(matrix, maxeps_, maxit_, relres_, throwing_);
44 }
46 {
47 return new BiCGStab<F>(matrix, precond, maxeps_, maxit_, relres_,
48 throwing_);
49 }
50 protected:
51 virtual std::ostream& info(std::ostream& os) const {
52 return os << concepts::typeOf(*this) << "(maxeps = " << maxeps_ << ", maxit = "
53 << maxit_ << ", relres = " << relres_ << ')';
54 }
55 private:
57 Real maxeps_;
59 int maxit_;
61 bool relres_;
65 bool throwing_;
66 };
67
68} // concepts
69
70#endif // BiCGStabfabric_hh
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
BiCGStabFabric(Real maxeps=EPS, int maxit=0, bool relres=false, bool throwing=true)
virtual Operator< F > * operator()(Operator< F > &matrix, Operator< G > &precond)
virtual Operator< F > * operator()()
std::string typeOf(const T &t)
Definition output.hh:43
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320