36 const std::string filename_input =
"test_GradientFlow.yaml";
37 const std::string filename_output =
"stdout";
39 class Parameters_Test_GradientFlow :
public Parameters {
41 Parameters_Test_GradientFlow()
43 Register_string(
"gauge_config_status",
"NULL");
44 Register_string(
"gauge_config_type_input",
"NULL");
45 Register_string(
"config_filename_input",
"NULL");
47 Register_string(
"gauge_config_type_output",
"NULL");
48 Register_string(
"config_filename_output",
"NULL");
50 Register_int(
"number_of_steps", 0);
51 Register_double(
"max_flow_time", 0.0);
53 Register_string(
"verbose_level",
"NULL");
55 Register_double(
"expected_result", 0.0);
63 #ifdef USE_TESTMANAGER_AUTOREGISTER
65 #if defined(USE_GROUP_SU2)
95 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
96 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
97 const string readfile = params_test->
get_string(
"config_filename_input");
98 const string str_gconf_write = params_test->
get_string(
"gauge_config_type_output");
99 const string writefile = params_test->
get_string(
"config_filename_output");
100 const int Nstep = params_test->
get_int(
"number_of_steps");
101 const double t_flow_max = params_test->
get_double(
"max_flow_time");
102 const string str_vlevel = params_test->
get_string(
"verbose_level");
104 const bool do_check = params_test->
is_set(
"expected_result");
105 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
107 const string str_action_G_type = params_action_G->
get_string(
"action_type");
112 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
113 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
114 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
115 vout.
general(vl,
" gconf_write = %s\n", str_gconf_write.c_str());
116 vout.
general(vl,
" writefile = %s\n", writefile.c_str());
118 vout.
general(vl,
" t_flow_max = %10.6f\n", t_flow_max);
119 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
127 vout.
crucial(vl,
"%s: Input parameters have not been set.\n", test_name.c_str());
136 if (str_gconf_status ==
"Continue") {
138 }
else if (str_gconf_status ==
"Cold_start") {
140 }
else if (str_gconf_status ==
"Hot_start") {
141 int i_seed_noise = 1234567;
145 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n", test_name.c_str(), str_gconf_status.c_str());
151 params_action_G->
set_double(
"beta", static_cast<double>(Nc));
166 for (
int i = 0; i < Nstep; ++i) {
167 result = g_flow->
evolve(t_flow, *U);
169 if (t_flow > t_flow_max)
break;
178 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
void general(const char *format,...)
const std::string test_name
int get_int(const string &key) const
static Parameters * New(const std::string &realm)
void read_file(Field *U, const string &filename)
void set_random(RandomNumbers *rand)
virtual void set_parameters(const Parameters ¶m)=0
static bool RegisterTest(const std::string &key, const Test_function func)
bool is_set(const string &) const
double get_double(const string &key) const
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)
void set_double(const string &key, const double value)
static void read(const std::string ¶ms_file, Parameters *params)
double evolve(double &t_flow, Field_G &U)
GaugeConfig class for file I/O of gauge configuration.
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
void set_parameters(const Parameters ¶ms)
static VerboseLevel set_verbose_level(const std::string &str)