Bridge++  Ver. 2.0.2
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 
45  std::vector<int> m_source_position;
46  double m_slope, m_power;
47  bool m_in_node;
49 
50  public:
52 
54  : m_vl(CommonParameters::Vlevel())
55  {
56  set_parameters(params);
57  }
58 
59  void set_parameters(const Parameters& params);
60  void set_parameters(const std::vector<int>& source_position,
61  const double slope, const double power);
62 
63  void get_parameters(Parameters& params) const;
64 
65  void set(Field& v, const int idx);
66  void set(Field& v, const int i_color, const int i_spin);
67  void set_all_color(Field& v, const int i_spin);
68  void set_all_color_spin(Field& v);
69 
70 #ifdef USE_FACTORY
71  private:
72  static Source *create_object()
73  {
74  return new Source_Exponential();
75  }
76 
77  static Source *create_object_with_params(const Parameters& params)
78  {
79  return new Source_Exponential(params);
80  }
81 
82  public:
83  static bool register_factory()
84  {
85  bool init = true;
86  init &= Source::Factory::Register("Exponential", create_object);
87  init &= Source::Factory_params::Register("Exponential", create_object_with_params);
88  return init;
89  }
90 #endif
91 };
92 #endif /* SOURCE_EXPONENTIAL_INCLUDED */
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Index_lex
Lexical site index.
Definition: index_lex.h:34
Parameters
Class for parameters.
Definition: parameters.h:46
Source_Exponential::m_index
Index_lex m_index
Definition: source_Exponential.h:44
Source_Exponential::Source_Exponential
Source_Exponential(const Parameters &params)
Definition: source_Exponential.h:53
Source_Exponential::Source_Exponential
Source_Exponential()
Definition: source_Exponential.h:51
source.h
Source_Exponential
Exponentially smeared source for 4-spinor fermion.
Definition: source_Exponential.h:36
Source_Exponential::set_all_color_spin
void set_all_color_spin(Field &v)
Definition: source_Exponential.cpp:294
Source
Base class of source for a linear solver.
Definition: source.h:37
Source_Exponential::m_vl
Bridge::VerboseLevel m_vl
Definition: source_Exponential.h:42
AIndex_eo_qxs::idx
int idx(const int in, const int Nin, const int ist, const int Nx2, const int Ny, const int leo, const int Nvol2, const int ex)
Definition: aindex_eo.h:27
Source_Exponential::class_name
static const std::string class_name
Definition: source_Exponential.h:39
Source_Exponential::set_parameters
void set_parameters(const Parameters &params)
Definition: source_Exponential.cpp:25
Source_Exponential::m_in_node
bool m_in_node
Definition: source_Exponential.h:47
index_lex.h
Source_Exponential::set
void set(Field &v, const int idx)
Definition: source_Exponential.cpp:210
Source_Exponential::get_parameters
void get_parameters(Parameters &params) const
Definition: source_Exponential.cpp:51
Source_Exponential::m_slope
double m_slope
Definition: source_Exponential.h:46
Source_Exponential::m_src_func
Field m_src_func
Definition: source_Exponential.h:48
Source_Exponential::m_source_position
std::vector< int > m_source_position
Definition: source_Exponential.h:45
Source_Exponential::m_power
double m_power
Definition: source_Exponential.h:46
Field
Container of Field-type object.
Definition: field.h:46
Source_Exponential::set_all_color
void set_all_color(Field &v, const int i_spin)
Definition: source_Exponential.cpp:254
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512