Bridge++  Ver. 2.0.2
source_MomentumWall.h
Go to the documentation of this file.
1 
14 #ifndef SOURCE_MOMENTUM_WALL_INCLUDED
15 #define SOURCE_MOMENTUM_WALL_INCLUDED
16 
17 #include "source.h"
18 
19 #include "Field/index_lex.h"
20 
21 #include "IO/bridgeIO.h"
22 using Bridge::vout;
23 
25 
37 {
38  public:
39  static const std::string class_name;
40 
41  private:
43 
45  std::vector<int> m_source_position;
46  std::vector<int> m_source_momentum;
47  bool m_in_node;
48 
49  public:
51 
53  : m_vl(CommonParameters::Vlevel())
54  {
55  set_parameters(params);
56  }
57 
58  void set_parameters(const Parameters& params);
59  void set_parameters(const std::vector<int>& source_position,
60  const std::vector<int>& source_momentum);
61 
62  void get_parameters(Parameters& params) const;
63 
64  void set(Field& v, const int idx);
65  void set(Field& v, const int i_color, const int i_spin);
66  void set_all_color(Field& v, const int i_spin);
67  void set_all_color_spin(Field& v);
68 
69 #ifdef USE_FACTORY
70  private:
71  static Source *create_object()
72  {
73  return new Source_MomentumWall();
74  }
75 
76  static Source *create_object_with_params(const Parameters& params)
77  {
78  return new Source_MomentumWall(params);
79  }
80 
81  public:
82  static bool register_factory()
83  {
84  bool init = true;
85  init &= Source::Factory::Register("MomentumWall", create_object);
86  init &= Source::Factory_params::Register("MomentumWall", create_object_with_params);
87  return init;
88  }
89 #endif
90 };
91 #endif /* SOURCE_MOMENTUM_WALL_INCLUDED */
Source_MomentumWall
Momentum wall source for 4-spinor fermion.
Definition: source_MomentumWall.h:36
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_MomentumWall::set_all_color
void set_all_color(Field &v, const int i_spin)
Definition: source_MomentumWall.cpp:203
Source_MomentumWall::Source_MomentumWall
Source_MomentumWall()
Definition: source_MomentumWall.h:50
source.h
Source_MomentumWall::m_vl
Bridge::VerboseLevel m_vl
Definition: source_MomentumWall.h:42
Source
Base class of source for a linear solver.
Definition: source.h:37
Source_MomentumWall::set_all_color_spin
void set_all_color_spin(Field &v)
Definition: source_MomentumWall.cpp:276
Source_MomentumWall::m_index
Index_lex m_index
Definition: source_MomentumWall.h:44
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_MomentumWall::m_source_position
std::vector< int > m_source_position
Definition: source_MomentumWall.h:45
index_lex.h
Source_MomentumWall::Source_MomentumWall
Source_MomentumWall(const Parameters &params)
Definition: source_MomentumWall.h:52
Source_MomentumWall::class_name
static const std::string class_name
Definition: source_MomentumWall.h:39
Source_MomentumWall::m_source_momentum
std::vector< int > m_source_momentum
Definition: source_MomentumWall.h:46
Source_MomentumWall::set_parameters
void set_parameters(const Parameters &params)
Definition: source_MomentumWall.cpp:25
Source_MomentumWall::m_in_node
bool m_in_node
Definition: source_MomentumWall.h:47
Field
Container of Field-type object.
Definition: field.h:46
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Source_MomentumWall::get_parameters
void get_parameters(Parameters &params) const
Definition: source_MomentumWall.cpp:50
Source_MomentumWall::set
void set(Field &v, const int idx)
Definition: source_MomentumWall.cpp:124
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512