45 const std::string filename_input =
"test_ShiftSolver_Wilson.yaml";
46 const std::string filename_output =
"stdout";
48 class Parameters_Test_ShiftSolver :
public Parameters {
50 Parameters_Test_ShiftSolver()
52 Register_string(
"gauge_config_status",
"NULL");
53 Register_string(
"gauge_config_type_input",
"NULL");
54 Register_string(
"config_filename_input",
"NULL");
56 Register_string(
"verbose_level",
"NULL");
58 Register_double(
"expected_result", 0.0);
66 #ifdef USE_TESTMANAGER_AUTOREGISTER
68 #if defined(USE_GROUP_SU2)
101 const string str_gconf_status = params_test->
get_string(
"gauge_config_status");
102 const string str_gconf_read = params_test->
get_string(
"gauge_config_type_input");
103 const string readfile = params_test->
get_string(
"config_filename_input");
104 const string str_vlevel = params_test->
get_string(
"verbose_level");
106 const bool do_check = params_test->
is_set(
"expected_result");
107 const double expected_result = do_check ? params_test->
get_double(
"expected_result") : 0.0;
109 const string str_gmset_type = params_wilson->
get_string(
"gamma_matrix_type");
110 const int Nshift = params_solver->
get_int(
"number_of_shifts");
111 const string str_source_type = params_source->
get_string(
"source_type");
116 vout.
general(vl,
" gconf_status = %s\n", str_gconf_status.c_str());
117 vout.
general(vl,
" gconf_read = %s\n", str_gconf_read.c_str());
118 vout.
general(vl,
" readfile = %s\n", readfile.c_str());
119 vout.
general(vl,
" vlevel = %s\n", str_vlevel.c_str());
120 vout.
general(vl,
" gmset_type = %s\n", str_gmset_type.c_str());
122 vout.
general(vl,
" source_type = %s\n", str_source_type.c_str());
130 vout.
crucial(vl,
"%s: Input parameters have not been set.\n", test_name.c_str());
139 if (str_gconf_status ==
"Continue") {
141 }
else if (str_gconf_status ==
"Cold_start") {
143 }
else if (str_gconf_status ==
"Hot_start") {
144 int i_seed_noise = 1234567;
148 vout.
crucial(vl,
"%s: unsupported gconf status \"%s\".\n", test_name.c_str(), str_gconf_status.c_str());
173 std::vector<Field_F> xq_shift(Nshift);
183 int idx = icolor + Nc * ispin;
185 result = fprop_shift->
calc(&xq_shift, b);
195 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
void general(const char *format,...)
virtual void set_config(Field *)=0
setting pointer to the gauge configuration.
Test of multishift solver.
int get_int(const string &key) const
static Parameters * New(const std::string &realm)
void read_file(Field *U, const string &filename)
void set_random(RandomNumbers *rand)
Wilson-type fermion field.
static bool RegisterTest(const std::string &key, const Test_function func)
bool is_set(const string &) const
double get_double(const string &key) const
virtual void set_parameters(const Parameters &)=0
int non_NULL(const std::string v)
virtual void set(Field &, int)=0
void crucial(const char *format,...)
void Register_Parameters(const string &, Parameters *const)
const std::string test_name
int verify(const double result, const double expected, double eps)
static void read(const std::string ¶ms_file, Parameters *params)
GaugeConfig class for file I/O of gauge configuration.
void set_parameters(const Parameters ¶ms)
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
virtual void set_parameters(const Parameters &)=0
static VerboseLevel set_verbose_level(const std::string &str)
double calc(std::vector< Field_F > *, const Field_F &)