Go to the documentation of this file.
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());
108 unique_ptr<FFT> fft(FFT::New(str_fft_type, params_fft));
110 unique_ptr<Source> source(Source::New(str_source_type, params_source));
121 const int i_spin = 0;
122 const int i_color = 0;
124 const int idx = i_color + Nc * i_spin;
135 if (Communicator::nodeid() == 0) {
136 const int i_site = index.
site(0, 0, 0, 0);
137 result = b.
cmp_r(i_color, i_spin, i_site);
int verify(const double result, const double expected, double eps)
const std::string test_name
void set(const int jin, const int site, const int jex, double v)
void detailed(const char *format,...)
double cmp_r(const int cc, const int s, const int site, const int e=0) const
int idx(const int in, const int Nin, const int ist, const int Nx2, const int Ny, const int leo, const int Nvol2, const int ex)
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
int site(const int &x, const int &y, const int &z, const int &t) const
static VerboseLevel set_verbose_level(const std::string &str)
bool is_set(const string &key) const
Wilson-type fermion field.
string get_string(const string &key) const
void general(const char *format,...)
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)