51 #ifdef USE_TESTMANAGER_AUTOREGISTER
83 namespace Test_HMC_Clover_SF {
86 const std::string filename_input =
"test_HMC_Clover_SF_Leapfrog_Nf2.yaml";
87 const std::string filename_output =
"stdout";
89 class Parameters_Test_HMC_Clover_SF :
public Parameters {
91 Parameters_Test_HMC_Clover_SF()
93 Register_string(
"gauge_config_status",
"NULL");
95 Register_string(
"gauge_config_type_input",
"NULL");
96 Register_string(
"config_filename_input",
"NULL");
98 Register_string(
"gauge_config_type_output",
"NULL");
99 Register_string(
"config_filename_output",
"NULL");
101 Register_int(
"trajectory_number", 0);
102 Register_int(
"trajectory_number_step", 0);
103 Register_int(
"save_config_interval", 0);
105 Register_string(
"verbose_level",
"NULL");
107 Register_double(
"expected_result", 0.0);
115 #ifdef USE_TESTMANAGER_AUTOREGISTER
118 "HMC.Clover_SF.Leapfrog_Nf2",
131 int NinG = 2 * Nc * Nc;
133 Parameters *params_test =
new Parameters_Test_HMC_Clover_SF;
154 params_manager.
read_params(filename_input, params_all);
156 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
157 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
158 const string readfile = params_test->
get_string(
"config_filename_input");
159 const string str_gconf_write = params_test->
get_string(
"gauge_config_type_output");
160 const string writefile = params_test->
get_string(
"config_filename_output");
161 int iconf = params_test->
get_int(
"trajectory_number");
162 int Ntraj = params_test->
get_int(
"trajectory_number_step");
163 const int i_save_conf = params_test->
get_int(
"save_config_interval");
164 const string str_vlevel = params_test->
get_string(
"verbose_level");
166 const double expected_result = params_test->
get_double(
"expected_result");
169 const string str_gmset_type = params_clover->
get_string(
"gamma_matrix_type");
170 const string str_proj_type = params_proj->
get_string(
"projection_type");
171 const string str_smear_type = params_smear->
get_string(
"smear_type");
176 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
177 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
178 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
179 vout.
general(vl,
" gconf_write = %s\n", str_gconf_write.c_str());
180 vout.
general(vl,
" writefile = %s\n", writefile.c_str());
183 vout.
general(vl,
" i_save_conf = %d\n", i_save_conf);
184 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());
202 vout.
crucial(vl,
"Test_HMC_Clover_SF: Input parameters have not been set.\n");
211 if (str_gconf_status ==
"Continue") {
213 }
else if (str_gconf_status ==
"Start_cold") {
216 vout.
crucial(vl,
"Test_HMC_Clover_SF: unsupported gconf status \"%s\".\n", 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);
247 action_F_Nf2->
set_label(
"Nf=2 smeared clover fermion");
250 valarray<Action *> actions(2);
251 actions[0] = (
Action *)action_F_Nf2;
252 actions[1] = (
Action *)action_G;
254 valarray<Director *> directors(1);
255 directors[0] = (
Director *)dr_smear;
269 std::vector<unsigned long> seed(4);
284 vout.
general(vl,
"HMC start: Ntraj = %d\n", Ntraj);
287 for (
int traj = 0; traj < Ntraj; ++traj) {
301 delete params_action_G;
302 delete params_clover;
304 delete params_dr_smear;
305 delete params_integrator;
325 delete force_fopr_smear;