Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
source_Exponential.h
Go to the documentation of this file.
1 
14 #ifndef SOURCE_EXPONENTIAL_INCLUDED
15 #define SOURCE_EXPONENTIAL_INCLUDED
16 
17 #include "source.h"
18 
19 #include "Field/index_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
24 
26 
36 class Source_Exponential : public Source
37 {
38  public:
39  static const std::string class_name;
40 
41  private:
43  std::vector<int> m_source_position;
44  double m_slope, m_power;
45  bool m_in_node;
47 
48  public:
50 
51  void set_parameters(const Parameters& params);
52  void set_parameters(const std::vector<int>& source_position,
53  const double slope, const double power);
54 
55  void set(Field& v, const int idx);
56  void set(Field& v, const int i_color, const int i_spin);
57  void set_all_color(Field& v, const int i_spin);
58  void set_all_color_spin(Field& v);
59 
60 #ifdef USE_FACTORY
61  private:
62  static Source *create_object()
63  {
64  return new Source_Exponential();
65  }
66 
67  public:
68  static bool register_factory()
69  {
70  return Source::Factory::Register("Exponential", create_object);
71  }
72 #endif
73 };
74 #endif /* SOURCE_EXPONENTIAL_INCLUDED */
BridgeIO vout
Definition: bridgeIO.cpp:503
Container of Field-type object.
Definition: field.h:45
Class for parameters.
Definition: parameters.h:46
void set(Field &v, const int idx)
Lexical site index.
Definition: index_lex.h:34
static const std::string class_name
Exponentially smeared source for 4-spinor fermion.
std::vector< int > m_source_position
void set_all_color_spin(Field &v)
void set_parameters(const Parameters &params)
Base class of source for a linear solver.
Definition: source.h:37
void set_all_color(Field &v, const int i_spin)