25 bool init = Fopr::Factory_fopr::Register(
"Chevyshev", create_object);
36 const string str_vlevel = params.
get_string(
"verbose_level");
42 double v_threshold, v_max;
45 err += params.
fetch_int(
"degree_of_polynomial", Np);
46 err += params.
fetch_double(
"threshold_value", v_threshold);
82 double b_max = v_max / v_threshold;
83 double r = 2.0 / (b_max * b_max - 1.0);
84 double s = v_threshold / sqrt(0.5 * r);
97 std::vector<Field> dj(3);
102 assert(v.
nin() == Nin);
103 assert(v.
nvol() == Nvol);
104 assert(v.
nex() == Nex);
106 for (
int k = 0; k < 3; ++k) {
107 dj[k].reset(Nin, Nvol, Nex);
118 for (
int j =
m_Npcb; j >= 2; --j) {
124 axpy(dj[jn], -1.0, dj[jp2]);
134 axpy(v, -1.0, dj[jp2]);
141 std::vector<double> dj(3);
150 for (
int j =
m_Npcb; j >= 2; --j) {
151 dj[jn] = x * dj[jp1];
153 dj[jn] +=
m_Fcb2 * dj[jp1];
156 dj[jn] -= 1.0 * dj[jp2];
163 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)
Chebyshev polynomial of fermion operator.
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
Base class of fermion operator family.
string get_string(const string &key) const
static VerboseLevel set_verbose_level(const std::string &str)