42 const std::string
test_name =
"Spectrum.Wilson.Hadron2ptFunction";
46 const std::string filename_input =
"test_Spectrum_Wilson_Hadron2ptFunction.yaml";
52 #ifdef USE_TESTMANAGER_AUTOREGISTER
54 #if defined(USE_GROUP_SU2)
82 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
83 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
84 const string readfile = params_test.
get_string(
"config_filename_input");
85 const string str_rand_type = params_test.
get_string(
"random_number_type");
86 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
87 const string str_vlevel = params_test.
get_string(
"verbose_level");
89 const bool do_check = params_test.
is_set(
"expected_result");
90 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
92 const string str_gfix_type = params_gfix.
get_string(
"gauge_fixing_type");
93 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
94 const string str_gmset_type = params_fopr.
get_string(
"gamma_matrix_type");
95 const string str_solver_type = params_solver.
get_string(
"solver_type");
96 const string str_source_type = params_source.
get_string(
"source_type");
101 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
102 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
104 vout.
general(
vl,
" rand_type = %s\n", str_rand_type.c_str());
107 vout.
general(
vl,
" gfix_type = %s\n", str_gfix_type.c_str());
108 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
109 vout.
general(
vl,
" solver_type = %s\n", str_solver_type.c_str());
110 vout.
general(
vl,
" source_type = %s\n", str_source_type.c_str());
121 if (str_solver_type ==
"CG") {
126 if ((str_gfix_type ==
"Coulomb") || (str_gfix_type ==
"Landau")) {
140 if (str_gconf_status ==
"Continue") {
142 }
else if (str_gconf_status ==
"Cold_start") {
144 }
else if (str_gconf_status ==
"Hot_start") {
147 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
154 unique_ptr<GaugeFixing> gfix(GaugeFixing::New(str_gfix_type, params_gfix));
162 unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(str_gmset_type));
164 unique_ptr<Fopr> fopr(Fopr::New(str_fopr_type, params_fopr));
165 fopr->set_config(&U);
167 unique_ptr<Solver>
solver(Solver::New(str_solver_type, fopr.get(), params_solver));
171 unique_ptr<Source> source(Source::New(str_source_type, params_source));
181 std::vector<Field_F> sq(Nc * Nd);
182 for (
int i_cd = 0; i_cd < Nc * Nd; ++i_cd) {
190 for (
int ispin = 0; ispin < Nd; ++ispin) {
191 for (
int icolor = 0; icolor < Nc; ++icolor) {
192 int i_cd = icolor + Nc * ispin;
195 source->
set(b, i_cd);
199 fprop_lex->invert_D(sq[i_cd], b, Nconv, diff);
203 fopr->mult(y, sq[i_cd]);
208 icolor, ispin, Nconv, diff, diff2);
216 const double result = corr.
meson_all(sq, sq);