25 bool init = Solver::Factory::Register(
"BiCGStab", create_object);
40 #ifdef USE_PARAMETERS_FACTORY
55 const string str_vlevel = params.
get_string(
"verbose_level");
64 err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
65 err += params.
fetch_double(
"convergence_criterion_squared", Stop_cond);
105 int& Nconv,
double& diff)
107 double bnorm2 = b.
norm2();
108 double snorm = 1.0 / bnorm2;
109 int bsize = b.
size();
124 bool is_converged =
false;
129 for (
int iter = 0; iter <
m_Niter; iter++) {
130 if (is_converged)
break;
143 Nconv2 = 2 * (iter + 1);
186 if ((
s.
nin() != Nin) || (
s.
nvol() != Nvol) || (
s.
nex() != Nex)) {
242 double alpha = rho / aden;
249 double omega_d =
dot(
t,
t);
250 double omega_n =
dot(
t,
s);
251 double omega = omega_n / omega_d;
void detailed(const char *format,...)
void Register_string(const string &, const string &)
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
void set(const int jin, const int site, const int jex, double v)
double dot(const Field &y, const Field &x)
void general(const char *format,...)
void Register_int(const string &, const int)
Container of Field-type object.
void set_parameters(const Parameters ¶ms)
void copy(Field &y, const Field &x)
copy(y, x): y = x
Parameters_Solver_BiCGStab()
void solve_init(const Field &, double &)
int square_non_zero(const double v)
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=COMPLEX)
void aypx(const double a, Field &y, const Field &x)
aypx(y, a, x): y := a * y + x
void paranoiac(const char *format,...)
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
Base class for linear solver class family.
static bool Register(const std::string &realm, const creator_callback &cb)
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument)
void solve_step(double &)
int non_negative(const int v)
void Register_double(const string &, const double)
void reset_field(const Field &)
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
Bridge::VerboseLevel m_vl
static VerboseLevel set_verbose_level(const std::string &str)
static void assert_single_thread(const std::string &classname)
assert currently running on single thread.