Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
solver_CGNR.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_CGNR_INCLUDED
15 #define SOLVER_CGNR_INCLUDED
16 
17 #include "solver_CG.h"
18 
20 
35 class Solver_CGNR : public Solver_CG
36 {
37  private:
39 
40  public:
41  static const std::string class_name;
42 
44  : Solver_CG(fopr) {}
45 
47  : Solver_CG(fopr.get()) {}
48 
50 
51  void set_parameters(const Parameters& params);
52 
53  void solve(Field& solution, const Field& source, int& Nconv, double& diff);
54 
55  Fopr *get_fopr() { return this->Solver_CG::get_fopr(); }
56 
57  double flop_count();
58 
59 #ifdef USE_FACTORY
60  private:
61  static Solver *create_object(Fopr *fopr)
62  {
63  return new Solver_CGNR(fopr);
64  }
65 
66  public:
67  static bool register_factory()
68  {
69  return Solver::Factory::Register("CGNR", create_object);
70  }
71 #endif
72 };
73 #endif
Fopr * get_fopr()
Definition: solver_CG.h:83
Solver_CGNR(Fopr *fopr)
Definition: solver_CGNR.h:43
Field m_b2
Definition: solver_CGNR.h:38
Container of Field-type object.
Definition: field.h:45
void set_parameters(const Parameters &params)
Definition: solver_CGNR.cpp:26
Class for parameters.
Definition: parameters.h:46
Standard Conjugate Gradient solver algorithm.
Definition: solver_CG.h:38
Fopr * get_fopr()
Definition: solver_CGNR.h:55
Solver_CGNR(unique_ptr< Fopr > &fopr)
Definition: solver_CGNR.h:46
static const std::string class_name
Definition: solver_CGNR.h:41
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Definition: solver_CGNR.cpp:33
Base class for linear solver class family.
Definition: solver.h:36
CGNR solver.
Definition: solver_CGNR.h:35
double flop_count()
Definition: solver_CGNR.cpp:85
Base class of fermion operator family.
Definition: fopr.h:46