Go to the documentation of this file.
25 # if __has_include(<fj_tool/fapp.h>)
26 # include <fj_tool/fapp.h>
45 const std::string filename_input =
"test_Mult_Domainwall.yaml";
51 #ifdef USE_TESTMANAGER_AUTOREGISTER
77 const string str_gconf_status = params_test.
get_string(
"gauge_config_status");
78 const string str_gconf_read = params_test.
get_string(
"gauge_config_type_input");
79 const string readfile = params_test.
get_string(
"config_filename_input");
80 const string str_rand_type = params_test.
get_string(
"random_number_type");
81 const unsigned long seed = params_test.
get_unsigned_long(
"seed_for_random_number");
82 const int Nmult = params_test.
get_int(
"number_of_mult");
83 const string str_vlevel = params_test.
get_string(
"verbose_level");
85 const bool do_check = params_test.
is_set(
"expected_result");
86 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
87 const double tolerance = params_test.
get_double(
"tolerance");
89 const int Ns = params_dwall.
get_int(
"extent_of_5th_dimension");
94 vout.
general(
vl,
" gconf_status = %s\n", str_gconf_status.c_str());
95 vout.
general(
vl,
" gconf_read = %s\n", str_gconf_read.c_str());
119 if (str_gconf_status ==
"Continue") {
121 }
else if (str_gconf_status ==
"Cold_start") {
123 }
else if (str_gconf_status ==
"Hot_start") {
126 vout.
crucial(
vl,
"Error at %s: unsupported gconf status \"%s\"\n",
test_name.c_str(), str_gconf_status.c_str());
149 Field y(Nin_dw, Nvol_dw, Nex_dw);
150 Field b(Nin_dw, Nvol_dw, Nex_dw);
164 for (
int i = 0; i < Nmult; ++i) {
183 const double gflo_mult_Domainwall = (464 * Nc + 240) * Ns * (Nvol * (NPE / 1.0e+9));
184 const double gflops_mult_Domainwall = gflo_mult_Domainwall * Nmult / (elapse_sec * NPE * Nthread);
193 #if defined(USE_GROUP_SU2)
198 return Test::verify(result, expected_result, tolerance);
int verify(const double result, const double expected, double eps)
int non_NULL(const std::string v)
void set(const int jin, const int site, const int jex, double v)
Test of Mult with Domainwall fermion.
int get_int(const string &key) const
void detailed(const char *format,...)
void read(Field_G &U, const string &filename=string())
Domain-wall fermion operator.
void mult(AFIELD &v, const AFIELD &w)
multiplies fermion operator to a given field.
static bool initialize(const std::string &rng_type, unsigned long seed)
int field_nvol()
returns the volume of the fermion field.
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
int field_nex()
returns the external degree of freedom of the fermion field.
int field_nin()
returns the on-site degree of freedom of the fermion field.
unsigned long get_unsigned_long(const string &key) const
void set_config(Field *U)
sets the gauge configuration.
static int get_num_threads_available()
returns number of threads (works outside of parallel region).
GaugeConfig class for file I/O of gauge configuration.
static VerboseLevel set_verbose_level(const std::string &str)
bool is_set(const string &key) const
const std::string test_name
string get_string(const string &key) const
void crucial(const char *format,...)
void set_mode(std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
Container of Field-type object.
double elapsed_sec() const
void general(const char *format,...)
Parameters lookup(const string &key) const
static bool RegisterTest(const std::string &key, const Test_function func)