19 const std::string
test_name =
"sample_Spectrum";
20 const std::string parameter_file_default =
"sample_Spectrum_Wilson_Hadron2ptFunction.yaml";
34 void usage(
const char *program_name)
36 vout.
general(
"\n\nusage: %s parameter_file\n\n", program_name);
55 const string str_gconf_status = params_spectrum.
get_string(
"gauge_config_status");
56 const string str_gconf_read = params_spectrum.
get_string(
"gauge_config_type_input");
57 const string readfile = params_spectrum.
get_string(
"config_filename_input");
58 const string str_rand_type = params_spectrum.
get_string(
"random_number_type");
59 const unsigned long seed = params_spectrum.
get_unsigned_long(
"seed_for_random_number");
60 const string str_vlevel = params_spectrum.
get_string(
"verbose_level");
65 const string str_gfix_type = params_gfix.
get_string(
"gauge_fixing_type");
66 const string str_fopr_type = params_fopr.
get_string(
"fermion_type");
67 const string str_gmset_type = params_fopr.
get_string(
"gamma_matrix_type");
68 const string str_solver_type = params_solver.
get_string(
"solver_type");
69 const string str_source_type = params_source.
get_string(
"source_type");
74 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
75 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
81 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
82 vout.
general(
vl,
" solver_type = %s\n", str_solver_type.c_str());
83 vout.
general(
vl,
" source_type = %s\n", str_source_type.c_str());
94 if (str_solver_type ==
"CG") {
99 if ((str_gfix_type ==
"Coulomb") || (str_gfix_type ==
"Landau")) {
114 if (str_gconf_status ==
"Continue") {
116 }
else if (str_gconf_status ==
"Cold_start") {
118 }
else if (str_gconf_status ==
"Hot_start") {
121 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
128 unique_ptr<GaugeFixing> gfix(GaugeFixing::New(str_gfix_type, params_gfix));
136 unique_ptr<GammaMatrixSet> gmset(GammaMatrixSet::New(str_gmset_type));
138 unique_ptr<Fopr> fopr(Fopr::New(str_fopr_type, params_fopr));
139 fopr->set_config(&U);
141 unique_ptr<Solver>
solver(Solver::New(str_solver_type, fopr.get(), params_solver));
145 unique_ptr<Source> source(Source::New(str_source_type, params_source));
155 std::vector<Field_F> sq(Nc * Nd);
156 for (
int i_cd = 0; i_cd < Nc * Nd; ++i_cd) {
164 for (
int ispin = 0; ispin < Nd; ++ispin) {
165 for (
int icolor = 0; icolor < Nc; ++icolor) {
166 int i_cd = icolor + Nc * ispin;
169 source->
set(b, i_cd);
173 fprop_lex->invert_D(sq[i_cd], b, Nconv, diff);
177 fopr->mult(y, sq[i_cd]);
182 icolor, ispin, Nconv, diff, diff2);
190 const double result = corr.
meson_all(sq, sq);
208 int main(
int argc,
char *argv[])
219 std::string parameter_file = std::string(argv[1]);