16 #ifdef USE_PARAMETERS_FACTORY
29 bool init = Source::Factory::Register(
"MomentumWall", create_object);
44 #ifdef USE_PARAMETERS_FACTORY
59 const string str_vlevel = params.
get_string(
"verbose_level");
64 std::vector<int> source_position;
65 std::vector<double> source_momentum;
82 const std::vector<double>& source_momentum)
88 std::vector<int> Lsize(Ndim);
96 std::vector<int> Nsize(Ndim);
102 const int t_dir = Ndim - 1;
105 vout.
general(
m_vl,
"Source for spinor field - momentum wall smeared:\n");
106 for (
int mu = 0; mu < Ndim; ++mu) {
108 mu, source_position[mu]);
110 for (
int mu = 0; mu < Ndim - 1; ++mu) {
112 mu, source_momentum[mu]);
118 for (
int mu = 0; mu < Ndim; ++mu) {
130 for (
int mu = 0; mu < Ndim; ++mu) {
159 const int Lvol3 = Lx * Ly * Lz;
162 std::vector<int> Nsize(Ndim);
175 for (
int z = 0; z < Nsize[2]; ++z) {
176 for (
int y = 0; y < Nsize[1]; ++y) {
177 for (
int x = 0; x < Nsize[0]; ++x) {
190 src.
set(2 * j + 0, isite, 0, cos(theta) / Lvol3);
191 src.
set(2 * j + 1, isite, 0, sin(theta) / Lvol3);
void Register_int_vector(const string &, const std::vector< int > &)
void Register_string(const string &, const string &)
Momentum wall source for 4-spinor fermion.
void set(const int jin, const int site, const int jex, double v)
int site(const int &x, const int &y, const int &z, const int &t) const
std::vector< double > m_source_momentum
void general(const char *format,...)
static const std::string class_name
Container of Field-type object.
static int ipe(const int dir)
logical coordinate of current proc.
void set(Field &v, int j)
Parameters_Source_MomentumWall()
void crucial(const char *format,...)
static bool Register(const std::string &realm, const creator_callback &cb)
void Register_double_vector(const string &, const std::vector< double > &)
Bridge::VerboseLevel m_vl
int non_negative(const int v)
int fetch_double_vector(const string &key, std::vector< double > &val) const
Base class of sources for a linear solver.
string get_string(const string &key) const
std::vector< int > m_source_position
void set_parameters(const Parameters ¶ms)
static VerboseLevel set_verbose_level(const std::string &str)
int fetch_int_vector(const string &key, std::vector< int > &val) const