Bridge++  Ver. 2.0.2
asolver_MG-tmpl.h
Go to the documentation of this file.
1 
13 
16 
17 //====================================================================
18 template<typename AFIELD>
19 const std::string ASolver_MG<AFIELD>::class_name = "ASolver_MG";
20 
21 /* for book keeping
22  // inner prod: num_vector*(num_vector-1)/2 times
23  // complex axpy: num_vector*(num_vector-1)/2 times
24  // norm: num_vector times
25  // real scal: num_vector times (GS)
26  // convert rep: 2*num_vectors times
27  // real scal: num_vector_times (normalization for covert rep.)
28  // if one counts 0+a as one 1 flop, block inner prod has the same flop
29  // counting as the full inner prod
30  const int flop_gs_site
31  = 8*Nc*Nd*num_vectors*(num_vectors-1)/2 // inner prod
32  + 8*Nc*Nd*num_vectors*(num_vectors-1)/2 // axpy
33  + 4*Nc*Nd*num_vectors // norm
34  + 2*Nc*Nd*num_vectors // scal (GS)
35  + 2*Nc*Nd*2*num_vectors // convert_rep
36  + 2*Nc*Nd*num_vectors; // scal (normalization)
37  size_t Lvol=CommonParameters::Lvol();
38  const double flop_gs=static_cast<double>(flop_gs_site)*static_cast<double>(Lvol);
39 */
40 
41 //====================================================================
42 template<typename AFIELD>
44 {
46  constexpr int size = sizeof(typename AFIELD::real_t);
47  if (size != sizeof(double)) {
48  vout.crucial("ASolver_MG must be instanced with double prec. field\n");
49  abort();
50  }
51 }
52 
53 
54 //====================================================================
55 template<typename AFIELD>
57 {
58 }
59 
60 
61 //====================================================================
62 template<typename AFIELD>
64 {
65  // example of the parameter
66  // each of outer solver (in level 0) and coarse solver (in level 1)
67  // may futher has additional parameters like Omega_tolerance.
68  //
69  // # general parameters, passed to the outer solver
70  // maximum_number_of_iteration : 100
71  // maximum_number_of_restart: 10
72  // convergence_criterion_squared: 1e-28
73  // verbose_level : Detailed
74  // # spedfice to MG solver
75  // MultiGrid_Level1:
76  // sap_block : [4,2,2,2]
77  // number_of_vectors: 4
78  // setup_number_of_setp : 4
79  // maximum_number_of_iteration : 1000
80  // maximum_number_of_restart : 1
81  // convergence_criterion_squared: 2.0e-5
82  // smoother_number_of_iteration : 3
83  // smoother_convergence_criterion_squared: 1.0e-3
84  // verbose_level : General
85 
86  // Parameters params_outer_solver=params.lookup("Level0");
87  Parameters params_coarse = params.lookup("MultiGrid_Level1");
88 
89  // level0: outer solver
90  set_parameters_level0(params);
91 
92  // level1: coarse grid solver and smoother
93  set_parameters_level1(params_coarse);
94 }
95 
96 
97 //====================================================================
98 template<typename AFIELD>
100 {
101  m_params_asolver_outer = params;
102 }
103 
104 
105 //====================================================================
106 template<typename AFIELD>
108 {
109  // for setup
110  m_sap_block_size = params.get_int_vector("sap_block");
111  m_nvec = params.get_int("setup_number_of_vectors");
112  m_nsetup = params.get_int("setup_number_of_step");
113 
114  // for smoother
115  m_smoother_niter = params.get_int("smoother_number_of_iteration");
116  m_smoother_stop_cond = params.get_double("smoother_convergence_criterion_squared");
117 
118  // for coarse solver
119  // I assume that the above parameters harmless for the coarse grid solver
120  m_params_asolver_coarse = params;
121 
122  set_lattice(m_sap_block_size);
123 }
124 
125 
126 //====================================================================
127 template<typename AFIELD>
129  const int Niter,
130  const real_t Stop_cond,
131  const std::string& outer_vlevel,
132  const std::vector<int>& sap_block_size,
133  const int nvec,
134  const int nsetup,
135  const int coarse_niter,
136  const real_t coarse_stop_cond,
137  const std::string& coarse_vlevel,
138  const int smoother_niter,
139  const real_t smoother_stop_cond)
140 {
142 
143  // for outer solver
144  Parameters param_level0;
145  param_level0.set_int("maximum_number_of_iteration", Niter);
146  param_level0.set_int("maximum_number_of_restart", 1);
147  param_level0.set_double("convergence_criterion_squared", Stop_cond);
148  param_level0.set_string("verbose_level", outer_vlevel);
149  set_parameters_level0(param_level0);
150 
151  // coarse grid
152  Parameters param_level1;
153 
154  // for building coarse grid
155  param_level1.set_int_vector("sap_block", sap_block_size);
156  param_level1.set_int("number_of_vectors", nvec);
157  // coarse grid solver
158  param_level1.set_int("maximum_number_of_iteration", coarse_niter);
159  param_level1.set_int("maximum_number_of_restart", 1);
160  param_level1.set_double("convergence_criterion_squared",
161  coarse_stop_cond);
162  param_level1.set_string("verbose_level", coarse_vlevel);
163  // smoother
164  param_level1.set_int("smoother_number_of_iteration", smoother_niter);
165  param_level1.set_int("smoother_convergence_criterion_squared",
166  smoother_stop_cond);
167 
168  set_parameters_level1(param_level1);
169 }
170 
171 
172 //====================================================================
173 template<typename AFIELD>
175 {
176 #ifdef USE_FOPR_FOR_SMOOTHER
177  return true;
178 #else
179  return false;
180 #endif
181 }
182 
183 
184 //====================================================================
185 template<typename AFIELD>
187 {
188 #ifdef USE_FOPR_FOR_SMOOTHER
189  return new FoprSmoother_t(param);
190 #else
191  return nullptr;
192 #endif
193 }
194 
195 
196 //====================================================================
197 template<typename AFIELD>
199 {
200  int th = ThreadManager::get_thread_id();
201 #pragma omp barrier
202  if (th == 0) {
203  m_afopr_fineD = dynamic_cast<FoprD_t *>(foprD);
204  }
205 #pragma omp barrier
206  if (m_afopr_fineD == nullptr) {
207  vout.crucial("%s: bad afopr: only AFopr_Clover is vaild for FoprD]\n",
208  class_name.c_str());
209  exit(EXIT_FAILURE);
210  }
211 }
212 
213 
214 //====================================================================
215 template<typename AFIELD>
217 {
218  m_afopr_fineF = dynamic_cast<FoprF_t *>(foprF);
219  if (m_afopr_fineF == nullptr) {
220  vout.crucial("%s: bad afopr: only AFopr_Clover_dd is vaild for FoprF]\n",
221  class_name.c_str());
222  exit(EXIT_FAILURE);
223  }
224 #ifndef USE_FOPR_FOR_SMOOTHER
225  m_afopr_smoother = m_afopr_fineF;
226 #endif
227 }
228 
229 
230 //====================================================================
231 template<typename AFIELD>
233 {
234 #ifdef USE_FOPR_FOR_SMOOTHER
235  m_afopr_smoother = dynamic_cast<FoprSmoother_t *>(foprF);
236  if (m_afopr_fineF == nullptr) {
237  vout.crucial("%s: bad afopr: only AFopr_Clover_dd is vaild for Fopr smoother]\n",
238  class_name.c_str());
239  exit(EXIT_FAILURE);
240  }
241 #else
242  vout.general("%s: set_foprF_smoother is called but ignored. The same one given with set_foprF will be used.\n", class_name.c_str());
243 #endif
244 }
245 
246 
247 //====================================================================
248 template<typename AFIELD>
249 void ASolver_MG<AFIELD>::init_solver(std::string mode)
250 {
252  m_mode = mode;
253 
254  // check fopr is registered
255  if (!m_afopr_fineF) {
256  vout.crucial(m_vl, "%s: init_solver, single prec. afopr is not yet set.\n",
257  class_name.c_str());
258  exit(EXIT_FAILURE);
259  }
260  if (!m_afopr_fineD) {
261  vout.crucial(m_vl, "%s: init_solver, double prec. afopr is not yet set.\n",
262  class_name.c_str());
263  exit(EXIT_FAILURE);
264  }
265 
266  // fine grid operator
267  m_afopr_fineD->set_mode(m_mode);
268  m_afopr_fineF->set_mode(m_mode);
269 
270  // coarse grid solvers/smoothers
271  init_coarse_grid();
272 
273  // outer solver
274  m_outer_solver.reset(new OuterSolver_t(m_afopr_fineD, m_prec_mg.get()));
275  m_outer_solver->set_parameters(m_params_asolver_outer);
276 }
277 
278 
279 //====================================================================
280 #ifndef SKIP_INIT_COARSE
281 template<typename AFIELD>
283 {
284  vout.detailed(m_vl, "%s: init_coarse_grid() [template version] is called\n",
285  class_name.c_str());
286 
287  // multigrid converter
288  std::vector<int> fine_lattice = { CommonParameters::Nx(),
292  const int Nc = CommonParameters::Nc();
293  const int Nd = CommonParameters::Nd();
294 
295  MultiGrid_t *multigrid = new MultiGrid_t();
296  multigrid->init(m_coarse_lattice, fine_lattice, 2 * Nc * Nd, m_nvec);
297  multigrid->set_afopr_fine(m_afopr_fineF);
298  m_multigrid.reset(multigrid);
299 
300  // afopr: downcasted objects
301  // downcast safty is guaranteed in the setter
302  FoprF_t *afopr_fineF = static_cast<FoprF_t *>(m_afopr_fineF);
303  FoprD_t *afopr_fineD = static_cast<FoprD_t *>(m_afopr_fineD);
304 
305  // initialize coase grid operator
306  FoprCoarse_t *afopr_coarse = new FoprCoarse_t();
307  afopr_coarse->set_parameters(m_nvec, m_coarse_lattice);
308  afopr_coarse->set_mode(m_mode);
309  m_afopr_coarse.reset(afopr_coarse);
310 
311  vout.general(m_vl, "afopr_coarse version is created\n");
312 
313  // initialize coarse grid solver
314  CoarseSolver_t *asolver_coarse = new CoarseSolver_t(m_afopr_coarse.get());
315  asolver_coarse->set_parameters(m_params_asolver_coarse);
317  m_asolver_coarse.reset(asolver_coarse);
318 
319  // initialize smoother
320 #ifdef USE_SAP_FOR_SMOOTHER
321  Smoother_t *asolver_smoother =
322  new Smoother_t(m_afopr_smoother, m_multigrid->get_block_index());
323 #else
324  Smoother_t *asolver_smoother = new Smoother_t(m_afopr_smoother);
325 #endif
326  asolver_smoother->set_parameters(m_smoother_niter, m_smoother_stop_cond);
327  m_asolver_smoother.reset(asolver_smoother);
328 
329  // combine everything and initialize multgrid preconditionor
330  m_prec_mg.reset(new APrecond_MG<AFIELD, AFIELD_f>());
331  m_prec_mg->set_coarse_solver(m_asolver_coarse.get());
332  m_prec_mg->set_smoother(m_asolver_smoother.get());
333  m_prec_mg->set_multigrid(m_multigrid.get());
334  m_prec_mg->set_fopr(m_afopr_fineD, m_afopr_fineF);
335 }
336 
337 
338 #endif
339 
340 //====================================================================
341 template<typename AFIELD>
342 void ASolver_MG<AFIELD>::set_lattice(const vector<int>& sap_block_size)
343 {
345 
346  // set coarse lattice
347  assert(CommonParameters::Ndim() == 4);
348  m_coarse_lattice.resize(4);
349  std::vector<int> fine_lattice = { CommonParameters::Nx(),
353 
354  // sanity checks
355  if (sap_block_size.size() != 4) {
356  vout.crucial(m_vl, "%s: bad sap_block_size: Must be 4-dim, but the given dimension is %.\n",
357  class_name.c_str(), sap_block_size.size());
358  abort();
359  }
360 
361  for (int i = 0; i < 4; ++i) {
362  m_coarse_lattice[i] = fine_lattice[i] / sap_block_size[i];
363  if (m_coarse_lattice[i] * sap_block_size[i] != fine_lattice[i]) {
364  vout.crucial(m_vl, "bad sap_block_size: i=%d, sap_block_size=%d, fine_lattice=%d, coarse_lattice=%d\n",
365  i, sap_block_size[i], fine_lattice[i], m_coarse_lattice[i]);
366  exit(EXIT_FAILURE);
367  }
368  }
369 
370  vout.general(m_vl, " fine_lattice = %s\n",
371  Parameters::to_string(fine_lattice).c_str());
372  vout.general(m_vl, " coarse_lattice = %s\n",
373  Parameters::to_string(m_coarse_lattice).c_str());
374  vout.general(m_vl, " sap_block_size = %s\n",
375  Parameters::to_string(sap_block_size).c_str());
376 }
377 
378 
379 //====================================================================
380 template<typename AFIELD>
381 void ASolver_MG<AFIELD>::run_setup(std::vector<AFIELD_f>& testvec_work)
382 {
383  assert(m_nvec == testvec_work.size());
384 
385  Timer timer_setup("setup total (work vectors given)");
386 #pragma omp master
387  {
388  timer_setup.start();
389  m_timer_gramschmidt.reset(new Timer("Gramschmidt in the setup"));
390  m_timer_generate_coarse_op.reset(new Timer("generate coarse op"));
391  }
392 
393  run_setup_initial(testvec_work);
394  run_setup_iterative(m_nsetup, testvec_work);
395 
396 #pragma omp master
397  {
398  timer_setup.stop();
399 
400  m_timer_gramschmidt->report();
401  m_timer_generate_coarse_op->report();
402  m_prec_mg->report_timer();
403  m_prec_mg->reset_flop_count();
404  timer_setup.report();
405  }
406  vout.general("setup is done!\n");
407 }
408 
409 
410 //====================================================================
411 template<typename AFIELD>
413 {
415 
416  Timer timer_setup("setup total");
417  timer_setup.start();
418 
419  const int num_vectors = m_nvec;
420  const int Nin = m_afopr_fineD->field_nin();
421  const int Nvol = m_afopr_fineD->field_nvol();
422  const int Nex = m_afopr_fineD->field_nex();
423 
424  // std::vector<double> flop_setup(m_nsetup+1);
425 
426  std::vector<AFIELD_f> testvec_work(num_vectors);
427  for (int i = 0; i < num_vectors; ++i) {
428  testvec_work[i].reset(Nin, Nvol, Nex);
429  }
430 #pragma omp parallel
431  {
432  run_setup(testvec_work);
433  }
434  timer_setup.stop();
435  timer_setup.report();
436 }
437 
438 
439 //====================================================================
440 template<typename AFIELD>
442  std::vector<AFIELD_f>& testvec_work)
443 {
444  // Todo: add flops count
445 
446  // ThreadManager::assert_single_thread(class_name);
447  //#pragma omp parallel
448  {
449  vout.detailed("run_setup: using single precision Gramschmidt\n");
450 
451 
452  assert(testvec_work.size() == m_nvec);
453  unique_ptr<Timer> timer_initial_setup;
454 #pragma omp master
455  {
456  timer_initial_setup.reset(new Timer("initial setup"));
457  timer_initial_setup->start();
458  }
459 
460  ASolver<AFIELD_f> *asolver_setup = m_asolver_smoother.get();
461 
462 
463  // random vectors are not thread paraleized....
464  m_multigrid->set_testvectors(); // generate initial random vectors
465 
466 
467  // initial setup
468  for (int i = 0; i < m_nvec; ++i) {
469  int nconv = -1;
470  float diff = -1.0;
471  asolver_setup->solve(testvec_work[i],
472  (*m_multigrid->get_testvectors())[i],
473  nconv, diff);
474  } // i
475 #pragma omp master
476  {
477  m_timer_gramschmidt->start();
478  }
479  m_multigrid->gramschmidt(testvec_work);
480 #pragma omp master
481  {
482  m_timer_gramschmidt->stop();
483  }
484  m_multigrid->set_testvectors(testvec_work); // update the testvectors
485  vout.general("initial testvectors are ready\n");
486  FoprCoarse_t *afopr_coarse =
487  static_cast<FoprCoarse_t *>(m_afopr_coarse.get());
488 #pragma omp master
489  {
490  m_timer_generate_coarse_op->start();
491  }
492  afopr_coarse->generate_coarse_op(m_afopr_fineF,
493  *m_multigrid->get_testvectors());
494 #pragma omp master
495  {
496  m_timer_generate_coarse_op->stop();
497  }
498  vout.general(m_vl, "afopr_coarse version is ready\n");
499 
500 #pragma omp master
501  {
502  timer_initial_setup->stop();
503  timer_initial_setup->report();
504  }
505  }
506 }
507 
508 
509 //====================================================================
510 template<typename AFIELD>
512  std::vector<AFIELD_f>& testvec_work)
513 {
514  // Todo: add flops count
515 
516  // N.B.
517  // working vectors [= testvec_work] are needed because
518  // the "solver" uses the multigrid precondinor
519 
520  // ThreadManager::assert_single_thread(class_name);
521  //#pragma omp parallel
522  {
523  assert(testvec_work.size() == m_nvec);
524  unique_ptr<Timer> timer_setup;
525 #pragma omp master
526  {
527  timer_setup.reset(new Timer("each setup"));
528  }
529  for (int n = 0; n < niter; ++n) {
530 #pragma omp master
531  {
532  timer_setup->reset();
533  timer_setup->start();
534  }
535  for (int i = 0; i < m_nvec; ++i) {
536  //#pragma omp barrier
537  m_prec_mg->mult_as_setup(testvec_work[i],
538  (*m_multigrid->get_testvectors())[i]);
539  } // i
540 
541 #pragma omp barrier
542 
543 #pragma omp master
544  {
545  m_timer_gramschmidt->start();
546  }
547  m_multigrid->gramschmidt(testvec_work);
548 #pragma omp master
549  {
550  m_timer_gramschmidt->stop();
551  }
552  m_multigrid->set_testvectors(testvec_work); // update the testvectors
553  FoprCoarse_t *afopr_coarse =
554  static_cast<FoprCoarse_t *>(m_afopr_coarse.get());
555 #pragma omp master
556  {
557  m_timer_generate_coarse_op->start();
558  }
559  afopr_coarse->generate_coarse_op(m_afopr_fineF,
560  *m_multigrid->get_testvectors());
561 #pragma omp master
562  {
563  m_timer_generate_coarse_op->stop();
564  }
565  vout.general(m_vl, "renewed afopr_coarse: n=%d / %d\n", n, niter);
566 #pragma omp master
567  {
568  timer_setup->stop();
569  timer_setup->report();
570  }
571  } //n
572  } // omp parallel
573 }
574 
575 
576 //====================================================================
577 template<typename AFIELD>
579  int& nconv, real_t& diff)
580 {
581  m_outer_solver->solve(x, b, nconv, diff);
582 }
583 
584 
585 //====================================================================
586 template<typename AFIELD>
588 {
589  m_nconv = 0;
590  m_prec_mg->reset_flop_count();
591 }
592 
593 
594 //====================================================================
595 template<typename AFIELD>
597 {
598  double flop_solve = m_outer_solver->flop_count();
599  double flop_outer = flop_solve - m_prec_mg->flop_count();
600  double flop_coarse = m_prec_mg->flop_count_coarse();
601  double flop_smoother = m_prec_mg->flop_count_smoother();
602  double flop_other = m_prec_mg->flop_count_other();
603  double flop_double = m_prec_mg->flop_count_double();
604  m_prec_mg->report_timer();
605 
606  vout.general(m_vl, "flop count (MG solver) [GFlop]:\n");
607  vout.general(m_vl, " solve total (double+float): %e\n", flop_solve * 1.0e-9);
608  vout.general(m_vl, " solve coarse (float): %e\n", flop_coarse * 1.0e-9);
609  vout.general(m_vl, " solve smoother (float): %e\n", flop_smoother * 1.0e-9);
610  vout.general(m_vl, " solve other (float): %e\n", flop_other * 1.0e-9);
611  vout.general(m_vl, " solve other (double): %e\n", flop_double * 1.0e-9);
612 
613  return flop_solve;
614 }
615 
616 
617 //============================================================END=====
CommonParameters::Ny
static int Ny()
Definition: commonParameters.h:106
FoprCoarse_t
AFopr_Clover_coarse< AField_f > FoprCoarse_t
Definition: asolver_MG.cpp:52
ASolver_MG::set_foprF
void set_foprF(AFopr_dd< AFIELD_f > *foprF)
Definition: asolver_MG-tmpl.h:216
CommonParameters::Nz
static int Nz()
Definition: commonParameters.h:107
Parameters::set_string
void set_string(const string &key, const string &value)
Definition: parameters.cpp:39
AFopr
Definition: afopr.h:48
ASolver
Definition: asolver.h:23
ASolver_SAP
Definition: asolver_SAP.h:29
ASolver_BiCGStab_Cmplx::set_init_mode
void set_init_mode(const InitialGuess init_guess)
Definition: asolver_BiCGStab_Cmplx.h:117
ASolver_MG
Definition: asolver_MG.h:34
ASolver_MG::new_fopr_smoother
AFopr_dd< AFIELD_f > * new_fopr_smoother(const Parameters &param) const
Definition: asolver_MG-tmpl.h:186
CommonParameters::Ndim
static int Ndim()
Definition: commonParameters.h:117
AFopr_Clover_coarse::generate_coarse_op
void generate_coarse_op(AFopr_dd< AFIELD > *fine_afopr, const std::vector< AFIELD > &testvec)
Definition: afopr_Clover_coarse-tmpl.h:1172
Parameters
Class for parameters.
Definition: parameters.h:46
ASolver_MG::solve
void solve(AFIELD &xq, const AFIELD &b, int &nconv, real_t &diff)
solver main.
Definition: asolver_MG-tmpl.h:578
Parameters::set_double
void set_double(const string &key, const double value)
Definition: parameters.cpp:33
ASolver_MG::reset_flop_count
void reset_flop_count()
Definition: asolver_MG-tmpl.h:587
Parameters::get_int
int get_int(const string &key) const
Definition: parameters.cpp:192
Bridge::BridgeIO::detailed
void detailed(const char *format,...)
Definition: bridgeIO.cpp:219
AFopr_Clover_coarse::set_mode
void set_mode(std::string mode)
returns the pointer to gauge configuration.
Definition: afopr_Clover_coarse-tmpl.h:1393
MultiGrid_Clover::init
void init(const std::vector< int > &coarse_lattice, const std::vector< int > &fine_lattice, const int nin, const int nvec)
Definition: MultiGrid_Clover.h:68
ASolver_MG::use_fopr_for_smoother
bool use_fopr_for_smoother() const
Definition: asolver_MG-tmpl.h:174
ASolver_MG::set_parameters
void set_parameters(const Parameters &params)
setting parameters by a Parameter object.
Definition: asolver_MG-tmpl.h:63
MultiGrid_Clover::set_afopr_fine
void set_afopr_fine(AFopr_dd< AFIELD2 > *afopr)
Definition: MultiGrid_Clover.h:116
ASolver_MG::run_setup
void run_setup()
setup
Definition: asolver_MG-tmpl.h:412
AFopr_dd
Base class of fermion operator family.
Definition: afopr_dd.h:24
CoarseSolver_t
ASolver_BiCGStab_Cmplx< AField_f > CoarseSolver_t
Definition: asolver_MG.cpp:60
Parameters::get_int_vector
vector< int > get_int_vector(const string &key) const
Definition: parameters.cpp:267
Parameters::to_string
static string to_string(const vector< T > &v)
Definition: parameters.h:148
Timer
Definition: timer.h:31
asolver_MG.h
Multigrid solver.
Field::real_t
double real_t
Definition: field.h:51
ASolver_MG::tidyup
void tidyup(void)
Definition: asolver_MG-tmpl.h:56
ASolver_MG::set_lattice
void set_lattice(const vector< int > &sap_block_size)
Definition: asolver_MG-tmpl.h:342
ASolver_MG::flop_count
double flop_count()
returns the floating point operation count.
Definition: asolver_MG-tmpl.h:596
CommonParameters::Nx
static int Nx()
Definition: commonParameters.h:105
MultiGrid_t
MultiGrid_Clover< AField_f, AField_f > MultiGrid_t
Definition: asolver_MG.cpp:47
AFopr_Clover_coarse::set_parameters
void set_parameters(const Parameters &params)
setting parameters by a Parameter object.
Definition: afopr_Clover_coarse-tmpl.h:958
ASolver::solve
virtual void solve(AFIELD &x, const AFIELD &b, int &nconv, real_t &diff)
Definition: asolver.h:51
Timer::start
void start()
Definition: timer.cpp:44
CommonParameters::Nc
static int Nc()
Definition: commonParameters.h:115
ASolver_BiCGStab_Cmplx
Definition: asolver_BiCGStab_Cmplx.h:52
AFopr_Clover_coarse
Definition: afopr_Clover_coarse.h:40
CommonParameters::Nt
static int Nt()
Definition: commonParameters.h:108
ASolver_MG::set_parameters_level0
void set_parameters_level0(const Parameters &params)
setting parameters by a Parameter object.
Definition: asolver_MG-tmpl.h:99
threadManager.h
Parameters::get_double
double get_double(const string &key) const
Definition: parameters.cpp:175
OuterSolver_t
ASolver_FBiCGStab< AField_d > OuterSolver_t
Definition: asolver_MG.cpp:59
Parameters::set_int_vector
void set_int_vector(const string &key, const vector< int > &value)
Definition: parameters.cpp:45
ASolver_MG::init_solver
void init_solver()
Definition: asolver_MG.h:166
ASolver_MG::init
void init(void)
Definition: asolver_MG-tmpl.h:43
ASolver_MG::set_foprD
void set_foprD(AFopr< AFIELD > *foprD)
Definition: asolver_MG-tmpl.h:198
ASolver_SAP::set_parameters
void set_parameters(const Parameters &params)
setting parameters by a Parameter object.
Definition: asolver_SAP-tmpl.h:67
CommonParameters::Nd
static int Nd()
Definition: commonParameters.h:116
randomNumberManager.h
AFopr_Clover_dd
Definition: afopr_Clover_dd.h:45
Parameters::set_int
void set_int(const string &key, const int value)
Definition: parameters.cpp:36
ASolver_MG::run_setup_initial
void run_setup_initial(std::vector< AFIELD_f > &testvec_work)
Definition: asolver_MG-tmpl.h:441
ASolver_MG::run_setup_iterative
void run_setup_iterative(int niter, std::vector< AFIELD_f > &testvec_work)
Definition: asolver_MG-tmpl.h:511
APrecond_MG
Definition: aprecond_MG.h:39
AFopr_Clover
Definition: afopr_Clover.h:41
Bridge::BridgeIO::crucial
void crucial(const char *format,...)
Definition: bridgeIO.cpp:180
ASolver_MG::set_fopr_smoother
void set_fopr_smoother(AFopr_dd< AFIELD_f > *foprF)
Definition: asolver_MG-tmpl.h:232
Field
Container of Field-type object.
Definition: field.h:46
ThreadManager::get_thread_id
static int get_thread_id()
returns thread id.
Definition: threadManager.cpp:253
MultiGrid_Clover
Definition: MultiGrid_Clover.h:25
ASolver_BiCGStab_Cmplx::set_parameters
void set_parameters(const Parameters &params)
setting parameters by a Parameter object.
Definition: asolver_BiCGStab_Cmplx-tmpl.h:74
Bridge::BridgeIO::general
void general(const char *format,...)
Definition: bridgeIO.cpp:200
Smoother_t
ASolver_SAP< AField_f > Smoother_t
Definition: asolver_MG.cpp:64
ASolver::real_t
AFIELD::real_t real_t
Definition: asolver.h:29
ASolver_MG::init_coarse_grid
void init_coarse_grid()
Definition: asolver_MG-tmpl.h:282
ASolver_MG::set_parameters_level1
void set_parameters_level1(const Parameters &params)
setting parameters by a Parameter object.
Definition: asolver_MG-tmpl.h:107
Timer::stop
void stop()
Definition: timer.cpp:69
ThreadManager::assert_single_thread
static void assert_single_thread(const std::string &class_name)
assert currently running on single thread.
Definition: threadManager.cpp:372
Parameters::lookup
Parameters lookup(const string &key) const
Definition: parameters.h:79
Timer::report
void report(const Bridge::VerboseLevel vl=Bridge::GENERAL)
Definition: timer.cpp:128
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512