49 const std::string
test_name =
"SF_fAfP.Boundary_Meson_2ptFunction";
53 const std::string filename_input =
"test_SF_fAfP_Boundary_Meson_2ptFunction.yaml";
59 #ifdef USE_TESTMANAGER_AUTOREGISTER
61 #if defined(USE_OPENMP) || defined(USE_GROUP_SU2)
91 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
92 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
93 const string readfile = params_test.
get_string(
"config_filename_input");
94 const string str_rand_type = params_test.
get_string(
"random_number_type");
95 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
96 const string str_vlevel = params_test.
get_string(
"verbose_level");
98 const bool do_check = params_test.
is_set(
"expected_result");
99 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
101 const string str_gmset_type = params_clover.
get_string(
"gamma_matrix_type");
102 const string str_proj_type = params_proj.
get_string(
"projection_type");
103 const string str_smear_type = params_smear.
get_string(
"smear_type");
104 const int Nsmear = params_dr_smear.
get_int(
"number_of_smearing");
105 const string str_solver_type = params_solver.
get_string(
"solver_type");
110 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
111 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
113 vout.
general(
vl,
" rand_type = %s\n", str_rand_type.c_str());
116 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
117 vout.
general(
vl,
" proj_type = %s\n", str_proj_type.c_str());
118 vout.
general(
vl,
" smear_type = %s\n", str_smear_type.c_str());
119 vout.
general(
vl,
" solver_type = %s\n", str_solver_type.c_str());
131 if ((Nsmear > 0) && (str_proj_type ==
"Stout_SU3")) {
145 if (str_gconf_status ==
"Continue") {
147 }
else if (str_gconf_status ==
"Cold_start") {
149 }
else if (str_gconf_status ==
"Hot_start") {
152 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
157 unique_ptr<Projection> proj(Projection::New(str_proj_type, params_all.
lookup(
"Projection")));
158 unique_ptr<Smear> smear(Smear::New(str_smear_type, proj.get(), params_all.
lookup(
"Smear_SF")));
159 unique_ptr<Director_Smear> dr_smear(
new Director_Smear(smear.get(), params_all.
lookup(
"Director_Smear")));
160 dr_smear->set_config(&U);
162 const Field_G *Usmear = (
Field_G *)dr_smear->getptr_smearedConfig(Nsmear);
167 unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(str_gmset_type));
171 fopr->set_config(&U);
173 unique_ptr<Solver>
solver(Solver::New(str_solver_type, fopr.get(), params_solver));
177 unique_ptr<Source_Wall_SF> source(
new Source_Wall_SF(params_source));
178 source->set_config(&U);
186 std::vector<Field_F> H(Nc * Nd);
187 std::vector<Field_F> Hpr(Nc * Nd);
193 for (
int icolor = 0; icolor < Nc; ++icolor) {
194 for (
int ispin = 0; ispin < Nd / 2; ++ispin) {
196 source->set_t0(b, icolor, ispin);
198 int idx = icolor + Nc * ispin;
203 fprop_lex->invert_D(xq, b, Nconv, diff);
210 double diff2 = y.
norm2();
213 icolor, ispin, Nconv, diff, diff2);
220 for (
int ispin = Nd / 2; ispin < Nd; ++ispin) {
222 source->set_tT(b, icolor, ispin);
224 int idx = icolor + Nc * ispin;
229 fprop_lex->invert_D(xq, b, Nconv, diff);
236 double diff2 = y.
norm2();
239 icolor, ispin, Nconv, diff, diff2);
249 for (
int t = 0; t < 2; ++t) {
250 int site = index.
site(0, 0, 0, t);
251 for (
int c1 = 0; c1 < Nc; ++c1) {
252 for (
int c0 = 0; c0 < Nc; ++c0) {
253 for (
int s1 = 0; s1 < Nd; ++s1) {
254 for (
int s0 = 0; s0 < Nd; ++s0) {
257 H[c0 + Nc * s0].cmp_r(c1, s1, site),
258 H[c0 + Nc * s0].cmp_i(c1, s1, site));
264 for (
int t = 0; t < 2; ++t) {
265 int site = index.
site(0, 0, 0, t);
266 for (
int c1 = 0; c1 < Nc; ++c1) {
267 for (
int c0 = 0; c0 < Nc; ++c0) {
268 for (
int s1 = 0; s1 < Nd; ++s1) {
269 for (
int s0 = 0; s0 < Nd; ++s0) {
272 Hpr[c0 + Nc * s0].cmp_r(c1, s1, site),
273 Hpr[c0 + Nc * s0].cmp_i(c1, s1, site));
283 vout.
general(
vl,
"boundary 2-point correlator with SF BC:\n");
286 const double result = corr.
fAfP(H, Hpr);