40 const std::string
test_name =
"HMC.Domainwall.Moebius_Nf2_PV";
44 const std::string filename_input
45 =
"test_HMC_Domainwall_Moebius_Nf2_PV.yaml";
51 #ifdef USE_TESTMANAGER_AUTOREGISTER
53 #if defined(USE_GROUP_SU2)
78 const Parameters params_dw_pv = params_all.
lookup(
"Fopr_Domainwall_PauliVillars");
81 const Parameters params_integrator = params_all.
lookup(
"Builder_Integrator");
84 const string gconf_status = params_test.
get_string(
"gauge_config_status");
85 const string gconf_read_type
86 = params_test.
get_string(
"gauge_config_type_input");
87 const string readfile = params_test.
get_string(
"config_filename_input");
88 const string gconf_write_type
89 = params_test.
get_string(
"gauge_config_type_output");
90 const string writefile = params_test.
get_string(
"config_filename_output");
91 const string rand_type = params_test.
get_string(
"random_number_type");
92 int i_conf = params_test.
get_int(
"trajectory_number");
93 const int Ntraj = params_test.
get_int(
"trajectory_number_step");
94 const int i_save_conf = params_test.
get_int(
"save_config_interval");
95 const string vlevel = params_test.
get_string(
"verbose_level");
97 const bool do_check = params_test.
is_set(
"expected_result");
98 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
100 const string action_G_type = params_action_G.
get_string(
"action_type") ;
101 const string gmset_type = params_dw.
get_string(
"gamma_matrix_type");
102 const string proj_type = params_proj.
get_string(
"projection_type");
103 const string smear_type = params_smear.
get_string(
"smear_type");
104 const string solver_MD_type = params_solver_MD.
get_string(
"solver_type");
105 const string solver_H_type = params_solver_H.
get_string(
"solver_type");
106 const int Nlevels = params_integrator.
get_int(
"number_of_levels");
108 const std::vector<int> level_action
114 vout.
general(
vl,
" gconf_status = %s\n", gconf_status.c_str());
115 vout.
general(
vl,
" gconf_read_type = %s\n", gconf_read_type.c_str());
117 vout.
general(
vl,
" gconf_write_type = %s\n", gconf_write_type.c_str());
127 vout.
general(
vl,
" solver_MD_type = %s\n", solver_MD_type.c_str());
128 vout.
general(
vl,
" solver_H_type = %s\n", solver_H_type.c_str());
139 vout.
crucial(
vl,
"Error at %s: input parameters have not been set\n",
144 if (proj_type ==
"Stout_SU3") {
146 vout.
crucial(
vl,
"check skipped: Nc = 3 is needed, but Nc = %d.\n\n",
155 if (gconf_status ==
"Continue") {
157 }
else if (gconf_status ==
"Cold_start") {
159 }
else if (gconf_status ==
"Hot_start") {
162 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
163 test_name.c_str(), gconf_status.c_str());
170 unique_ptr<Action> action_G(
171 Action::New(action_G_type, params_action_G));
174 unique_ptr<Projection> proj(
175 Projection::New(proj_type, params_proj));
176 unique_ptr<Smear> smear(
177 Smear::New(smear_type, proj.get(), params_smear));
179 unique_ptr<ForceSmear> force_smear(
180 ForceSmear::New(smear_type, proj.get(), params_smear));
182 unique_ptr<Director_Smear> dr_smear(
186 unique_ptr<Fopr> fopr_dw(
187 Fopr::New(
"Domainwall", params_dw));
189 unique_ptr<Force> forceF_dw(
192 unique_ptr<Fopr> fopr_smear(
193 Fopr::New(
"Smeared", fopr_dw.get(), dr_smear.get()));
195 unique_ptr<Force> forceF_smear(
199 unique_ptr<Solver> solver_MD(
200 Solver::New(solver_MD_type, fopr_smear.get(), params_solver_MD));
202 unique_ptr<Fprop> fprop_MD(
205 unique_ptr<Solver> solver_H(
206 Solver::New(solver_H_type, fopr_smear.get(), params_solver_H));
208 unique_ptr<Fprop> fprop_H(
212 unique_ptr<Fopr> fopr_dw_pv(
213 Fopr::New(
"Domainwall", params_dw_pv));
215 unique_ptr<Force> forceF_dw_pv(
218 unique_ptr<Fopr> fopr_smear_pv(
219 Fopr::New(
"Smeared", fopr_dw_pv.get(), dr_smear.get()));
221 unique_ptr<Force> forceF_smear_pv(
225 unique_ptr<Solver> solver_H_pv(
226 Solver::New(solver_H_type, fopr_smear_pv.get(), params_solver_H));
228 unique_ptr<Fprop> fprop_H_pv(
232 unique_ptr<Action> action_F(
234 fopr_smear.get(), forceF_smear.get(),
236 fprop_MD.get(), fprop_H.get()));
240 actions.
append(level_action[0], action_F.get());
241 actions.
append(level_action[1], action_G.get());
243 std::vector<Director *> directors(1);
244 directors[0] =
static_cast<Director *
>(dr_smear.get());
246 unique_ptr<Builder_Integrator> builder(
253 HMC_General hmc(actions, directors, integrator, rand.get(), params_hmc);
263 for (
int traj = 0; traj < Ntraj; ++traj) {
265 vout.
general(
vl,
"---------------------------------------------------\n");
270 if ((i_conf + traj + 1) % i_save_conf == 0) {