34 const std::string filename_input =
"test_FFT.yaml";
40 #ifdef USE_TESTMANAGER_AUTOREGISTER
70 const string str_vlevel = params_test.
get_string(
"verbose_level");
72 const bool do_check = params_test.
is_set(
"expected_result");
73 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
75 const string str_fft_type = params_fft.
get_string(
"FFT_type");
76 const string str_source_type = params_source.
get_string(
"source_type");
87 if (str_fft_type ==
"FFT_xyz_1dim") {
89 ((NPEx * NPEy == 1) || (NPEx * NPEz == 1) || (NPEy * NPEz == 1)))
93 vout.
general(vl,
"%s: FFT_xyz_1dim supports parallelization in one direction among x, y, z. skip.\n",
test_name.c_str());
96 }
else if (str_fft_type ==
"FFT_xyz_3dim") {
97 if ((NPEt == 1) && (NPEx == 1) && (NPEy == 1) && (NPEz == 1))
101 vout.
general(vl,
"%s: FFT_xyz_3dim supports parallelization only in z direction. skip.\n",
test_name.c_str());
109 fft->set_parameters(params_fft);
112 source->set_parameters(params_source);
122 const int i_spin = 0;
123 const int i_color = 0;
125 const int idx = i_color + Nc * i_spin;
137 const int i_site = index->site(0, 0, 0, 0);
138 result = b.
cmp_r(i_color, i_spin, i_site);
147 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
void detailed(const char *format,...)
void set(const int jin, const int site, const int jex, double v)
void general(const char *format,...)
const std::string test_name
Wilson-type fermion field.
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)
double get_double(const string &key) const
bool is_set(const string &key) const
static void read(const std::string ¶ms_file, Parameters ¶ms)
int verify(const double result, const double expected, double eps)
static int nodeid()
alternative name for self().
string get_string(const string &key) const
static VerboseLevel set_verbose_level(const std::string &str)
double cmp_r(const int cc, const int s, const int site, const int e=0) const