30 namespace Test_HotStart {
31 const std::string
test_name =
"HotStart.Determinant";
35 const std::string filename_input =
"test_HotStart_Determinant.yaml";
41 #ifdef USE_TESTMANAGER_AUTOREGISTER
43 #if defined(USE_GROUP_SU2)
67 const string str_vlevel = params_test.
get_string(
"verbose_level");
69 const bool do_check = params_test.
is_set(
"expected_result");
70 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
78 const int i_seed_noise = 1234567;
96 for (
int site = 0; site < Nvol; ++site) {
97 for (
int mu = 0; mu < Ndim; ++mu) {
103 re_va += real(det) * real(det);
105 im_va += imag(det) * imag(det);
114 re_av = re_av_all / Nvol / NPE / Ndim;
115 im_av = im_av_all / Nvol / NPE / Ndim;
116 re_va = re_va_all / Nvol / NPE / Ndim - re_av * re_av;
117 im_va = im_va_all / Nvol / NPE / Ndim - im_av * im_av;
125 vout.
general(vl,
" ave Re(det) = %23.16e\n", re_av);
126 vout.
general(vl,
" var Re(det) = %23.16e\n", re_va);
127 vout.
general(vl,
" ave Im(det) = %23.16e\n", im_av);
128 vout.
general(vl,
" var Im(det) = %23.16e\n", im_va);
130 const double result = re_av;
138 vout.
detailed(vl,
"check skipped: expected_result not set.\n\n");
Random number generator base on M-series.
void detailed(const char *format,...)
const double * ptr(const int jin, const int site, const int jex) const
void general(const char *format,...)
const std::string test_name
void set_random(RandomNumbers *rand)
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)
void set_matrix(const double *mat)
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
string get_string(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static VerboseLevel set_verbose_level(const std::string &str)