25   bool init = Solver::Factory::Register(
"BiCGStab_DS_L_Cmplx", create_object);
 
   35   const string str_vlevel = params.
get_string(
"verbose_level");
 
   46   err += params.
fetch_int(
"maximum_number_of_iteration", Niter);
 
   47   err += params.
fetch_int(
"maximum_number_of_restart", Nrestart);
 
   48   err += params.
fetch_double(
"convergence_criterion_squared", Stop_cond);
 
   49   err += params.
fetch_int(
"number_of_orthonormal_vectors", N_L);
 
   50   err += params.
fetch_double(
"tolerance_for_DynamicSelection_of_L", Tol_L);
 
  117                                        int& Nconv, 
double& diff)
 
  119   double bnorm2 = b.
norm2();
 
  120   int    bsize  = b.
size();
 
  126   bool   is_converged = 
false;
 
  139   for (
int i_restart = 0; i_restart < 
m_Nrestart; i_restart++) {
 
  140     for (
int iter = 0; iter < 
m_Niter; iter++) {
 
  173     vout.
crucial(
m_vl, 
"  iter(final): %8d  %22.15e\n", Nconv2, diff2 / bnorm2);
 
  183     diff  = sqrt(diff2 / bnorm2);
 
  210     for (
int i = 0; i < 
m_N_L + 1; ++i) {
 
  211       m_u[i].reset(Nin, Nvol, Nex);
 
  212       m_r[i].reset(Nin, Nvol, Nex);
 
  226   for (
int i = 0; i < 
m_N_L + 1; ++i) {
 
  260   dcomplex c_Rayleigh_prev = cmplx(0.0, 0.0);
 
  262   bool is_converged_L = 
false;
 
  266     if (!is_converged_L) {
 
  270       dcomplex beta = alpha_prev2 * (rho / rho_prev2);
 
  274       for (
int i = 0; i < j + 1; ++i) {
 
  281       alpha_prev2 = rho_prev2 / conj(gamma);
 
  283       for (
int i = 0; i < j + 1; ++i) {
 
  295       double   r_tmp      = 
m_r[j].norm2();                    
 
  296       dcomplex c_Rayleigh = 
dotc(
m_r[j], 
m_r[j + 1]) / r_tmp;  
 
  298       dcomplex c_E = (c_Rayleigh - c_Rayleigh_prev) / c_Rayleigh;
 
  300       c_Rayleigh_prev = c_Rayleigh;
 
  310         is_converged_L = 
true;
 
  316   std::vector<double>   sigma(
m_N_L + 1);
 
  317   std::vector<dcomplex> gamma_prime(
m_N_L + 1);
 
  320   std::vector<dcomplex> tau(
m_N_L * (
m_N_L + 1));
 
  323   for (
int j = 1; j < N_L_tmp + 1; ++j) {
 
  324     for (
int i = 1; i < j; ++i) {
 
  328       tau[ij] = conj(r_ji) / sigma[i];  
 
  332     sigma[j] = 
m_r[j].norm2();  
 
  335     gamma_prime[j] = conj(r_0j) / sigma[j]; 
 
  339   std::vector<dcomplex> gamma(
m_N_L + 1);
 
  342   gamma[N_L_tmp] = gamma_prime[N_L_tmp];
 
  344   for (
int j = N_L_tmp - 1; j > 0; --j) {
 
  345     c_tmp = cmplx(0.0, 0.0);
 
  347     for (
int i = j + 1; i < N_L_tmp + 1; ++i) {
 
  349       c_tmp += tau[ji] * gamma[i];
 
  352     gamma[j] = gamma_prime[j] - c_tmp;
 
  357   std::vector<dcomplex> gamma_double_prime(
m_N_L);
 
  359   for (
int j = 1; j < N_L_tmp; ++j) {
 
  360     c_tmp = cmplx(0.0, 0.0);
 
  362     for (
int i = j + 1; i < N_L_tmp; ++i) {
 
  364       c_tmp += tau[ji] * gamma[i + 1];
 
  367     gamma_double_prime[j] = gamma[j + 1] + c_tmp;
 
  372   axpy(
m_r[0], -gamma_prime[N_L_tmp], 
m_r[N_L_tmp]);  
 
  375   for (
int j = 1; j < N_L_tmp; ++j) {
 
  389     m_N_L_prev   = N_L_tmp;
 
  411   if (flop_fopr < eps) {
 
  416   double flop_axpy = 
static_cast<double>(Nin * Nex * 2) * (Nvol * NPE);
 
  417   double flop_dotc = 
static_cast<double>(Nin * Nex * 4) * (Nvol * NPE);
 
  418   double flop_norm = 
static_cast<double>(Nin * Nex * 2) * (Nvol * NPE);
 
  422   double flop_init           = flop_fopr + flop_axpy + flop_norm;
 
  423   double flop_step_BiCG_part = 2 * N_L_prev_total * flop_fopr
 
  424                                + 3 * N_L_prev_total * flop_dotc
 
  426                                + N_L_prev_total * flop_norm;
 
  430   double flop_step          = flop_step_BiCG_part + flop_step_L_part;
 
  431   double flop_true_residual = flop_fopr + flop_axpy + flop_norm;
 
  433   double flop = flop_norm + flop_init + flop_step + flop_true_residual
 
void set_parameters_DS_L(const int N_L, const double Tol_L)
 
void detailed(const char *format,...)
 
static double epsilon_criterion()
 
void solve_init(const Field &, double &)
 
BiCGStab(DS_L) algorithm. 
 
void general(const char *format,...)
 
void reset_field(const Field &)
 
Container of Field-type object. 
 
int fetch_double(const string &key, double &value) const 
 
int index_ij(int i, int j)
 
void copy(Field &y, const Field &x)
copy(y, x): y = x 
 
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
 
int square_non_zero(const double v)
 
dcomplex dotc(const Field &y, const Field &x)
 
int fetch_int(const string &key, int &value) const 
 
virtual double flop_count()
returns the flops per site. 
 
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 solve_step(double &)
 
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. 
 
virtual void mult(Field &, const Field &)=0
multiplies fermion operator to a given field (2nd argument) 
 
int non_negative(const int v)
 
void set_parameters(const Parameters ¶ms)
 
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread. 
 
Base class of fermion operator family. 
 
string get_string(const string &key) const 
 
Bridge::VerboseLevel m_vl
 
static VerboseLevel set_verbose_level(const std::string &str)