21 const string str_vlevel = params.
get_string(
"verbose_level");
30 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
31 err += params.
fetch_double(
"convergence_criterion_squared", Stop_cond);
68 const std::vector<double>& sigma,
70 int& Nconv,
double& diff)
72 const int Nshift = sigma.size();
77 for (
int i = 0; i < Nshift; ++i) {
83 bool is_converged =
false;
102 for (
int iter = 0; iter <
m_Niter; iter++) {
105 Nconv2 += Nconv_unit;
121 std::vector<double> diffs(Nshift);
123 for (
int i = 0; i < Nshift; ++i) {
141 for (
int i = 0; i < Nshift; ++i) {
142 if (diffs[i] > diff2) diff2 = diffs[i];
150 for (
int i = 0; i < Nshift; ++i) {
161 const int Nshift =
m_p.size();
165 for (
int i = 0; i < Nshift; ++i) {
189 const double rr_p = rr;
191 const double beta = -rr_p / pa_p;
197 const double alpha = rr / rr_p;
210 for (
int ish = 1; ish <
m_Nshift2; ++ish) {
212 + (1.0 - alpha_h) /
m_zeta2[ish];
214 double zr = zeta /
m_zeta1[ish];
215 double beta_s = beta * zr;
216 double alpha_s = alpha * zr * zr;
222 double ppr =
m_p[ish].norm2();
237 for (
int ish = m_Nshift2 - 1; ish >= 0; --ish) {
263 const int Nin = b.
nin();
264 const int Nvol = b.
nvol();
265 const int Nex = b.
nex();
274 for (
int i = 0; i < Nshift; ++i) {
275 m_p[i].reset(Nin, Nvol, Nex);
276 m_x[i].reset(Nin, Nvol, Nex);
279 m_csh2[i] = sigma[i] - sigma[0];
void scal(Field &x, const double a)
scal(x, a): x = a * x
void detailed(const char *format,...)
static const std::string class_name
void reset_field(const Field &b, const std::vector< double > &sigma, const int Nshift)
std::vector< double > m_zeta2
double dot(const Field &y, const Field &x)
void solve_init(double &)
void general(const char *format,...)
Container of Field-type object.
int fetch_double(const string &key, double &value) const
void set_parameters(const Parameters ¶ms)
std::vector< double > m_csh2
void copy(Field &y, const Field &x)
copy(y, x): y = x
std::vector< double > m_zeta1
int square_non_zero(const double v)
int fetch_int(const string &key, int &value) const
virtual std::string get_mode() const
only for Fopr_Overlap
void aypx(const double a, Field &y, const Field &x)
aypx(y, a, x): y := a * y + x
void paranoiac(const char *format,...)
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void crucial(const char *format,...)
std::vector< double > m_pp
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
int non_negative(const int v)
void solve_step(double &)
string get_string(const string &key) const
Bridge::VerboseLevel m_vl
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)