43 namespace Test_QuarkNumSuscept {
44 const std::string
test_name =
"QuarkNumberSusceptibility.Clover_Isochemical";
48 const std::string filename_input =
"test_QuarkNumberSusceptibility_Clover_Isochemical.yaml";
54 #ifdef USE_TESTMANAGER_AUTOREGISTER
56 #if defined(USE_GROUP_SU2)
77 const Parameters params_test = params_all.
lookup(
"Test_QuarkNumSuscept_Clover_Isochemical");
78 const Parameters params_clover = params_all.
lookup(
"Fopr_Clover_Isochemical");
84 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
85 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
86 const string readfile = params_test.
get_string(
"config_filename_input");
87 const string str_rand_type = params_test.
get_string(
"random_number_type");
88 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
89 const int i_seed_noise = params_test.
get_int(
"int_seed_for_noise");
90 const string str_vlevel = params_test.
get_string(
"verbose_level");
92 const bool do_check = params_test.
is_set(
"expected_result");
93 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
95 const string str_gmset_type = params_clover.
get_string(
"gamma_matrix_type");
96 const string str_proj_type = params_proj.
get_string(
"projection_type");
97 const string str_smear_type = params_smear.
get_string(
"smear_type");
98 const string str_solver_type = params_solver.
get_string(
"solver_type");
103 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
104 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
105 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
106 vout.
general(vl,
" rand_type = %s\n", str_rand_type.c_str());
108 vout.
general(vl,
" i_seed_noise = %d\n", i_seed_noise);
109 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
110 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
111 vout.
general(vl,
" proj_type = %s\n", str_proj_type.c_str());
112 vout.
general(vl,
" smear_type = %s\n", str_smear_type.c_str());
113 vout.
general(vl,
" solver_type = %s\n", str_solver_type.c_str());
132 if (str_gconf_status ==
"Continue") {
134 }
else if (str_gconf_status ==
"Cold_start") {
136 }
else if (str_gconf_status ==
"Hot_start") {
139 vout.
crucial(vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
178 const double result = quark_suscept->
measure();
189 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
virtual void set_parameters(const Parameters ¶m)=0
void general(const char *format,...)
int solver(const std::string &)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
const std::string test_name
virtual void set_parameters(const Parameters &)=0
int get_int(const string &key) const
virtual void set_parameters(const Parameters ¶ms)=0
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
static bool initialize(const std::string &rng_type, unsigned long seed)
void read(Field_G *U, const string &filename=string())
unsigned long get_unsigned_long(const string &key) const
double get_double(const string &key) const
Quark number susceptibility for the Wilson-type fermion.
virtual void set_parameters(const Parameters &)=0
int quark_num_suscept(void)
double measure()
measure tr1 = Tr[D1*Sq], tr2 = Tr[D2*Sq], tr3 = Tr[D1*Sq*D1*Sq].
int non_NULL(const std::string v)
bool is_set(const string &key) const
Get quark propagator for Fopr with lexical site index.
void crucial(const char *format,...)
virtual void set_parameters(const Parameters ¶ms)=0
static void read(const std::string ¶ms_file, Parameters ¶ms)
Manager of smeared configurations.
int verify(const double result, const double expected, double eps)
void set_parameters(const Parameters ¶ms)
int non_zero(const double v)
GaugeConfig class for file I/O of gauge configuration.
Z2 Noise vector for a trace calculation.
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)