Bridge++  Ver. 2.0.2
source_Wall.h
Go to the documentation of this file.
1 
14 #ifndef SOURCE_WALL_INCLUDED
15 #define SOURCE_WALL_INCLUDED
16 
17 #include "source.h"
18 #include "Field/index_lex.h"
19 
20 #include "IO/bridgeIO.h"
21 using Bridge::vout;
22 
24 
32 class Source_Wall : public Source
33 {
34  public:
35  static const std::string class_name;
36 
37  private:
39 
41  std::vector<int> m_source_position;
42  bool m_in_node;
43 
44  public:
45  Source_Wall() : m_vl(CommonParameters::Vlevel()) {}
46 
47  Source_Wall(const Parameters& params)
48  : m_vl(CommonParameters::Vlevel())
49  {
50  set_parameters(params);
51  }
52 
53  void set_parameters(const Parameters& params);
54  void set_parameters(const std::vector<int>& source_position);
55 
56  void get_parameters(Parameters& params) const;
57 
58  void set(Field& v, const int idx);
59  void set(Field& v, const int i_color, const int i_spin);
60  void set_all_color(Field& v, const int i_spin);
61  void set_all_color_spin(Field& v);
62 
63 #ifdef USE_FACTORY
64  private:
65  static Source *create_object()
66  {
67  return new Source_Wall();
68  }
69 
70  static Source *create_object_with_params(const Parameters& params)
71  {
72  return new Source_Wall(params);
73  }
74 
75  public:
76  static bool register_factory()
77  {
78  bool init = true;
79  init &= Source::Factory::Register("Wall", create_object);
80  init &= Source::Factory_params::Register("Wall", create_object_with_params);
81  return init;
82  }
83 #endif
84 };
85 #endif /* SOURCE_WALL_INCLUDED */
Source_Wall::set
void set(Field &v, const int idx)
Definition: source_Wall.cpp:116
Source_Wall::set_all_color
void set_all_color(Field &v, const int i_spin)
Definition: source_Wall.cpp:166
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Index_lex
Lexical site index.
Definition: index_lex.h:34
Source_Wall
Wall source for 4-spinor fermion.
Definition: source_Wall.h:32
Parameters
Class for parameters.
Definition: parameters.h:46
Source_Wall::m_in_node
bool m_in_node
Definition: source_Wall.h:42
Source_Wall::m_vl
Bridge::VerboseLevel m_vl
Definition: source_Wall.h:38
Source_Wall::Source_Wall
Source_Wall(const Parameters &params)
Definition: source_Wall.h:47
Source_Wall::get_parameters
void get_parameters(Parameters &params) const
Definition: source_Wall.cpp:49
Source_Wall::m_source_position
std::vector< int > m_source_position
Definition: source_Wall.h:41
Source_Wall::Source_Wall
Source_Wall()
Definition: source_Wall.h:45
source.h
Source
Base class of source for a linear solver.
Definition: source.h:37
Source_Wall::set_all_color_spin
void set_all_color_spin(Field &v)
Definition: source_Wall.cpp:212
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_Wall::m_index
Index_lex m_index
Definition: source_Wall.h:40
index_lex.h
Field
Container of Field-type object.
Definition: field.h:46
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Source_Wall::set_parameters
void set_parameters(const Parameters &params)
Definition: source_Wall.cpp:25
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Source_Wall::class_name
static const std::string class_name
Definition: source_Wall.h:35