Bridge++  Ver. 2.0.2
solver_BiCGStab_L_Cmplx.cpp
Go to the documentation of this file.
1 
15 
16 #ifdef USE_FACTORY_AUTOREGISTER
17 namespace {
18  bool init = Solver_BiCGStab_L_Cmplx::register_factory();
19 }
20 #endif
21 
22 const std::string Solver_BiCGStab_L_Cmplx::class_name = "Solver_BiCGStab_L_Cmplx";
23 
24 //====================================================================
26 {
27  std::string vlevel;
28  if (!params.fetch_string("verbose_level", vlevel)) {
29  m_vl = vout.set_verbose_level(vlevel);
30  }
31 
32  //- fetch and check input parameters
33  int Niter, Nrestart;
34  double Stop_cond;
35  bool use_init_guess;
36  double Omega_tolerance;
37  int N_L;
38 
39  int err = 0;
40  err += params.fetch_int("maximum_number_of_iteration", Niter);
41  err += params.fetch_int("maximum_number_of_restart", Nrestart);
42  err += params.fetch_double("convergence_criterion_squared", Stop_cond);
43  err += params.fetch_bool("use_initial_guess", use_init_guess);
44  err += params.fetch_double("Omega_tolerance", Omega_tolerance);
45  err += params.fetch_int("number_of_orthonormal_vectors", N_L);
46 
47  if (err) {
48  vout.crucial(m_vl, "Error at %s: input parameter not found.\n", class_name.c_str());
49  exit(EXIT_FAILURE);
50  }
51 
52  // set_parameters(Niter, Nrestart, Stop_cond, use_init_guess);
53  // set_parameters_BiCGStab_series(Omega_tolerance);
54  // set_parameters_L(N_L);
55  set_parameters(Niter, Nrestart, Stop_cond, use_init_guess, Omega_tolerance, N_L);
56 }
57 
58 
59 //====================================================================
61 {
62  params.set_int("maximum_number_of_iteration", m_Niter);
63  params.set_int("maximum_number_of_restart", m_Nrestart);
64  params.set_double("convergence_criterion_squared", m_Stop_cond);
65  params.set_bool("use_initial_guess", m_use_init_guess);
66  params.set_double("Omega_tolerance", m_Omega_tolerance);
67  params.set_int("number_of_orthonormal_vectors", m_N_L);
68 
69  params.set_string("verbose_level", vout.get_verbose_level(m_vl));
70 }
71 
72 
73 //====================================================================
74 void Solver_BiCGStab_L_Cmplx::set_parameters(const int Niter, const int Nrestart, const double Stop_cond)
75 {
77 
78  //- print input parameters
79  vout.general(m_vl, "%s: input parameters\n", class_name.c_str());
80  vout.general(m_vl, " Niter = %d\n", Niter);
81  vout.general(m_vl, " Nrestart = %d\n", Nrestart);
82  vout.general(m_vl, " Stop_cond = %8.2e\n", Stop_cond);
83 
84  //- range check
85  int err = 0;
86  err += ParameterCheck::non_negative(Niter);
87  err += ParameterCheck::non_negative(Nrestart);
88  err += ParameterCheck::square_non_zero(Stop_cond);
89 
90  if (err) {
91  vout.crucial(m_vl, "Error at %s: parameter range check failed.\n", class_name.c_str());
92  exit(EXIT_FAILURE);
93  }
94 
95  //- store values
96  m_Niter = Niter;
97  m_Nrestart = Nrestart;
98  m_Stop_cond = Stop_cond;
99 }
100 
101 
102 //====================================================================
103 void Solver_BiCGStab_L_Cmplx::set_parameters(const int Niter, const int Nrestart, const double Stop_cond, const bool use_init_guess)
104 {
106 
107  //- print input parameters
108  vout.general(m_vl, "%s: input parameters\n", class_name.c_str());
109  vout.general(m_vl, " Niter = %d\n", Niter);
110  vout.general(m_vl, " Nrestart = %d\n", Nrestart);
111  vout.general(m_vl, " Stop_cond = %8.2e\n", Stop_cond);
112  vout.general(m_vl, " use_init_guess = %s\n", use_init_guess ? "true" : "false");
113 
114  //- range check
115  int err = 0;
116  err += ParameterCheck::non_negative(Niter);
117  err += ParameterCheck::non_negative(Nrestart);
118  err += ParameterCheck::square_non_zero(Stop_cond);
119 
120  if (err) {
121  vout.crucial(m_vl, "Error at %s: parameter range check failed.\n", class_name.c_str());
122  exit(EXIT_FAILURE);
123  }
124 
125  //- store values
126  m_Niter = Niter;
127  m_Nrestart = Nrestart;
128  m_Stop_cond = Stop_cond;
129  m_use_init_guess = use_init_guess;
130 }
131 
132 
133 //====================================================================
135 {
137 
138  //- print input parameters
139  vout.general(m_vl, " Omega_tolerance = %8.2e\n", Omega_tolerance);
140 
141  //- range check
142  // NB. Omega_tolerance == 0.0 is allowed.
143 
144  //- store values
145  m_Omega_tolerance = Omega_tolerance;
146 }
147 
148 
149 //====================================================================
151 {
152  //- print input parameters
153  vout.general(m_vl, " N_L = %d\n", N_L);
154 
155  //- range check
156  int err = 0;
157  err += ParameterCheck::non_negative(N_L);
158 
159  if (err) {
160  vout.crucial(m_vl, "Error at %s: parameter range check failed.\n", class_name.c_str());
161  exit(EXIT_FAILURE);
162  }
163 
164  //- store values
165  m_N_L = N_L;
166 }
167 
168 
169 //====================================================================
171  const int Nrestart,
172  const double Stop_cond,
173  const bool use_init_guess,
174  const double Omega_tolerance,
175  const int N_L)
176 {
178 
179  //- print input parameters
180  vout.general(m_vl, "%s: input parameters\n", class_name.c_str());
181  vout.general(m_vl, " Niter = %d\n", Niter);
182  vout.general(m_vl, " Nrestart = %d\n", Nrestart);
183  vout.general(m_vl, " Stop_cond = %8.2e\n", Stop_cond);
184  vout.general(m_vl, " use_init_guess = %s\n", use_init_guess ? "true" : "false");
185 
186  vout.general(m_vl, " Omega_tolerance = %8.2e\n", Omega_tolerance);
187 
188  vout.general(m_vl, " N_L = %d\n", N_L);
189 
190  //- range check
191  int err = 0;
192  err += ParameterCheck::non_negative(Niter);
193  err += ParameterCheck::non_negative(Nrestart);
194  err += ParameterCheck::square_non_zero(Stop_cond);
195 
196  // NB. Omega_tolerance == 0.0 is allowed.
197 
198  err += ParameterCheck::non_negative(N_L);
199 
200  if (err) {
201  vout.crucial(m_vl, "Error at %s: parameter range check failed.\n", class_name.c_str());
202  exit(EXIT_FAILURE);
203  }
204 
205  //- store values
206  m_Niter = Niter;
207  m_Nrestart = Nrestart;
208  m_Stop_cond = Stop_cond;
209  m_use_init_guess = use_init_guess;
210 
211  m_Omega_tolerance = Omega_tolerance;
212 
213  m_N_L = N_L;
214 }
215 
216 
217 //====================================================================
219  int& Nconv, double& diff)
220 {
221  const double bnorm2 = b.norm2();
222  const int bsize = b.size();
223 
224  vout.paranoiac(m_vl, "%s: starts\n", class_name.c_str());
225  vout.paranoiac(m_vl, " norm of b = %16.8e\n", bnorm2);
226  vout.paranoiac(m_vl, " size of b = %d\n", bsize);
227 
228  bool is_converged = false;
229  int Nconv2 = 0;
230  double diff2 = 1.0; // superficial initialization
231  double rr;
232 
233  int Nconv_unit = 1;
234  // if (m_fopr->get_mode() == "DdagD" || m_fopr->get_mode() == "DDdag") {
235  // Nconv_unit = 2;
236  // }
237 
238  reset_field(b);
239 
240  if (m_use_init_guess) {
241  copy(m_s, xq); // s = xq;
242  } else {
243  copy(m_s, b); // s = b;
244  }
245  solve_init(b, rr);
246  Nconv2 += Nconv_unit;
247 
248  vout.detailed(m_vl, " iter: %8d %22.15e\n", Nconv2, rr / bnorm2);
249 
250 
251  for (int i_restart = 0; i_restart < m_Nrestart; i_restart++) {
252  for (int iter = 0; iter < m_Niter; iter++) {
253  if (rr / bnorm2 < m_Stop_cond) break;
254 
255  solve_step(rr);
256  Nconv2 += 2 * Nconv_unit * m_N_L;
257 
258  vout.detailed(m_vl, " iter: %8d %22.15e\n", Nconv2, rr / bnorm2);
259  }
260 
261  //- calculate true residual
262  m_fopr->mult(m_s, m_x); // s = m_fopr->mult(x);
263  axpy(m_s, -1.0, b); // s -= b;
264  diff2 = m_s.norm2();
265 
266  if (diff2 / bnorm2 < m_Stop_cond) {
267  vout.detailed(m_vl, "%s: converged.\n", class_name.c_str());
268  vout.detailed(m_vl, " iter(final): %8d %22.15e\n", Nconv2, diff2 / bnorm2);
269 
270  is_converged = true;
271 
272  m_Nrestart_count = i_restart;
273  m_Nconv_count = Nconv2;
274 
275  break;
276  } else {
277  //- restart with new approximate solution
278  copy(m_s, m_x); // s = x;
279  solve_init(b, rr);
280 
281  vout.detailed(m_vl, "%s: restarted.\n", class_name.c_str());
282  }
283  }
284 
285 
286  if (!is_converged) {
287  vout.crucial(m_vl, "Error at %s: not converged.\n", class_name.c_str());
288  vout.crucial(m_vl, " iter(final): %8d %22.15e\n", Nconv2, diff2 / bnorm2);
289  exit(EXIT_FAILURE);
290  }
291 
292 
293  copy(xq, m_x); // xq = x;
294 
295 #pragma omp barrier
296 #pragma omp master
297  {
298  diff = sqrt(diff2 / bnorm2);
299  Nconv = Nconv2;
300  }
301 #pragma omp barrier
302 }
303 
304 
305 //====================================================================
307 {
308  vout.paranoiac(m_vl, " %s: resetting field size.\n", class_name.c_str());
309 
310 #pragma omp barrier
311 #pragma omp master
312  {
313  const int Nin = b.nin();
314  const int Nvol = b.nvol();
315  const int Nex = b.nex();
316 
317  if ((m_s.nin() != Nin) || (m_s.nvol() != Nvol) || (m_s.nex() != Nex)) {
318  m_s.reset(Nin, Nvol, Nex);
319  m_x.reset(Nin, Nvol, Nex);
320  m_r_init.reset(Nin, Nvol, Nex);
321  m_v.reset(Nin, Nvol, Nex);
322  }
323 
324  m_u.resize(m_N_L + 1);
325  m_r.resize(m_N_L + 1);
326 
327  for (int i = 0; i < m_N_L + 1; ++i) {
328  m_u[i].reset(Nin, Nvol, Nex);
329  m_r[i].reset(Nin, Nvol, Nex);
330  }
331  }
332 #pragma omp barrier
333 
334  vout.paranoiac(m_vl, " %s: field size reset.\n", class_name.c_str());
335 }
336 
337 
338 //====================================================================
339 void Solver_BiCGStab_L_Cmplx::solve_init(const Field& b, double& rr)
340 {
341  copy(m_x, m_s); // x = s;
342 
343  for (int i = 0; i < m_N_L + 1; ++i) {
344  m_r[i].set(0.0); // r[i] = 0.0;
345  m_u[i].set(0.0); // u[i] = 0.0;
346  }
347 
348  // r[0] = b - A x_0
349  m_fopr->mult(m_v, m_s); // m_v = m_fopr->mult(s);
350  copy(m_r[0], b); // r[0] = b;
351  axpy(m_r[0], -1.0, m_v); // r[0] -= m_v;
352 
353  copy(m_r_init, m_r[0]); // r_init = r[0];
354  rr = m_r[0].norm2(); // rr = r[0] * r[0];
355 
356 #pragma omp barrier
357 #pragma omp master
358  {
359  m_rho_prev = cmplx(-1.0, 0.0);
360 
361  // NB. m_alpha_prev = 0.0 \neq 1.0
362  m_alpha_prev = cmplx(0.0, 0.0);
363  }
364 #pragma omp barrier
365 }
366 
367 
368 //====================================================================
370 {
371  dcomplex rho_prev2 = m_rho_prev;
372  dcomplex alpha_prev2 = m_alpha_prev;
373 
374  for (int j = 0; j < m_N_L; ++j) {
375  dcomplex rho = dotc(m_r[j], m_r_init); // dcomplex rho = r[j] * r_init;
376  rho = conj(rho);
377 
378  dcomplex beta = alpha_prev2 * (rho / rho_prev2);
379 
380  rho_prev2 = rho;
381 
382  for (int i = 0; i < j + 1; ++i) {
383  aypx(-beta, m_u[i], m_r[i]); // u[i] = - beta * u[i] + r[i];
384  }
385 
386  m_fopr->mult(m_u[j + 1], m_u[j]); // u[j+1] = m_fopr->mult(u[j]);
387 
388  dcomplex gamma = dotc(m_u[j + 1], m_r_init);
389  alpha_prev2 = rho_prev2 / conj(gamma);
390 
391  for (int i = 0; i < j + 1; ++i) {
392  axpy(m_r[i], -alpha_prev2, m_u[i + 1]); // r[i] -= alpha_prev * u[i+1];
393  }
394 
395  m_fopr->mult(m_r[j + 1], m_r[j]); // r[j+1] = m_fopr->mult(r[j]);
396 
397  axpy(m_x, alpha_prev2, m_u[0]); // x += alpha_prev * u[0];
398  }
399 
400 
401  std::vector<double> sigma(m_N_L + 1);
402  std::vector<dcomplex> gamma_prime(m_N_L + 1);
403 
404  // NB. tau(m_N_L,m_N_L+1), not (m_N_L+1,m_N_L+1)
405  std::vector<dcomplex> tau(m_N_L * (m_N_L + 1));
406 
407  const double sigma_0 = m_r[0].norm2();
408 
409  for (int j = 1; j < m_N_L + 1; ++j) {
410  for (int i = 1; i < j; ++i) {
411  int ij = index_ij(i, j);
412 
413  dcomplex r_ji = dotc(m_r[j], m_r[i]);
414  tau[ij] = conj(r_ji) / sigma[i]; // tau[ij] = (r[j] * r[i]) / sigma[i];
415  axpy(m_r[j], -tau[ij], m_r[i]); // r[j] -= tau[ij] * r[i];
416  }
417 
418  sigma[j] = m_r[j].norm2(); // sigma[j] = r[j] * r[j];
419 
420  dcomplex r_0j = dotc(m_r[0], m_r[j]);
421  gamma_prime[j] = conj(r_0j) / sigma[j]; // gamma_prime[j] = (r[0] * r[j]) / sigma[j];
422 
423  //- a prescription to improve stability of BiCGStab(L)
424  double abs_rho = abs(r_0j) / sqrt(sigma[j] * sigma_0);
425  if (abs_rho < m_Omega_tolerance) {
426  gamma_prime[j] *= m_Omega_tolerance / abs_rho;
427  }
428  }
429 
430 
431  std::vector<dcomplex> gamma(m_N_L + 1);
432  gamma[m_N_L] = gamma_prime[m_N_L];
433 
434  for (int j = m_N_L - 1; j > 0; --j) {
435  dcomplex c_tmp = cmplx(0.0, 0.0);
436 
437  for (int i = j + 1; i < m_N_L + 1; ++i) {
438  int ji = index_ij(j, i);
439  c_tmp += tau[ji] * gamma[i];
440  }
441 
442  gamma[j] = gamma_prime[j] - c_tmp;
443  }
444 
445 
446  // NB. gamma_double_prime(m_N_L), not (m_N_L+1)
447  std::vector<dcomplex> gamma_double_prime(m_N_L);
448 
449  for (int j = 1; j < m_N_L; ++j) {
450  dcomplex c_tmp = cmplx(0.0, 0.0);
451 
452  for (int i = j + 1; i < m_N_L; ++i) {
453  int ji = index_ij(j, i);
454  c_tmp += tau[ji] * gamma[i + 1];
455  }
456 
457  gamma_double_prime[j] = gamma[j + 1] + c_tmp;
458  }
459 
460 
461  axpy(m_x, gamma[1], m_r[0]); // x += gamma[ 1] * r[ 0];
462  axpy(m_r[0], -gamma_prime[m_N_L], m_r[m_N_L]); // r[0] -= gamma_prime[m_N_L] * r[m_N_L];
463  axpy(m_u[0], -gamma[m_N_L], m_u[m_N_L]); // u[0] -= gamma[ m_N_L] * u[m_N_L];
464 
465  for (int j = 1; j < m_N_L; ++j) {
466  axpy(m_x, gamma_double_prime[j], m_r[j]); // x += gamma_double_prime[j] * r[j];
467  axpy(m_r[0], -gamma_prime[j], m_r[j]); // r[0] -= gamma_prime[ j] * r[j];
468  axpy(m_u[0], -gamma[j], m_u[j]); // u[0] -= gamma[ j] * u[j];
469  }
470 
471  rr = m_r[0].norm2(); // rr = r[0] * r[0];
472 
473 #pragma omp barrier
474 #pragma omp master
475  {
476  m_rho_prev = rho_prev2;
477  m_alpha_prev = alpha_prev2;
478 
479  m_rho_prev *= -gamma_prime[m_N_L];
480  }
481 #pragma omp barrier
482 }
483 
484 
485 //====================================================================
487 {
488  const int NPE = CommonParameters::NPE();
489 
490  //- NB1 Nin = 2 * Nc * Nd, Nex = 1 for field_F
491  //- NB2 Nvol = CommonParameters::Nvol()/2 for eo
492  const int Nin = m_x.nin();
493  const int Nvol = m_x.nvol();
494  const int Nex = m_x.nex();
495 
496  const double gflop_fopr = m_fopr->flop_count();
497 
498  if (gflop_fopr < CommonParameters::epsilon_criterion()) {
499  vout.crucial(m_vl, "Warning at %s: no fopr->flop_count() is available, setting flop = 0\n", class_name.c_str());
500  return 0.0;
501  }
502 
503  const double gflop_axpy = (Nin * Nex * 2) * ((Nvol * NPE) / 1.0e+9);
504  const double gflop_dotc = (Nin * Nex * 4) * ((Nvol * NPE) / 1.0e+9);
505  const double gflop_norm = (Nin * Nex * 2) * ((Nvol * NPE) / 1.0e+9);
506 
507  int N_L_part = 0;
508  for (int j = 0; j < m_N_L; ++j) {
509  for (int i = 0; i < j + 1; ++i) {
510  N_L_part += 1;
511  }
512  }
513 
514  const double gflop_init = gflop_fopr + gflop_axpy + gflop_norm;
515  const double gflop_step_BiCG_part = 2 * m_N_L * gflop_fopr
516  + 2 * m_N_L * gflop_dotc
517  + (m_N_L + 2 * N_L_part) * gflop_axpy;
518  const double gflop_step_L_part = (N_L_part + m_N_L) * gflop_dotc
519  + (N_L_part + 3 * m_N_L) * gflop_axpy
520  + (m_N_L + 1) * gflop_norm;
521  const double gflop_step = gflop_step_BiCG_part + gflop_step_L_part;
522  const double gflop_true_residual = gflop_fopr + gflop_axpy + gflop_norm;
523 
524  const int N_iter = (m_Nconv_count - 1) / (2 * m_N_L);
525  const double gflop = gflop_norm + gflop_init + gflop_step * N_iter + gflop_true_residual * (m_Nrestart_count + 1)
526  + gflop_init * m_Nrestart_count;
527 
528 
529  return gflop;
530 }
531 
532 
533 //====================================================================
534 //============================================================END=====
Parameters::set_bool
void set_bool(const string &key, const bool value)
Definition: parameters.cpp:30
Solver_BiCGStab_L_Cmplx::index_ij
int index_ij(const int i, const int j)
Definition: solver_BiCGStab_L_Cmplx.h:124
Solver_BiCGStab_L_Cmplx::m_u
std::vector< Field > m_u
Definition: solver_BiCGStab_L_Cmplx.h:66
Solver_BiCGStab_L_Cmplx::class_name
static const std::string class_name
Definition: solver_BiCGStab_L_Cmplx.h:47
Solver_BiCGStab_L_Cmplx::solve
void solve(Field &solution, const Field &source, int &Nconv, double &diff)
Definition: solver_BiCGStab_L_Cmplx.cpp:218
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
Solver_BiCGStab_L_Cmplx::m_r_init
Field m_r_init
Definition: solver_BiCGStab_L_Cmplx.h:67
AFopr::mult
virtual void mult(AFIELD &, const AFIELD &)
multiplies fermion operator to a given field.
Definition: afopr.h:95
Parameters
Class for parameters.
Definition: parameters.h:46
Parameters::set_double
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
Solver_BiCGStab_L_Cmplx::m_v
Field m_v
Definition: solver_BiCGStab_L_Cmplx.h:67
Solver_BiCGStab_L_Cmplx::get_parameters
void get_parameters(Parameters &params) const
Definition: solver_BiCGStab_L_Cmplx.cpp:60
Solver_BiCGStab_L_Cmplx::m_s
Field m_s
Definition: solver_BiCGStab_L_Cmplx.h:67
Solver_BiCGStab_L_Cmplx::reset_field
void reset_field(const Field &)
Definition: solver_BiCGStab_L_Cmplx.cpp:306
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
Field::nex
int nex() const
Definition: field.h:128
Solver_BiCGStab_L_Cmplx::m_Niter
int m_Niter
Definition: solver_BiCGStab_L_Cmplx.h:54
aypx
void aypx(const double a, Field &y, const Field &x)
aypx(y, a, x): y := a * y + x
Definition: field.cpp:509
Solver_BiCGStab_L_Cmplx::set_parameters
void set_parameters(const Parameters &params)
Definition: solver_BiCGStab_L_Cmplx.cpp:25
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition: field.cpp:380
ParameterCheck::non_negative
int non_negative(const int v)
Definition: parameterCheck.cpp:21
Field::nin
int nin() const
Definition: field.h:126
Parameters::fetch_bool
int fetch_bool(const string &key, bool &value) const
Definition: parameters.cpp:391
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition: field.cpp:212
Solver_BiCGStab_L_Cmplx::m_fopr
Fopr * m_fopr
Definition: solver_BiCGStab_L_Cmplx.h:52
Bridge::BridgeIO::paranoiac
void paranoiac(const char *format,...)
Definition: bridgeIO.cpp:238
Solver_BiCGStab_L_Cmplx::m_alpha_prev
dcomplex m_alpha_prev
Definition: solver_BiCGStab_L_Cmplx.h:64
Field::norm2
double norm2() const
Definition: field.cpp:113
Solver_BiCGStab_L_Cmplx::set_parameters_BiCGStab_series
DEPRECATED void set_parameters_BiCGStab_series(const double Omega_tolerance)
Definition: solver_BiCGStab_L_Cmplx.cpp:134
Field::size
int size() const
Definition: field.h:132
Solver_BiCGStab_L_Cmplx::m_Nrestart_count
int m_Nrestart_count
Definition: solver_BiCGStab_L_Cmplx.h:69
AFopr::flop_count
virtual double flop_count()
returns the number of floating point operations.
Definition: afopr.h:160
ParameterCheck::square_non_zero
int square_non_zero(const double v)
Definition: parameterCheck.cpp:43
Solver_BiCGStab_L_Cmplx::m_use_init_guess
bool m_use_init_guess
Definition: solver_BiCGStab_L_Cmplx.h:56
Field::nvol
int nvol() const
Definition: field.h:127
dotc
dcomplex dotc(const Field &y, const Field &x)
Definition: field.cpp:712
CommonParameters::NPE
static int NPE()
Definition: commonParameters.h:101
Solver_BiCGStab_L_Cmplx::m_x
Field m_x
Definition: solver_BiCGStab_L_Cmplx.h:67
Solver_BiCGStab_L_Cmplx::m_N_L
int m_N_L
Definition: solver_BiCGStab_L_Cmplx.h:60
Field::reset
void reset(const int Nin, const int Nvol, const int Nex, const element_type cmpl=Element_type::COMPLEX)
Definition: field.h:95
Solver_BiCGStab_L_Cmplx::solve_step
void solve_step(double &)
Definition: solver_BiCGStab_L_Cmplx.cpp:369
Solver_BiCGStab_L_Cmplx::m_Omega_tolerance
double m_Omega_tolerance
Definition: solver_BiCGStab_L_Cmplx.h:58
solver_BiCGStab_L_Cmplx.h
Solver_BiCGStab_L_Cmplx::m_vl
Bridge::VerboseLevel m_vl
Definition: solver_BiCGStab_L_Cmplx.h:50
Bridge::BridgeIO::set_verbose_level
static VerboseLevel set_verbose_level(const std::string &str)
Definition: bridgeIO.cpp:133
Solver_BiCGStab_L_Cmplx::solve_init
void solve_init(const Field &, double &)
Definition: solver_BiCGStab_L_Cmplx.cpp:339
Solver_BiCGStab_L_Cmplx::set_parameters_L
DEPRECATED void set_parameters_L(const int N_L)
Definition: solver_BiCGStab_L_Cmplx.cpp:150
Parameters::set_int
void set_int(const string &key, const int value)
Definition: parameters.cpp:36
Solver_BiCGStab_L_Cmplx::m_Nrestart
int m_Nrestart
Definition: solver_BiCGStab_L_Cmplx.h:54
Parameters::fetch_string
int fetch_string(const string &key, string &value) const
Definition: parameters.cpp:378
Parameters::fetch_double
int fetch_double(const string &key, double &value) const
Definition: parameters.cpp:327
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
Solver_BiCGStab_L_Cmplx::m_Nconv_count
int m_Nconv_count
Definition: solver_BiCGStab_L_Cmplx.h:70
Field
Container of Field-type object.
Definition: field.h:46
Parameters::fetch_int
int fetch_int(const string &key, int &value) const
Definition: parameters.cpp:346
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
Solver_BiCGStab_L_Cmplx::flop_count
double flop_count()
Definition: solver_BiCGStab_L_Cmplx.cpp:486
ThreadManager::assert_single_thread
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
Definition: threadManager.cpp:372
Solver_BiCGStab_L_Cmplx::m_r
std::vector< Field > m_r
Definition: solver_BiCGStab_L_Cmplx.h:66
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512
Bridge::BridgeIO::get_verbose_level
static std::string get_verbose_level(const VerboseLevel vl)
Definition: bridgeIO.cpp:154
Solver_BiCGStab_L_Cmplx::m_rho_prev
dcomplex m_rho_prev
Definition: solver_BiCGStab_L_Cmplx.h:64
Solver_BiCGStab_L_Cmplx::m_Stop_cond
double m_Stop_cond
Definition: solver_BiCGStab_L_Cmplx.h:55
CommonParameters::epsilon_criterion
static double epsilon_criterion()
Definition: commonParameters.h:119