21 const string str_vlevel = params.
get_string(
"verbose_level");
27 std::vector<double> sigma;
32 err += params.
fetch_int(
"number_of_shifts", Nshift);
34 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
35 err += params.
fetch_double(
"convergence_criterion_squared", Stop_cond);
49 const int Niter,
const double Stop_cond)
54 for (
int i = 0; i < Nshift; ++i) {
84 const int Nin = b.
nin();
85 const int Nvol = b.
nvol();
86 const int Nex = b.
nex();
90 std::vector<double> sigma =
m_sigma;
92 std::vector<Field> xq(Nshift);
94 for (
int i = 0; i < Nshift; ++i) {
95 xq[i].reset(Nin, Nvol, Nex);
107 assert(xq2->size() == sigma.size());
122 solver->
solve(xq, sigma, (
Field)b, Nconv, diff);
132 for (
int i = 0; i < Nshift; ++i) {
134 double sg = sigma[i];
143 for (
int i = 0; i < Nshift; ++i) {
147 const double result = diff1;
int fetch_double_vector(const string &key, vector< double > &value) const
double dot(const Field &y, const Field &x)
void general(const char *format,...)
int solver(const std::string &)
Container of Field-type object.
int fetch_double(const string &key, double &value) const
Multishift Conjugate Gradient solver.
static const std::string class_name
Wilson-type fermion field.
int square_non_zero(const double v)
std::vector< double > m_sigma
int fetch_int(const string &key, int &value) const
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
void crucial(const char *format,...)
int non_zero(const double v)
Bridge::VerboseLevel m_vl
void mult(Field &v, const Field &f)
multiplies fermion operator to a given field (2nd argument)
void set_parameters(const Parameters ¶ms)
double invert_D(std::vector< Field_F > *, const Field_F &)
string get_string(const string &key) const
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)
void set_mode(const std::string mode)
setting the mode of multiplication if necessary. Default implementation here is just to avoid irrelev...