34 namespace Test_Gauge {
35 const std::string
test_name =
"Gauge.Plaquette";
59 #ifdef USE_TESTMANAGER_AUTOREGISTER
61 #if defined(USE_GROUP_SU2)
65 "Gauge.Plaquette.lex",
89 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
90 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
91 const string readfile = params_test.
get_string(
"config_filename_input");
92 const string str_rand_type = params_test.
get_string(
"random_number_type");
93 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
94 const string str_vlevel = params_test.
get_string(
"verbose_level");
96 const bool do_check = params_test.
is_set(
"expected_result");
97 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
99 const string str_index_type = params_staple.
get_string(
"index_type");
104 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
105 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
106 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
107 vout.
general(vl,
" rand_type = %s\n", str_rand_type.c_str());
109 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
127 if (str_gconf_status ==
"Continue") {
129 }
else if (str_gconf_status ==
"Cold_start") {
131 }
else if (str_gconf_status ==
"Hot_start") {
134 vout.
crucial(vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
149 const double result = staple->
plaquette(*U);
159 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
void detailed(const char *format,...)
void general(const char *format,...)
virtual double plaquette(const Field_G &)=0
calculates plaquette value.
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
const std::string test_name
static bool initialize(const std::string &rng_type, unsigned long seed)
void read(Field_G *U, const string &filename=string())
unsigned long get_unsigned_long(const string &key) const
double get_double(const string &key) const
int non_NULL(const std::string v)
bool is_set(const string &key) const
void crucial(const char *format,...)
static void read(const std::string ¶ms_file, Parameters ¶ms)
int verify(const double result, const double expected, double eps)
int plaquette(const std::string &)
GaugeConfig class for file I/O of gauge configuration.
virtual void set_parameters(const Parameters ¶ms)=0
setting parameters.
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)