Bridge++
Ver. 2.0.2
|
#include <asolver_MG.h>
Public Types | |
typedef AFIELD::real_t | real_t |
using | AFIELD_f = AField< float, AFIELD::IMPL > |
Public Types inherited from ASolver< AFIELD > | |
enum | InitialGuess { RHS, GIVEN, ZERO } |
typedef AFIELD::real_t | real_t |
Public Member Functions | |
ASolver_MG () | |
constructor. More... | |
~ASolver_MG () | |
destructor. More... | |
void | set_parameters (const Parameters ¶ms) |
setting parameters by a Parameter object. More... | |
void | set_parameters_level0 (const Parameters ¶ms) |
setting parameters by a Parameter object. More... | |
void | set_parameters_level1 (const Parameters ¶ms) |
setting parameters by a Parameter object. More... | |
void | set_parameters (const int Niter, const real_t Stop_cond, const std::vector< int > &sap_block_size, const int nvec) |
setting parameters. More... | |
void | set_parameters (const int Niter, const real_t Stop_cond, const std::string &outer_vlevel, const std::vector< int > &sap_block_size, const int nvec, const int nsetup, const int coarse_niter, const real_t coarse_stop_cond, const std::string &coarse_vlevel, const int smoother_niter, const real_t smoother_stop_cond) |
void | run_setup () |
setup More... | |
void | run_setup (std::vector< AFIELD_f > &testvec_work) |
void | run_setup_initial (std::vector< AFIELD_f > &testvec_work) |
void | run_setup_iterative (int niter, std::vector< AFIELD_f > &testvec_work) |
void | solve (AFIELD &xq, const AFIELD &b, int &nconv, real_t &diff) |
solver main. More... | |
AFopr< AFIELD > * | get_fopr () |
returns the pointer to the fermion operator. More... | |
AFopr< AFIELD > * | get_foprD () |
AFopr_dd< AFIELD_f > * | get_foprF () |
AFopr_dd< AFIELD_f > * | get_fopr_smoother () |
AFopr_dd< AFIELD_f > * | new_fopr_smoother (const Parameters ¶m) const |
AFopr< AFIELD_f > * | get_fopr_coarse () |
void | set_foprD (AFopr< AFIELD > *foprD) |
void | set_foprF (AFopr_dd< AFIELD_f > *foprF) |
void | set_fopr_smoother (AFopr_dd< AFIELD_f > *foprF) |
void | set_lattice (const vector< int > &sap_block_size) |
void | init_solver (std::string mode) |
void | init_solver () |
double | flop_count () |
returns the floating point operation count. More... | |
double | flop_count_setup () |
returns the floating point operation count [setup]. More... | |
void | reset_flop_count () |
bool | use_fopr_for_smoother () const |
const std::string | class_name |
Public Member Functions inherited from ASolver< AFIELD > | |
ASolver () | |
virtual | ~ASolver () |
void | set_parameter_verboselevel (const Bridge::VerboseLevel vl) |
virtual void | set_init_mode (const InitialGuess init_guess) |
Static Public Attributes | |
static const std::string | class_name = "ASolver_MG" |
Protected Member Functions | |
void | init_coarse_grid () |
void | init (void) |
void | tidyup (void) |
void | solve_MG_init (real_t &rrp, real_t &rr) |
void | solve_MG_step (real_t &rrp, real_t &rr) |
Protected Attributes | |
unique_ptr< APrecond_MG< AFIELD, AFIELD_f > > | m_prec_mg |
std::vector< int > | m_sap_block_size |
AFopr< AFIELD > * | m_afopr_fineD |
AFopr_dd< AFIELD_f > * | m_afopr_fineF |
AFopr_dd< AFIELD_f > * | m_afopr_smoother |
unique_ptr< AFopr< AFIELD_f > > | m_afopr_coarse |
unique_ptr< ASolver< AFIELD_f > > | m_asolver_coarse |
unique_ptr< ASolver< AFIELD_f > > | m_asolver_smoother |
unique_ptr< ASolver< AFIELD > > | m_outer_solver |
unique_ptr< MultiGrid< AFIELD_f, AFIELD_f > > | m_multigrid |
int | m_Niter |
maximum iteration number. More... | |
real_t | m_Stop_cond |
stopping criterion (squared). More... | |
int | m_Nconv |
iteratoin number to calculate flop More... | |
int | m_nvec |
number of testvectors More... | |
int | m_nsetup |
setup iterations More... | |
int | m_smoother_niter |
int | m_smoother_stop_cond |
Parameters | m_params_asolver_coarse |
parameters for coarse grid solver More... | |
Parameters | m_params_asolver_outer |
parameters for outer solver More... | |
std::string | m_mode |
int | m_nconv |
set "D" for colver (default), "DdagD" for domainwall More... | |
AFIELD | m_vec_work |
calling constructor without fermion operator is forbidden. More... | |
std::vector< int > | m_coarse_lattice |
unique_ptr< Timer > | m_timer_gramschmidt |
unique_ptr< Timer > | m_timer_generate_coarse_op |
Protected Attributes inherited from ASolver< AFIELD > | |
Bridge::VerboseLevel | m_vl |
Static Protected Attributes | |
static constexpr int | m_min_res_iter = 6 |
Definition at line 34 of file asolver_MG.h.
using ASolver_MG< AFIELD >::AFIELD_f = AField<float, AFIELD::IMPL> |
Definition at line 38 of file asolver_MG.h.
typedef AFIELD::real_t ASolver_MG< AFIELD >::real_t |
Definition at line 37 of file asolver_MG.h.
|
inline |
constructor.
Definition at line 107 of file asolver_MG.h.
|
inline |
destructor.
Definition at line 114 of file asolver_MG.h.
const std::string ASolver_MG< AField_d >::class_name |
Definition at line 71 of file asolver_MG.cpp.
|
virtual |
returns the floating point operation count.
Reimplemented from ASolver< AFIELD >.
Definition at line 596 of file asolver_MG-tmpl.h.
double ASolver_MG< AFIELD >::flop_count_setup | ( | ) |
returns the floating point operation count [setup].
|
inlinevirtual |
returns the pointer to the fermion operator.
Reimplemented from ASolver< AFIELD >.
Definition at line 144 of file asolver_MG.h.
|
inline |
Definition at line 151 of file asolver_MG.h.
|
inline |
Definition at line 147 of file asolver_MG.h.
|
inline |
Definition at line 145 of file asolver_MG.h.
|
inline |
Definition at line 146 of file asolver_MG.h.
|
protected |
Definition at line 43 of file asolver_MG-tmpl.h.
|
protected |
Definition at line 282 of file asolver_MG-tmpl.h.
|
inline |
Definition at line 166 of file asolver_MG.h.
void ASolver_MG< AFIELD >::init_solver | ( | std::string | mode | ) |
Definition at line 249 of file asolver_MG-tmpl.h.
AFopr_dd< typename ASolver_MG< AFIELD >::AFIELD_f > * ASolver_MG< AFIELD >::new_fopr_smoother | ( | const Parameters & | param | ) | const |
Definition at line 186 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::reset_flop_count |
Definition at line 587 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::run_setup |
setup
Definition at line 412 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::run_setup | ( | std::vector< AFIELD_f > & | testvec_work | ) |
Definition at line 381 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::run_setup_initial | ( | std::vector< AFIELD_f > & | testvec_work | ) |
Definition at line 441 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::run_setup_iterative | ( | int | niter, |
std::vector< AFIELD_f > & | testvec_work | ||
) |
Definition at line 511 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_fopr_smoother | ( | AFopr_dd< AFIELD_f > * | foprF | ) |
Definition at line 232 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_foprD | ( | AFopr< AFIELD > * | foprD | ) |
Definition at line 198 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_foprF | ( | AFopr_dd< AFIELD_f > * | foprF | ) |
Definition at line 216 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_lattice | ( | const vector< int > & | sap_block_size | ) |
Definition at line 342 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_parameters | ( | const int | Niter, |
const real_t | Stop_cond, | ||
const std::string & | outer_vlevel, | ||
const std::vector< int > & | sap_block_size, | ||
const int | nvec, | ||
const int | nsetup, | ||
const int | coarse_niter, | ||
const real_t | coarse_stop_cond, | ||
const std::string & | coarse_vlevel, | ||
const int | smoother_niter, | ||
const real_t | smoother_stop_cond | ||
) |
Definition at line 128 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_parameters | ( | const int | Niter, |
const real_t | Stop_cond, | ||
const std::vector< int > & | sap_block_size, | ||
const int | nvec | ||
) |
setting parameters.
|
virtual |
setting parameters by a Parameter object.
Implements ASolver< AFIELD >.
Definition at line 63 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_parameters_level0 | ( | const Parameters & | params | ) |
setting parameters by a Parameter object.
Definition at line 99 of file asolver_MG-tmpl.h.
void ASolver_MG< AFIELD >::set_parameters_level1 | ( | const Parameters & | params | ) |
setting parameters by a Parameter object.
Definition at line 107 of file asolver_MG-tmpl.h.
|
virtual |
solver main.
Reimplemented from ASolver< AFIELD >.
Definition at line 578 of file asolver_MG-tmpl.h.
|
protected |
|
protected |
|
protected |
Definition at line 56 of file asolver_MG-tmpl.h.
bool ASolver_MG< AFIELD >::use_fopr_for_smoother |
Definition at line 174 of file asolver_MG-tmpl.h.
|
static |
Definition at line 54 of file asolver_MG.h.
|
protected |
Definition at line 68 of file asolver_MG.h.
|
protected |
Definition at line 63 of file asolver_MG.h.
|
protected |
Definition at line 64 of file asolver_MG.h.
|
protected |
Definition at line 65 of file asolver_MG.h.
|
protected |
Definition at line 71 of file asolver_MG.h.
|
protected |
Definition at line 72 of file asolver_MG.h.
|
protected |
Definition at line 193 of file asolver_MG.h.
|
staticconstexprprotected |
Definition at line 85 of file asolver_MG.h.
|
protected |
Definition at line 93 of file asolver_MG.h.
|
protected |
Definition at line 76 of file asolver_MG.h.
|
protected |
iteratoin number to calculate flop
Definition at line 80 of file asolver_MG.h.
|
protected |
set "D" for colver (default), "DdagD" for domainwall
to remember convergence iteration to provide flop count.
Definition at line 96 of file asolver_MG.h.
|
protected |
maximum iteration number.
Definition at line 78 of file asolver_MG.h.
|
protected |
setup iterations
Definition at line 83 of file asolver_MG.h.
|
protected |
number of testvectors
Definition at line 82 of file asolver_MG.h.
|
protected |
Definition at line 73 of file asolver_MG.h.
|
protected |
parameters for coarse grid solver
Definition at line 89 of file asolver_MG.h.
|
protected |
parameters for outer solver
Definition at line 90 of file asolver_MG.h.
|
protected |
Definition at line 59 of file asolver_MG.h.
|
protected |
Definition at line 60 of file asolver_MG.h.
|
protected |
Definition at line 86 of file asolver_MG.h.
|
protected |
Definition at line 87 of file asolver_MG.h.
|
protected |
stopping criterion (squared).
Definition at line 79 of file asolver_MG.h.
|
protected |
Definition at line 196 of file asolver_MG.h.
|
protected |
Definition at line 195 of file asolver_MG.h.
|
protected |
calling constructor without fermion operator is forbidden.
working vectors.
Definition at line 102 of file asolver_MG.h.