19 const std::string
test_name =
"sample_Spectrum";
20 const std::string parameter_file_default =
"sample_Spectrum_Wilson_Hadron2ptFunction.yaml";
33 void usage(
const char *program_name)
35 vout.
general(
"\n\nusage: %s parameter_file\n\n", program_name);
56 const string str_gconf_status = params_spectrum.
get_string(
"gauge_config_status");
57 const string str_gconf_read = params_spectrum.get_string(
"gauge_config_type_input");
58 const string readfile = params_spectrum.get_string(
"config_filename_input");
59 const string str_rand_type = params_spectrum.get_string(
"random_number_type");
60 const unsigned long seed = params_spectrum.get_unsigned_long(
"seed_for_random_number");
61 const string str_vlevel = params_spectrum.get_string(
"verbose_level");
66 const string str_gfix_type = params_gfix.get_string(
"gauge_fixing_type");
67 const string str_fopr_type = params_fopr.get_string(
"fermion_type");
68 const string str_gmset_type = params_fopr.get_string(
"gamma_matrix_type");
69 const string str_solver_type = params_solver.get_string(
"solver_type");
70 const string str_source_type = params_source.get_string(
"source_type");
76 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
77 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
83 vout.
general(
vl,
" gmset_type = %s\n", str_gmset_type.c_str());
84 vout.
general(
vl,
" solver_type = %s\n", str_solver_type.c_str());
85 vout.
general(
vl,
" source_type = %s\n", str_source_type.c_str());
96 if (str_solver_type ==
"CG") {
107 if (str_gconf_status ==
"Continue") {
109 }
else if (str_gconf_status ==
"Cold_start") {
111 }
else if (str_gconf_status ==
"Hot_start") {
114 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
125 gfix->
fix(*Ufix, *U);
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]);
double meson_all(const std::vector< Field_F > &sq1, const std::vector< Field_F > &sq2)
void general(const char *format,...)
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
const std::string test_name
int solver(const std::string &)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Two-point correlator for Wilson-type fermions.
void usage(const char *program_name)
An example code to use gauge field.
int main(int argc, char *argv[])
void bridge_setup(const Parameters ¶ms)
void copy(Field &y, const Field &x)
copy(y, x): y = x
Wilson-type fermion field.
virtual void set_parameters(const Parameters ¶ms)=0
Parameters lookup(const string &key) const
virtual void invert_D(Field &, const Field &, int &, double &)=0
static bool initialize(const std::string &rng_type, unsigned long seed)
void read(Field_G *U, const string &filename=string())
virtual void set_parameters(const Parameters &)=0
int non_NULL(const std::string v)
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Get quark propagator for Fopr with lexical site index.
void crucial(const char *format,...)
static void read(const std::string ¶ms_file, Parameters ¶ms)
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
int hadron_2ptFunction(const Parameters ¶ms_all)
GaugeConfig class for file I/O of gauge configuration.
virtual void fix(Field_G &Ufix, const Field_G &Uorg)=0
virtual void set_parameters(const Parameters ¶ms)
string get_string(const string &key) const
compilation of Bridge++ header files
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
virtual void set_parameters(const Parameters &)=0
static VerboseLevel set_verbose_level(const std::string &str)
int bridge_initialize(int *pargc, char ***pargv)
virtual void set(Field &, const int)=0
virtual void set_parameters(const Parameters ¶ms)=0