38 const std::string
test_name =
"Gauge.Shift";
42 const std::string filename_input =
"test_Gauge.yaml";
43 const std::string filename_output =
"stdout";
45 class Parameters_Test_Gauge :
public Parameters {
47 Parameters_Test_Gauge()
49 Register_string(
"gauge_config_status",
"NULL");
50 Register_string(
"gauge_config_type_input",
"NULL");
51 Register_string(
"config_filename_input",
"NULL");
53 Register_string(
"verbose_level",
"NULL");
55 Register_double(
"expected_result", 0.0);
63 #ifdef USE_TESTMANAGER_AUTOREGISTER
65 #if defined(USE_GROUP_SU2)
90 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
91 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
92 const string readfile = params_test->
get_string(
"config_filename_input");
93 const string str_vlevel = params_test->
get_string(
"verbose_level");
95 const bool do_check = params_test->
is_set(
"expected_result");
96 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
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());
103 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
104 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
112 vout.
crucial(vl,
"%s: Input parameters have not been set.\n", test_name.c_str());
121 if (str_gconf_status ==
"Continue") {
123 }
else if (str_gconf_status ==
"Cold_start") {
125 }
else if (str_gconf_status ==
"Hot_start") {
126 int i_seed_noise = 1234567;
130 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n", test_name.c_str(), str_gconf_status.c_str());
160 vout.
general(vl,
"plaq (original field) = %d %.8f\n", nodeid, result);
163 vout.
general(vl,
"plaq (shifted field) = %d %.8f\n", nodeid, result);
171 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
int site(const int &x, const int &y, const int &z, const int &t) const
void general(const char *format,...)
double plaquette(const Field_G &)
calculates plaquette value.
double cmp(const int jin, const int site, const int jex) const
void read_file(Field *U, const string &filename)
void set_random(RandomNumbers *rand)
static bool RegisterTest(const std::string &key, const Test_function func)
const std::string test_name
bool is_set(const string &) const
Test of gauge quantities.
double get_double(const string &key) const
void backward(Field &, const Field &, const int mu)
int non_NULL(const std::string v)
void crucial(const char *format,...)
void Register_Parameters(const string &, Parameters *const)
int verify(const double result, const double expected, double eps)
static void read(const std::string ¶ms_file, Parameters *params)
Methods to shift a field in the lexical site index.
static int nodeid()
alternative name for self().
GaugeConfig class for file I/O of gauge configuration.
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)
void forward(Field &, const Field &, const int mu)