34 const std::string
test_name =
"Gauge.Shift";
38 const std::string filename_input =
"test_Gauge_lex.yaml";
44 #ifdef USE_TESTMANAGER_AUTOREGISTER
46 #if defined(USE_GROUP_SU2)
68 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
69 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
70 const string readfile = params_test.
get_string(
"config_filename_input");
71 const string str_rand_type = params_test.
get_string(
"random_number_type");
72 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
73 const string str_vlevel = params_test.
get_string(
"verbose_level");
75 const bool do_check = params_test.
is_set(
"expected_result");
76 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
81 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
82 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
105 if (str_gconf_status ==
"Continue") {
107 }
else if (str_gconf_status ==
"Cold_start") {
109 }
else if (str_gconf_status ==
"Hot_start") {
112 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
138 const int t_global = Lt - 1;
139 const int node_t = t_global / Nt;
140 const int it_shift = t_global - ipe_t * Nt;
142 const int x_global = 1;
143 const int node_x = x_global / Nx;
144 const int ix_shift = x_global - ipe_x * Nx;
150 shift.backward(U2, U, 3);
153 if ((ipe_x == 0) && (ipe_y == 0) && (ipe_z == 0)) {
154 if (ipe_t == node_t) {
155 vout.
general(
vl, Communicator::nodeid(),
"U(after backward) = %.8f\n", U2.
cmp(17, index.
site(0, 0, 0, it_shift), 2));
162 shift.forward(U2, U, 0);
165 if ((ipe_y == 0) && (ipe_z == 0) && (ipe_t == 0)) {
166 if (ipe_x == node_x) {
167 vout.
general(
vl, Communicator::nodeid(),
"U(after forward) = %.8f\n", U2.
cmp(17, index.
site(ix_shift, 0, 0, 0), 3));