16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Source_Wall::register_factory();
27 const string str_vlevel = params.
get_string(
"verbose_level");
32 std::vector<int> source_position;
54 std::vector<int> Lsize(Ndim);
62 std::vector<int> Nsize(Ndim);
68 const int t_dir = Ndim - 1;
72 vout.
general(
m_vl,
" source_position[t] = %d\n", source_position[t_dir]);
86 for (
int mu = 0; mu < Ndim; ++mu) {
89 m_source_position[t_dir] = (source_position[t_dir] + Lsize[t_dir]) % Lsize[t_dir];
115 const int Lvol3 = Lx * Ly * Lz;
118 std::vector<int> Nsize(Ndim);
131 for (
int z = 0; z < Nsize[2]; ++z) {
132 for (
int y = 0; y < Nsize[1]; ++y) {
133 for (
int x = 0; x < Nsize[0]; ++x) {
137 src.
set(2 * idx, isite, 0, 1.0 / Lvol3);
149 const int idx = i_color + Nc * i_spin;
166 const int Lvol3 = Lx * Ly * Lz;
169 std::vector<int> Nsize(Ndim);
182 for (
int z = 0; z < Nsize[2]; ++z) {
183 for (
int y = 0; y < Nsize[1]; ++y) {
184 for (
int x = 0; x < Nsize[0]; ++x) {
187 for (
int i_color = 0; i_color < Nc; ++i_color) {
188 int idx = i_color + Nc * i_spin;
192 src.
set(idx_r, isite, 0, 1.0 / Lvol3);
213 const int Lvol3 = Lx * Ly * Lz;
216 std::vector<int> Nsize(Ndim);
229 for (
int z = 0; z < Nsize[2]; ++z) {
230 for (
int y = 0; y < Nsize[1]; ++y) {
231 for (
int x = 0; x < Nsize[0]; ++x) {
234 for (
int idx = 0; idx < Nc * Nd; ++idx) {
238 src.
set(idx_r, isite, 0, 1.0 / Lvol3);
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
void general(const char *format,...)
static const std::string class_name
Container of Field-type object.
void set_all_color(Field &v, const int i_spin)
static int ipe(const int dir)
logical coordinate of current proc.
void set_parameters(const Parameters ¶ms)
void crucial(const char *format,...)
Bridge::VerboseLevel m_vl
int non_negative(const int v)
std::vector< int > m_source_position
string get_string(const string &key) const
int fetch_int_vector(const string &key, vector< int > &value) const
void set_all_color_spin(Field &v)
static VerboseLevel set_verbose_level(const std::string &str)
void set(Field &v, const int idx)