38 namespace Test_HMC_Quenched {
39 const std::string
test_name =
"HMC.Quenched.Leapfrog_Nf0";
43 const std::string filename_input =
"test_HMC_Quenched_Leapfrog.yaml";
49 #ifdef USE_TESTMANAGER_AUTOREGISTER
51 #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_gconf_write = params_test.
get_string(
"gauge_config_type_output");
80 const string writefile = params_test.
get_string(
"config_filename_output");
81 const string str_rand_type = params_test.
get_string(
"random_number_type");
82 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
83 int i_conf = params_test.
get_int(
"trajectory_number");
84 const int Ntraj = params_test.
get_int(
"trajectory_number_step");
85 const int i_save_conf = params_test.
get_int(
"save_config_interval");
86 const string str_vlevel = params_test.
get_string(
"verbose_level");
88 const bool do_check = params_test.
is_set(
"expected_result");
89 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
91 const string str_action_G_type = params_action_G.
get_string(
"action_type");
96 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
97 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
98 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
99 vout.
general(vl,
" gconf_write = %s\n", str_gconf_write.c_str());
100 vout.
general(vl,
" writefile = %s\n", writefile.c_str());
101 vout.
general(vl,
" rand_type = %s\n", str_rand_type.c_str());
105 vout.
general(vl,
" i_save_conf = %d\n", i_save_conf);
106 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
128 if (str_gconf_status ==
"Continue") {
130 }
else if (str_gconf_status ==
"Cold_start") {
132 }
else if (str_gconf_status ==
"Hot_start") {
135 vout.
crucial(vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
145 std::vector<Action *> actions(1);
162 for (
int traj = 0; traj < Ntraj; ++traj) {
168 if ((i_conf + traj + 1) % i_save_conf == 0) {
184 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
void set_parameters(const Parameters ¶ms)
void general(const char *format,...)
int get_int(const string &key) const
Base class of HMC action class family.
virtual void set_parameters(const Parameters ¶m)=0
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
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
std::string generate_filename(const char *fmt,...)
const std::string test_name
HMC with single level leapfrog intetgrator.
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)
void write_file(Field_G *U, const string &filename)
int non_negative(const int v)
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)