62 namespace Test_HMC_Clover_SF {
67 const std::string filename_input =
"test_HMC_Clover_SF_Nf2.yaml";
73 #ifdef USE_TESTMANAGER_AUTOREGISTER
75 #if defined(USE_GROUP_SU2)
102 const Parameters params_integrator = params_all.
lookup(
"Builder_Integrator");
105 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
106 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
107 const string readfile = params_test.
get_string(
"config_filename_input");
108 const string str_gconf_write = params_test.
get_string(
"gauge_config_type_output");
109 const string writefile = params_test.
get_string(
"config_filename_output");
110 const string str_rand_type = params_test.
get_string(
"random_number_type");
111 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
112 int i_conf = params_test.
get_int(
"trajectory_number");
113 const int Ntraj = params_test.
get_int(
"trajectory_number_step");
114 const int i_save_conf = params_test.
get_int(
"save_config_interval");
115 const string str_vlevel = params_test.
get_string(
"verbose_level");
117 const bool do_check = params_test.
is_set(
"expected_result");
118 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
120 const string str_action_G_type = params_action_G.
get_string(
"action_type");
121 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
122 const string str_gmset_type = params_fopr.
get_string(
"gamma_matrix_type");
123 const string str_proj_type = params_proj.
get_string(
"projection_type");
124 const string str_smear_type = params_smear.
get_string(
"smear_type");
125 const int Nlevels = params_integrator.
get_int(
"number_of_levels");
126 const std::vector<int> level_action = params_integrator.
get_int_vector(
"level_of_actions");
131 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
132 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
133 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
134 vout.
general(vl,
" gconf_write = %s\n", str_gconf_write.c_str());
135 vout.
general(vl,
" writefile = %s\n", writefile.c_str());
136 vout.
general(vl,
" rand_type = %s\n", str_rand_type.c_str());
140 vout.
general(vl,
" i_save_conf = %d\n", i_save_conf);
141 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
142 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
143 vout.
general(vl,
" proj_type = %s\n", str_proj_type.c_str());
144 vout.
general(vl,
" smear_type = %s\n", str_smear_type.c_str());
166 if (str_gconf_status ==
"Continue") {
168 }
else if (str_gconf_status ==
"Cold_start") {
170 }
else if (str_gconf_status ==
"Hot_start") {
173 vout.
crucial(vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
211 actions.
append(level_action[0], action_F_Nf2);
212 actions.
append(level_action[1], action_G);
214 std::vector<Director *> directors(1);
235 HMC_General hmc(actions, directors, integrator, rand);
244 vout.
general(vl,
"HMC start: Ntraj = %d\n", Ntraj);
247 for (
int traj = 0; traj < Ntraj; ++traj) {
253 if ((i_conf + traj + 1) % i_save_conf == 0) {
273 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
void detailed(const char *format,...)
virtual void set_parameters(const Parameters ¶m)=0
void set_parameters(const Parameters ¶ms)
void general(const char *format,...)
General HMC update class.
virtual void set_parameters(const Parameters &)=0
const std::string test_name
int get_int(const string &key) const
bool append(const int level, Action *action)
virtual void set_parameters(const Parameters ¶m)=0
Base class of Integrator class family.
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 set_parameters(const Parameters ¶ms)
Manager of commonly used data object in HMC.
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,...)
virtual void set_parameters(const Parameters &)=0
Force calculation for clover quark action with SF BC.
int non_NULL(const std::string v)
bool is_set(const string &key) const
void crucial(const char *format,...)
virtual void set_parameters(const Parameters ¶ms)=0
static void read(const std::string ¶ms_file, Parameters ¶ms)
lists of actions at respective integrator levels.
Manager of smeared configurations.
int verify(const double result, const double expected, double eps)
void write_file(Field_G *U, const string &filename)
Force calculation for smeared fermion operators.
int non_negative(const int v)
virtual void set_parameters(const Parameters &)=0
GaugeConfig class for file I/O of gauge configuration.
string get_string(const string &key) const
vector< int > get_int_vector(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
virtual void set_parameters(const Parameters &)=0
Builder of MD integrator for HMC.
Standard fermion action with SF BC for HMC.
static VerboseLevel set_verbose_level(const std::string &str)