Go to the documentation of this file.
31 const std::string
test_name =
"HotStart.Eigenvalue";
35 const std::string filename_input =
"test_HotStart_Eigenvalue.yaml";
41 #ifdef USE_TESTMANAGER_AUTOREGISTER
43 #if defined(USE_GROUP_SU2)
62 const double pi = 4.0 * atan(1.0);
68 const string str_vlevel = params_test.
get_string(
"verbose_level");
70 const bool do_check = params_test.
is_set(
"expected_result");
71 const double expected_result = do_check ? params_test.
get_double(
"expected_result") : 0.0;
79 const int i_seed_noise = 1234567;
95 std::valarray<double> vec(2 * Nc);
97 for (
int site = 0; site < Nvol; ++site) {
98 for (
int mu = 0; mu < Ndim; ++mu) {
99 vec = eigen_qr.
solve(U.
ptr(0, site, mu));
100 for (
int icolor = 0; icolor < Nc; ++icolor) {
101 double arg = atan2(vec[2 * icolor + 1], vec[2 * icolor]);
114 av = av_all / Nvol / NPE / Ndim / Nc;
115 va = va_all / Nvol / NPE / Ndim / Nc - av * av;
124 vout.
general(
vl,
" var(expected) = %23.16e\n", pi / sqrt(3.0));
126 const double result = av;
int verify(const double result, const double expected, double eps)
void detailed(const char *format,...)
std::valarray< double > solve(const double *matrix)
const std::string test_name
static int reduce_sum(int count, dcomplex *recv_buf, dcomplex *send_buf, int pattern=0)
make a global sum of an array of dcomplex over the communicator. pattern specifies the dimensions to ...
Random number generator base on M-series.
static void read(const std::string ¶ms_file, Parameters ¶ms)
double get_double(const string &key) const
const double * ptr(const int jin, const int site, const int jex) const
static VerboseLevel set_verbose_level(const std::string &str)
bool is_set(const string &key) const
string get_string(const string &key) const
void general(const char *format,...)
void set_random(RandomNumbers *rand)
Parameters lookup(const string &key) const
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
static bool RegisterTest(const std::string &key, const Test_function func)