16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Fopr_Chebyshev::register_factory();
27 const string str_vlevel = params.
get_string(
"verbose_level");
33 double v_threshold, v_max;
36 err += params.
fetch_int(
"degree_of_polynomial", Np);
37 err += params.
fetch_double(
"threshold_value", v_threshold);
73 const double b_max = v_max / v_threshold;
74 const double r = 2.0 / (b_max * b_max - 1.0);
75 const double s = v_threshold / sqrt(0.5 * r);
88 assert(v.
nin() == w.
nin());
90 assert(v.
nex() == w.
nex());
92 const int Nin = w.
nin();
93 const int Nvol = w.
nvol();
94 const int Nex = w.
nex();
96 std::vector<Field> dj(3);
97 for (
int k = 0; k < 3; ++k) {
98 dj[k].reset(Nin, Nvol, Nex);
109 for (
int j =
m_Npcb; j >= 2; --j) {
115 axpy(dj[jn], -1.0, dj[jp2]);
125 axpy(v, -1.0, dj[jp2]);
132 std::vector<double> dj(3);
141 for (
int j =
m_Npcb; j >= 2; --j) {
142 dj[jn] = x * dj[jp1];
144 dj[jn] +=
m_Fcb2 * dj[jp1];
147 dj[jn] -= 1.0 * dj[jp2];
154 double v = x * dj[jp1];
void scal(Field &x, const double a)
scal(x, a): x = a * x
void general(const char *format,...)
Container of Field-type object.
int fetch_double(const string &key, double &value) const
Bridge::VerboseLevel m_vl
int fetch_int(const string &key, int &value) const
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void crucial(const char *format,...)
void set_parameters(const Parameters ¶ms)
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
int non_negative(const int v)
static const std::string class_name
string get_string(const string &key) const
static VerboseLevel set_verbose_level(const std::string &str)