Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
solver_CGNE.h
Go to the documentation of this file.
1 
14 #ifndef SOLVER_CGNE_INCLUDED
15 #define SOLVER_CGNE_INCLUDED
16 
17 #include "solver_CG.h"
18 
20 
35 class Solver_CGNE : 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_CGNE(fopr);
64  }
65 
66  public:
67  static bool register_factory()
68  {
69  return Solver::Factory::Register("CGNE", create_object);
70  }
71 #endif
72 };
73 #endif
Fopr * get_fopr()
Definition: solver_CG.h:83
static const std::string class_name
Definition: solver_CGNE.h:41
Container of Field-type object.
Definition: field.h:45
Class for parameters.
Definition: parameters.h:46
Solver_CGNE(Fopr *fopr)
Definition: solver_CGNE.h:43
Standard Conjugate Gradient solver algorithm.
Definition: solver_CG.h:38
Solver_CGNE(unique_ptr< Fopr > &fopr)
Definition: solver_CGNE.h:46
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Definition: solver_CGNE.cpp:33
void set_parameters(const Parameters &params)
Definition: solver_CGNE.cpp:26
double flop_count()
Definition: solver_CGNE.cpp:83
Base class for linear solver class family.
Definition: solver.h:36
CGNE solver.
Definition: solver_CGNE.h:35
Fopr * get_fopr()
Definition: solver_CGNE.h:55
Base class of fermion operator family.
Definition: fopr.h:46