16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Fopr_Rational::register_factory();
27 const string str_vlevel = params.
get_string(
"verbose_level");
38 err += params.
fetch_int(
"number_of_poles", Np);
39 err += params.
fetch_int(
"exponent_numerator", n_exp);
40 err += params.
fetch_int(
"exponent_denominator", d_exp);
43 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
44 err += params.
fetch_double(
"convergence_criterion_squared", Stop_cond);
58 const double x_min,
const double x_max,
59 const int Niter,
const double Stop_cond)
106 const int Nshift =
m_Np;
115 for (
int i = 0; i < Nshift; ++i) {
116 m_xq[i].reset(Nin, Nvol, Nex);
126 for (
int i = 0; i <
m_Np; i++) {
136 assert(v.
nin() == b.
nin());
138 assert(v.
nex() == b.
nex());
153 for (
int i = 0; i <
m_Np; i++) {
164 for (
int k = 0; k <
m_Np; ++k) {
void scal(Field &x, const double a)
scal(x, a): x = a * x
void get_parameters(double &norm, std::vector< double > &res, std::vector< double > &pole)
void general(const char *format,...)
void set_parameters(const Parameters ¶ms)
virtual void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...
std::vector< Field > m_xq
Container of Field-type object.
int fetch_double(const string &key, double &value) const
Multishift Conjugate Gradient solver.
void copy(Field &y, const Field &x)
copy(y, x): y = x
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
std::vector< double > m_cl
virtual int field_nin()=0
returns the on-site d.o.f. for which the fermion operator is defined.
Determionation of coefficients of rational approximation.
int square_non_zero(const double v)
Shiftsolver_CG * m_solver
Bridge::VerboseLevel m_vl
int fetch_int(const string &key, int &value) const
virtual int field_nex()=0
returns the external d.o.f. for which the fermion operator is defined.
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void crucial(const char *format,...)
static const std::string class_name
void set_parameters(const Parameters ¶ms)
double func(const double x)
int non_zero(const double v)
std::vector< double > m_bl
string get_string(const string &key) const
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
static VerboseLevel set_verbose_level(const std::string &str)
void solve(std::vector< Field > &solution, const std::vector< double > &shift, const Field &source, int &Nconv, double &diff)