16 #ifdef USE_PARAMETERS_FACTORY
28 bool init = Fopr::Factory_fopr::Register(
"Chevyshev", create_object);
44 #ifdef USE_PARAMETERS_FACTORY
59 const string str_vlevel = params.
get_string(
"verbose_level");
65 double v_threshold, v_max;
68 err += params.
fetch_int(
"degree_of_polynomial", Np);
69 err += params.
fetch_double(
"threshold_value", v_threshold);
105 double b_max = v_max / v_threshold;
106 double r = 2.0 / (b_max * b_max - 1.0);
107 double s = v_threshold / sqrt(0.5 * r);
120 std::vector<Field> dj(3);
125 assert(v.
nin() == Nin);
126 assert(v.
nvol() == Nvol);
127 assert(v.
nex() == Nex);
129 for (
int k = 0; k < 3; ++k) {
130 dj[k].reset(Nin, Nvol, Nex);
141 for (
int j =
m_Npcb; j >= 2; --j) {
147 axpy(dj[jn], -1.0, dj[jp2]);
157 axpy(v, -1.0, dj[jp2]);
164 std::vector<double> dj(3);
173 for (
int j =
m_Npcb; j >= 2; --j) {
174 dj[jn] = x * dj[jp1];
176 dj[jn] +=
m_Fcb2 * dj[jp1];
179 dj[jn] -= 1.0 * dj[jp2];
186 double v = x * dj[jp1];
void scal(Field &x, const double a)
scal(x, a): x = a * x
void Register_string(const string &, const string &)
void general(const char *format,...)
void Register_int(const string &, const int)
Container of Field-type object.
Parameters_Fopr_Chebyshev()
Bridge::VerboseLevel m_vl
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,...)
static bool Register(const std::string &realm, const creator_callback &cb)
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)
void Register_double(const string &, const double)
static const std::string class_name
Base class of fermion operator family.
int fetch_double(const string &key, double &val) const
string get_string(const string &key) const
int fetch_int(const string &key, int &val) const
static VerboseLevel set_verbose_level(const std::string &str)