16 #ifdef USE_FACTORY_AUTOREGISTER
18 bool init = Fopr_Rational_SF::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++) {
144 assert(v.
nin() == b.
nin());
146 assert(v.
nex() == b.
nex());
166 for (
int i = 0; i <
m_Np; i++) {
179 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)
double func(const double x)
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...
Container of Field-type object.
int fetch_double(const string &key, double &value) const
Multishift Conjugate Gradient solver.
static const std::string class_name
void copy(Field &y, const Field &x)
copy(y, x): y = x
std::vector< Field > m_xq
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)
void set_parameters(const Parameters ¶ms)
void mult(Field &v, const Field &f)
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,...)
Shiftsolver_CG * m_solver
void set_boundary_zero(Field &f)
int non_zero(const double v)
string get_string(const string &key) const
virtual int field_nvol()=0
returns the volume for which the fermion operator is defined.
std::vector< double > m_cl
A class generated to add a function for the SF.
static VerboseLevel set_verbose_level(const std::string &str)
std::vector< double > m_bl
void solve(std::vector< Field > &solution, const std::vector< double > &shift, const Field &source, int &Nconv, double &diff)