26 bool init = Source::Factory::Register(
"MomentumWall", create_object);
37 const string str_vlevel = params.
get_string(
"verbose_level");
42 std::vector<int> source_position;
43 std::vector<int> source_momentum;
60 const std::vector<int>& source_momentum)
64 const int t_dir = Ndim - 1;
67 std::vector<int> Lsize(Ndim);
78 vout.
general(
m_vl,
"Source for spinor field - momentum wall smeared:\n");
79 for (
int mu = 0; mu < Ndim; ++mu) {
81 mu, source_position[mu]);
83 for (
int mu = 0; mu < Ndim - 1; ++mu) {
85 mu, source_momentum[mu]);
91 for (
int mu = 0; mu < Ndim; ++mu) {
103 for (
int mu = 0; mu < Ndim; ++mu) {
130 const int t_dir = Ndim - 1;
137 const int Lvol3 = Lx * Ly * Lz;
145 static const double PI = 4.0 * atan(1.0);
146 std::vector<double> p_unit(Ndim - 1);
152 std::vector<int> ipe(Ndim - 1);
163 for (
int z = 0; z < Nz; ++z) {
164 for (
int y = 0; y < Ny; ++y) {
165 for (
int x = 0; x < Nx; ++x) {
168 int x_global = x + ipe[x_dir] * Nx;
169 int y_global = y + ipe[y_dir] * Ny;
170 int z_global = z + ipe[z_dir] * Nz;
176 double theta = p_x + p_y + p_z;
179 src.
set(2 * idx + 0, site, 0, cos(theta) / Lvol3);
180 src.
set(2 * idx + 1, site, 0, sin(theta) / Lvol3);
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< int > 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)
void crucial(const char *format,...)
Bridge::VerboseLevel m_vl
int non_negative(const int v)
Base class of source for a linear solver.
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
std::vector< int > m_source_position
void set_parameters(const Parameters ¶ms)
static VerboseLevel set_verbose_level(const std::string &str)