46 const std::string
test_name =
"HMC.Wilson_TwistedMass.Nf2";
50 const std::string filename_input =
"test_HMC_Wilson_TwistedMass_Nf2.yaml";
56 #ifdef USE_TESTMANAGER_AUTOREGISTER
58 #if defined(USE_GROUP_SU2)
77 const int NinG = 2 * Nc * Nc;
81 const Parameters params_test = params_all.
lookup(
"Test_HMC_Wilson_TwistedMass");
86 const Parameters params_integrator = params_all.
lookup(
"Builder_Integrator");
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_gconf_write = params_test.
get_string(
"gauge_config_type_output");
93 const string writefile = params_test.
get_string(
"config_filename_output");
94 const string str_rand_type = params_test.
get_string(
"random_number_type");
95 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
96 int i_conf = params_test.
get_int(
"trajectory_number");
97 const int Ntraj = params_test.
get_int(
"trajectory_number_step");
98 const int i_save_conf = params_test.
get_int(
"save_config_interval");
99 const string str_vlevel = params_test.
get_string(
"verbose_level");
101 const bool do_check = params_test.
is_set(
"expected_result");
102 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
104 const string str_action_G_type = params_action_G.
get_string(
"action_type");
105 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
106 const string str_gmset_type = params_fopr.
get_string(
"gamma_matrix_type");
107 const string str_solver_MD_type = params_solver_MD.
get_string(
"solver_type");
108 const string str_solver_H_type = params_solver_H.
get_string(
"solver_type");
109 const int Nlevels = params_integrator.
get_int(
"number_of_levels");
110 const std::vector<int> level_action = params_integrator.
get_int_vector(
"level_of_actions");
115 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
116 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
118 vout.
general(
vl,
" gconf_write = %s\n", str_gconf_write.c_str());
120 vout.
general(
vl,
" rand_type = %s\n", str_rand_type.c_str());
126 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
127 vout.
general(
vl,
" solver_MD_type = %s\n", str_solver_MD_type.c_str());
128 vout.
general(
vl,
" solver_H_type = %s\n", str_solver_H_type.c_str());
150 if (str_gconf_status ==
"Continue") {
152 }
else if (str_gconf_status ==
"Cold_start") {
154 }
else if (str_gconf_status ==
"Hot_start") {
157 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
164 unique_ptr<Action> action_G(Action::New(str_action_G_type, params_action_G));
167 unique_ptr<Fopr> fopr(Fopr::New(str_fopr_type, params_fopr));
170 unique_ptr<Solver> solver_MD(Solver::New(str_solver_MD_type, fopr.get(), params_solver_MD));
173 unique_ptr<Solver> solver_H(Solver::New(str_solver_H_type, fopr.get(), params_solver_H));
176 unique_ptr<Action> action_F(
new Action_F_Standard_lex(fopr.get(), force_fopr.get(), fprop_MD.get(), fprop_H.get()));
180 actions.
append(level_action[0], action_F.get());
181 actions.
append(level_action[1], action_G.get());
183 unique_ptr<Builder_Integrator> builder(
new Builder_Integrator(actions, params_integrator));
188 HMC_General hmc(actions, integrator, rand.get(), params_hmc);
199 for (
int traj = 0; traj < Ntraj; ++traj) {
205 if ((i_conf + traj + 1) % i_save_conf == 0) {