47 namespace Test_SF_fAfP {
48 const std::string
test_name =
"SF_fAfP.Boundary_Meson_2ptFunction";
52 const std::string filename_input =
"test_SF_fAfP_Boundary_Meson_2ptFunction.yaml";
58 #ifdef USE_TESTMANAGER_AUTOREGISTER
60 #if defined(USE_OPENMP) || defined(USE_GROUP_SU2)
90 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
91 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
92 const string readfile = params_test.
get_string(
"config_filename_input");
93 const string str_rand_type = params_test.
get_string(
"random_number_type");
94 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
95 const string str_vlevel = params_test.
get_string(
"verbose_level");
97 const bool do_check = params_test.
is_set(
"expected_result");
98 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
100 const string str_gmset_type = params_clover.
get_string(
"gamma_matrix_type");
101 const string str_proj_type = params_proj.
get_string(
"projection_type");
102 const string str_smear_type = params_smear.
get_string(
"smear_type");
103 const string str_solver_type = params_solver.
get_string(
"solver_type");
108 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
109 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
110 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
111 vout.
general(vl,
" rand_type = %s\n", str_rand_type.c_str());
113 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
114 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
115 vout.
general(vl,
" proj_type = %s\n", str_proj_type.c_str());
116 vout.
general(vl,
" smear_type = %s\n", str_smear_type.c_str());
117 vout.
general(vl,
" solver_type = %s\n", str_solver_type.c_str());
136 if (str_gconf_status ==
"Continue") {
138 }
else if (str_gconf_status ==
"Cold_start") {
140 }
else if (str_gconf_status ==
"Hot_start") {
143 vout.
crucial(vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
161 const int Nsmear = dr_smear_config->
get_Nsmear();
192 std::vector<Field_F> H(Nc * Nd);
193 std::vector<Field_F> Hpr(Nc * Nd);
197 vout.
general(vl,
" color spin Nconv diff diff2\n");
199 for (
int icolor = 0; icolor < Nc; ++icolor) {
200 for (
int ispin = 0; ispin < Nd / 2; ++ispin) {
202 source->
set_t0(b, icolor, ispin);
204 int idx = icolor + Nc * ispin;
209 fprop_lex->
invert_D(xq, b, Nconv, diff);
214 fopr_smear->
mult(y, xq);
216 double diff2 = y.
norm2();
219 icolor, ispin, Nconv, diff, diff2);
226 for (
int ispin = Nd / 2; ispin < Nd; ++ispin) {
228 source->
set_tT(b, icolor, ispin);
230 int idx = icolor + Nc * ispin;
235 fprop_lex->
invert_D(xq, b, Nconv, diff);
240 fopr_smear->
mult(y, xq);
242 double diff2 = y.
norm2();
245 icolor, ispin, Nconv, diff, diff2);
255 for (
int t = 0; t < 2; ++t) {
256 int site = index.
site(0, 0, 0, t);
257 for (
int c1 = 0; c1 < Nc; ++c1) {
258 for (
int c0 = 0; c0 < Nc; ++c0) {
259 for (
int s1 = 0; s1 < Nd; ++s1) {
260 for (
int s0 = 0; s0 < Nd; ++s0) {
263 H[c0 + Nc * s0].cmp_r(c1, s1, site),
264 H[c0 + Nc * s0].cmp_i(c1, s1, site));
270 for (
int t = 0; t < 2; ++t) {
271 int site = index.
site(0, 0, 0, t);
272 for (
int c1 = 0; c1 < Nc; ++c1) {
273 for (
int c0 = 0; c0 < Nc; ++c0) {
274 for (
int s1 = 0; s1 < Nd; ++s1) {
275 for (
int s0 = 0; s0 < Nd; ++s0) {
278 Hpr[c0 + Nc * s0].cmp_r(c1, s1, site),
279 Hpr[c0 + Nc * s0].cmp_i(c1, s1, site));
289 vout.
general(vl,
"boundary 2-point correlator with SF BC:\n");
292 const double result = corr.
fAfP(H, Hpr);
302 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
const std::string test_name
void set_config(Field *U)
setting pointer to configuration
void detailed(const char *format,...)
void set(const int jin, const int site, const int jex, double v)
virtual void set_parameters(const Parameters ¶m)=0
int site(const int &x, const int &y, const int &z, const int &t) const
Wall source for SF boundary propagator.
void general(const char *format,...)
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
int solver(const std::string &)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Two-point correlator for Wilson-type fermions with SF BC.
virtual void set_parameters(const Parameters &)=0
int boundary_meson_2ptFunction(void)
Wilson-type fermion field.
virtual void set_parameters(const Parameters ¶ms)=0
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
virtual void invert_D(Field &, const Field &, int &, double &)=0
static bool initialize(const std::string &rng_type, unsigned long seed)
void read(Field_G *U, const string &filename=string())
double fAfP(const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2)
unsigned long get_unsigned_long(const string &key) const
double get_double(const string &key) const
void set_parameters(const Parameters ¶ms)
virtual void set_parameters(const Parameters &)=0
void set_t0(Field_F &src, const int ic, const int id)
Set the 3D wall source at t=1.
int non_NULL(const std::string v)
bool is_set(const string &key) const
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Get quark propagator for Fopr with lexical site index.
void set_config(Field *U)
set pointer to original thin link variable
int get_Nsmear()
get number of applied smearing operation
void crucial(const char *format,...)
virtual void set_parameters(const Parameters ¶ms)=0
static void read(const std::string ¶ms_file, Parameters ¶ms)
void set_tT(Field_F &src, const int ic, const int id)
Set the 3D wall source at t=T-1.
Manager of smeared configurations.
int verify(const double result, const double expected, double eps)
Field * getptr_smearedConfig(const int i_smear)
get pointer to i-th smeared config (0th is original thin link)
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
void set_parameters(const Parameters ¶ms)
set parameters, must be called before set_config
GaugeConfig class for file I/O of gauge configuration.
string get_string(const string &key) const
virtual void set_config(Field *U)=0
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)