39 const std::string
test_name =
"Rational.Inverse";
43 const std::string filename_input =
"test_Rational_Inverse.yaml";
49 #ifdef USE_TESTMANAGER_AUTOREGISTER
51 #if defined(USE_GROUP_SU2)
70 const int NinF = 2 * Nc * Nd;
79 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
80 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
81 const string readfile = params_test.
get_string(
"config_filename_input");
82 const string str_rand_type = params_test.
get_string(
"random_number_type");
83 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
84 const string str_vlevel = params_test.
get_string(
"verbose_level");
86 const bool do_check = params_test.
is_set(
"expected_result");
87 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
89 const string str_gmset_type = params_clover.
get_string(
"gamma_matrix_type");
90 const string str_source_type = params_source.
get_string(
"source_type");
95 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
96 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
101 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
102 vout.
general(
vl,
" source_type = %s\n", str_source_type.c_str());
121 if (str_gconf_status ==
"Continue") {
123 }
else if (str_gconf_status ==
"Cold_start") {
125 }
else if (str_gconf_status ==
"Hot_start") {
128 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
134 unique_ptr<Fopr> fopr_c(
new Fopr_Clover(params_clover));
135 fopr_c->set_config(&U);
137 unique_ptr<Fopr_Rational> fopr_r(
new Fopr_Rational(fopr_c.get(), params_rational));
139 unique_ptr<Source> source(Source::New(str_source_type, params_source));
147 Field xq(NinF, Nvol, 1), b(NinF, Nvol, 1);
148 Field v(NinF, Nvol, 1), w(NinF, Nvol, 1);
155 const int icolor = 0;
159 int idx = icolor + Nc * ispin;
160 source->set(b2,
idx);
166 fopr_c->set_mode(
"DdagD");
177 const double result = vv;