74 namespace Test_HMC_Clover_SF {
75 const std::string
test_name =
"HMC.Clover_SF.RHMC_Nf2p1";
79 const std::string filename_input =
"test_HMC_Clover_SF_RHMC_Nf2p1.yaml";
80 const std::string filename_output =
"stdout";
82 class Parameters_Test_HMC_Clover_SF :
public Parameters {
84 Parameters_Test_HMC_Clover_SF()
86 Register_string(
"gauge_config_status",
"NULL");
88 Register_string(
"gauge_config_type_input",
"NULL");
89 Register_string(
"config_filename_input",
"NULL");
91 Register_string(
"gauge_config_type_output",
"NULL");
92 Register_string(
"config_filename_output",
"NULL");
94 Register_string(
"verbose_level",
"NULL");
96 Register_int(
"trajectory_number", 0);
97 Register_int(
"trajectory_number_step", 0);
98 Register_int(
"save_config_interval", 0);
100 Register_double(
"expected_result", 0.0);
108 #ifdef USE_TESTMANAGER_AUTOREGISTER
110 #if defined(USE_GROUP_SU2)
129 Parameters *params_test =
new Parameters_Test_HMC_Clover_SF;
155 params_manager.
read_params(filename_input, params_all);
157 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
158 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
159 const string readfile = params_test->
get_string(
"config_filename_input");
160 const string str_gconf_write = params_test->
get_string(
"gauge_config_type_output");
161 const string writefile = params_test->
get_string(
"config_filename_output");
162 int iconf = params_test->
get_int(
"trajectory_number");
163 int Ntraj = params_test->
get_int(
"trajectory_number_step");
164 const int i_save_conf = params_test->
get_int(
"save_config_interval");
165 const string str_vlevel = params_test->
get_string(
"verbose_level");
167 const bool do_check = params_test->
is_set(
"expected_result");
168 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
170 const string str_gmset_type = params_clover->
get_string(
"gamma_matrix_type");
171 const string str_proj_type = params_proj->
get_string(
"projection_type");
172 const string str_smear_type = params_smear->
get_string(
"smear_type");
177 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
178 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
179 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
180 vout.
general(vl,
" gconf_write = %s\n", str_gconf_write.c_str());
181 vout.
general(vl,
" writefile = %s\n", writefile.c_str());
184 vout.
general(vl,
" i_save_conf = %d\n", i_save_conf);
185 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
186 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
187 vout.
general(vl,
" proj_type = %s\n", str_proj_type.c_str());
188 vout.
general(vl,
" smear_type = %s\n", str_smear_type.c_str());
209 if (str_gconf_status ==
"Continue") {
211 }
else if (str_gconf_status ==
"Cold_start") {
213 }
else if (str_gconf_status ==
"Hot_start") {
217 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n",
test_name.c_str(), str_gconf_status.c_str());
230 Projection *proj = Projection::New(str_proj_type);
231 Smear *smear = Smear::New(str_smear_type, proj);
234 ForceSmear *force_smear = ForceSmear::New(str_smear_type, proj);
272 (
Force *)force_fopr_MD);
275 valarray<Action *> actions(3);
276 actions[0] = (
Action *)action_F_Nf1;
277 actions[1] = (
Action *)action_F_Nf2;
278 actions[2] = (
Action *)action_G;
280 valarray<Director *> directors(1);
281 directors[0] = (
Director *)dr_smear;
291 std::vector<unsigned long> seed(4);
310 vout.
general(vl,
"RHMC start: Ntraj = %d\n", Ntraj);
313 for (
int traj = 0; traj < Ntraj; ++traj) {
315 vout.
general(vl,
"---------------------------------------------------\n");
320 if ((iconf + traj + 1) % i_save_conf == 0) {
334 delete params_action_G;
335 delete params_clover;
336 delete params_clover1;
339 delete params_dr_smear;
340 delete params_rational_H;
341 delete params_rational_MD;
342 delete params_integrator;
365 delete force_fopr_smear;
368 delete force_fopr_w1;
371 delete force_fopr_r2;
376 delete force_fopr_MD;
384 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void writefile(const std::string &)
void read_params(const std::string ¶ms_file, Parameters *params)
read parameters from file.
void detailed(const char *format,...)
void set_parameters(const Parameters ¶ms)
void general(const char *format,...)
Container of Field-type object.
virtual void set_parameters(const Parameters &)=0
const std::string test_name
Base class of fermion force calculation.
int get_int(const string &key) const
static Parameters * New(const std::string &realm)
void set_random(RandomNumbers *rand)
Base class of HMC action class family.
Base class of Integrator class family.
smeared fermion operator.
Base class for force calculation of smeared operators.
void set_parameters(const Parameters ¶ms)
static bool RegisterTest(const std::string &key, const Test_function func)
void set_parameters(const Parameters ¶ms)
void set_parameters(const Parameters ¶ms)
Manager of commonly used data object in HMC.
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)
base class for projection operator into gauge group.
void write_file(Field *u, const string &filename)
Manager of smeared configurations.
Base class of random number generators.
Force calculation for smeared fermion operators.
void set_parameters(const Parameters ¶ms)
void set_parameters(const Parameters ¶ms)
set paramters, must be called before set_config
int non_negative(const int v)
base class for smearing of link variables.
Parameter manager with YAML parser.
static int nodeid()
alternative name for self().
GaugeConfig class for file I/O of gauge configuration.
Base class of fermion operator family.
int verify(const double expected, const double result)
void read_file(Field *u, const string &filename)
void set_parameters(const Parameters ¶ms)
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
virtual void set_parameters(const Parameters &)=0
Standard fermion action with SF BC for HMC.
static VerboseLevel set_verbose_level(const std::string &str)
void set_parameters(const Parameters ¶ms)