37 const std::string
test_name =
"Solver.Wilson.ShiftCG";
41 const std::string filename_input =
"test_Solver_Wilson_ShiftCG.yaml";
47 #ifdef USE_TESTMANAGER_AUTOREGISTER
49 #if defined(USE_GROUP_SU2)
76 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
77 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
78 const string readfile = params_test.
get_string(
"config_filename_input");
79 const string str_rand_type = params_test.
get_string(
"random_number_type");
80 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
81 const string str_vlevel = params_test.
get_string(
"verbose_level");
83 const bool do_check = params_test.
is_set(
"expected_result");
84 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
86 const string str_gmset_type = params_wilson.
get_string(
"gamma_matrix_type");
87 const int Nshift = params_solver.
get_int(
"number_of_shifts");
88 const string str_source_type = params_source.
get_string(
"source_type");
93 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
94 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
99 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
101 vout.
general(
vl,
" source_type = %s\n", str_source_type.c_str());
120 if (str_gconf_status ==
"Continue") {
122 }
else if (str_gconf_status ==
"Cold_start") {
124 }
else if (str_gconf_status ==
"Hot_start") {
127 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
133 unique_ptr<Fopr_Wilson> fopr_w(
new Fopr_Wilson(params_wilson));
134 fopr_w->set_config(&U);
136 unique_ptr<Source> source(Source::New(str_source_type, params_source));
138 unique_ptr<Fprop_Wilson_Shift> fprop_shift(
new Fprop_Wilson_Shift(fopr_w.get(), params_solver));
146 std::vector<Field_F> xq_shift(Nshift);
147 for (
int i_shift = 0; i_shift < Nshift; ++i_shift) {
148 xq_shift[i_shift].set(0.0);
155 const int icolor = 0;
159 int idx = icolor + Nc * ispin;
163 result = fprop_shift->invert_D(&xq_shift, b);