35 =
"Spectrum.NonRelativistic.heavy-heavy-2ptFunction";
39 const std::string parameter_file
40 =
"test_Spectrum_NonRelativistic_heavy_heavy_2ptFunction.yaml";
46 #ifdef USE_TESTMANAGER_AUTOREGISTER
48 #if defined(USE_GROUP_SU2)
77 string gconf_status = params_spectrum.
get_string(
"gauge_config_status");
78 string gconf_type_read
79 = params_spectrum.
get_string(
"gauge_config_type_input");
80 string readfile = params_spectrum.
get_string(
"config_filename_input");
81 string rand_type = params_spectrum.
get_string(
"random_number_type");
85 string vlevel = params_spectrum.
get_string(
"verbose_level");
87 const bool do_check = params_spectrum.
is_set(
"expected_result");
88 const double expected_result
89 = do_check ? params_spectrum.
get_double(
"expected_result") : 0.0;
91 string gfix_type = params_gfix.
get_string(
"gauge_fixing_type");
92 string fopr_heavy_type = params_fopr_heavy.
get_string(
"fermion_type");
93 string gmset_type = params_fopr_heavy.
get_string(
"gamma_matrix_type");
94 string source_heavy_type = params_source_heavy.
get_string(
"source_type");
100 vout.
general(
vl,
" gconf_status = %s\n", gconf_status.c_str());
101 vout.
general(
vl,
" gconf_type_read = %s\n", gconf_type_read.c_str());
108 vout.
general(
vl,
" source_heavy_type = %s\n", source_heavy_type.c_str());
115 vout.
crucial(
vl,
"Error at %s: input parameters have not been set\n",
124 unique_ptr<Field_G> U(
new Field_G(Nvol, Ndim));
126 if (gconf_status ==
"Continue") {
128 }
else if (gconf_status ==
"Cold_start") {
130 }
else if (gconf_status ==
"Hot_start") {
133 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
134 test_name.c_str(), gconf_status.c_str());
140 unique_ptr<Field_G> Ufix(
new Field_G(Nvol, Ndim));
141 const unique_ptr<GaugeFixing> gfix(GaugeFixing::New(gfix_type));
142 gfix->set_parameters(params_gfix);
148 unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(gmset_type));
151 unique_ptr<Fopr> fopr_heavy(Fopr::New(fopr_heavy_type, params_fopr_heavy));
152 fopr_heavy->set_config(U.get());
154 const unique_ptr<Source> source_heavy(Source::New(source_heavy_type));
155 source_heavy->set_parameters(params_source_heavy);
171 std::vector<Field_F> sq_heavy(Nc * Nd);
172 for (
int icd = 0; icd < Nc * Nd; ++icd) {
173 sq_heavy[icd].set(0.0);
176 fopr_heavy->set_mode(
"Evolve");
177 for (
int id = 0;
id < Nd / 2; ++id) {
178 for (
int ic = 0; ic < Nc; ++ic) {
179 int icd = ic + Nc * id;
182 source_heavy->
set(b, icd);
187 fopr_heavy->mult(sq_heavy[icd], b);
195 const double result = corr.
meson_all(sq_heavy, sq_heavy);