Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  std::vector<int> m_source_position;
44  std::vector<int> m_source_momentum;
45  bool m_in_node;
46 
47  public:
49 
50  void set_parameters(const Parameters& params);
51  void set_parameters(const std::vector<int>& source_position,
52  const std::vector<int>& source_momentum);
53 
54  void set(Field& v, const int idx);
55  void set(Field& v, const int i_color, const int i_spin);
56  void set_all_color(Field& v, const int i_spin);
57  void set_all_color_spin(Field& v);
58 
59 #ifdef USE_FACTORY
60  private:
61  static Source *create_object()
62  {
63  return new Source_MomentumWall();
64  }
65 
66  public:
67  static bool register_factory()
68  {
69  return Source::Factory::Register("MomentumWall", create_object);
70  }
71 #endif
72 };
73 #endif /* SOURCE_MOMENTUM_WALL_INCLUDED */
BridgeIO vout
Definition: bridgeIO.cpp:503
Momentum wall source for 4-spinor fermion.
void set_all_color_spin(Field &v)
std::vector< int > m_source_momentum
static const std::string class_name
Container of Field-type object.
Definition: field.h:45
Class for parameters.
Definition: parameters.h:46
void set_all_color(Field &v, const int i_spin)
Lexical site index.
Definition: index_lex.h:34
Base class of source for a linear solver.
Definition: source.h:37
std::vector< int > m_source_position
void set_parameters(const Parameters &params)
void set(Field &v, const int idx)