Bridge++  Ver. 2.0.2
ASolver_BiCGStab_Cmplx< AFIELD > Class Template Reference

#include <asolver_BiCGStab_Cmplx.h>

Inheritance diagram for ASolver_BiCGStab_Cmplx< AFIELD >:
ASolver< AFIELD >

Classes

struct  coeff_t
 

Public Types

typedef AFIELD::real_t real_t
 
using InitialGuess = typename ASolver< AFIELD >::InitialGuess
 
- Public Types inherited from ASolver< AFIELD >
enum  InitialGuess { RHS, GIVEN, ZERO }
 
typedef AFIELD::real_t real_t
 

Public Member Functions

 ASolver_BiCGStab_Cmplx (AFopr< AFIELD > *fopr)
 constructor. More...
 
 ~ASolver_BiCGStab_Cmplx ()
 destructor. More...
 
void set_parameters (const Parameters &params)
 setting parameters by a Parameter object. More...
 
void set_parameters (const int Niter, const real_t Stop_cond)
 setting parameters. More...
 
void set_parameters (const int Niter, const real_t Stop_cond, const InitialGuess init_guess)
 setting parameters. More...
 
void set_init_mode (const InitialGuess init_guess)
 
void set_parameters_BiCGStab_series (const real_t Omega_tolerance)
 setting BiCGStab specific parameters. More...
 
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...
 
double flop_count ()
 returns the floating point operation count. More...
 
const std::string class_name
 
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_BiCGStab_Cmplx"
 

Protected Member Functions

 ASolver_BiCGStab_Cmplx ()
 calling constructor without fermion operator is forbidden. More...
 
void init (void)
 
void tidyup (void)
 
void solve_init (const AFIELD &b, real_t &rr, coeff_t &, const real_t scale, const InitialGuess)
 
void solve_init_RHS (const AFIELD &b, real_t &rr, coeff_t &)
 
void solve_init_ZERO (const AFIELD &b, real_t &rr, coeff_t &)
 
void solve_init_GIVEN (const AFIELD &b, real_t &rr, coeff_t &, const real_t)
 
void solve_step (real_t &rr, int &iflg, coeff_t &)
 

Protected Attributes

int m_nconv
 to remember convergence iteration to provide flop count. More...
 
int m_init_mult
 to remember convergence iteration to provide flop count. More...
 
InitialGuess m_initial_mode
 mode switch for initial guess More...
 
- Protected Attributes inherited from ASolver< AFIELD >
Bridge::VerboseLevel m_vl
 

Private Attributes

AFopr< AFIELD > * m_fopr
 fermion operator. More...
 
int m_Niter
 maximum iteration number. More...
 
real_t m_Stop_cond
 stopping criterion (squared). More...
 
real_t m_Omega_tolerance
 tolerance for the stability More...
 
real_t m_ecrit
 to avoid too small denominator denominator. More...
 
AFIELDm_px
 
AFIELD m_r
 
AFIELD m_p
 
AFIELD m_rh
 
AFIELD m_v
 
AFIELD m_t
 

Detailed Description

template<typename AFIELD>
class ASolver_BiCGStab_Cmplx< AFIELD >

This class implements BiCGStab algorithm for nonhermitian matrix. The product of vectors is treated in complex. 12 Feb 2012 Y.Namekawa YAML is implemented. [14 Nov 2012 Y.Namekawa] Multi-threaded. [10 Jul 2014 H.Matsufuru] Introduce unique_ptr to avoid memory leaks. [21 Mar 2015 Y.Namekawa] Add restart. [22 Feb 2016 Y.Namekawa] Add flop_count. [ 8 Aug 2016 Y.Namekawa] Add use_init_guess. [ 7 Jul 2017 Y.Namekawa] Add a prescription to improve stability of BiCGStab, recommended by Kanamori-san. See G.L.G.Sleijpen and H.A.van der Vorst, Numerical Algorithms 10(1995)203-22. [26 Apr 2018 Y.Namekawa] Class template version. [27 Jul 2019 H.Matsufuru] Add initial guess, coeff_t [ 4 Jun 2020 I.Kanamori]

Definition at line 52 of file asolver_BiCGStab_Cmplx.h.

Member Typedef Documentation

◆ InitialGuess

template<typename AFIELD >
using ASolver_BiCGStab_Cmplx< AFIELD >::InitialGuess = typename ASolver<AFIELD>::InitialGuess

Definition at line 58 of file asolver_BiCGStab_Cmplx.h.

◆ real_t

template<typename AFIELD >
typedef AFIELD::real_t ASolver_BiCGStab_Cmplx< AFIELD >::real_t

Definition at line 55 of file asolver_BiCGStab_Cmplx.h.

Constructor & Destructor Documentation

◆ ASolver_BiCGStab_Cmplx() [1/2]

template<typename AFIELD >
ASolver_BiCGStab_Cmplx< AFIELD >::ASolver_BiCGStab_Cmplx ( )
inlineprotected

calling constructor without fermion operator is forbidden.

Definition at line 94 of file asolver_BiCGStab_Cmplx.h.

◆ ASolver_BiCGStab_Cmplx() [2/2]

template<typename AFIELD >
ASolver_BiCGStab_Cmplx< AFIELD >::ASolver_BiCGStab_Cmplx ( AFopr< AFIELD > *  fopr)
inline

constructor.

Definition at line 98 of file asolver_BiCGStab_Cmplx.h.

◆ ~ASolver_BiCGStab_Cmplx()

template<typename AFIELD >
ASolver_BiCGStab_Cmplx< AFIELD >::~ASolver_BiCGStab_Cmplx ( )
inline

destructor.

Definition at line 106 of file asolver_BiCGStab_Cmplx.h.

Member Function Documentation

◆ class_name() [1/2]

const std::string ASolver_BiCGStab_Cmplx< AField< double, QXS > >::class_name

Definition at line 31 of file asolver_BiCGStab_Cmplx.cpp.

◆ class_name() [2/2]

const std::string ASolver_BiCGStab_Cmplx< AField< float, QXS > >::class_name

Definition at line 45 of file asolver_BiCGStab_Cmplx.cpp.

◆ flop_count()

template<typename AFIELD >
double ASolver_BiCGStab_Cmplx< AFIELD >::flop_count
virtual

returns the floating point operation count.

Reimplemented from ASolver< AFIELD >.

Definition at line 468 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ get_fopr()

template<typename AFIELD >
AFopr<AFIELD>* ASolver_BiCGStab_Cmplx< AFIELD >::get_fopr ( )
inlinevirtual

returns the pointer to the fermion operator.

Reimplemented from ASolver< AFIELD >.

Definition at line 129 of file asolver_BiCGStab_Cmplx.h.

◆ init()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::init ( void  )
protected

Definition at line 39 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ set_init_mode()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::set_init_mode ( const InitialGuess  init_guess)
inline

Definition at line 117 of file asolver_BiCGStab_Cmplx.h.

◆ set_parameters() [1/3]

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::set_parameters ( const int  Niter,
const real_t  Stop_cond 
)

setting parameters.

Definition at line 130 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ set_parameters() [2/3]

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::set_parameters ( const int  Niter,
const real_t  Stop_cond,
const InitialGuess  init_guess 
)

setting parameters.

◆ set_parameters() [3/3]

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::set_parameters ( const Parameters params)
virtual

setting parameters by a Parameter object.

Implements ASolver< AFIELD >.

Definition at line 74 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ set_parameters_BiCGStab_series()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::set_parameters_BiCGStab_series ( const real_t  Omega_tolerance)

setting BiCGStab specific parameters.

Definition at line 161 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve ( AFIELD xq,
const AFIELD b,
int &  nconv,
real_t diff 
)
virtual

solver main.

Reimplemented from ASolver< AFIELD >.

Definition at line 178 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve_init()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve_init ( const AFIELD b,
real_t rr,
coeff_t ,
const real_t  scale,
const  InitialGuess 
)
inlineprotected

Definition at line 260 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve_init_GIVEN()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve_init_GIVEN ( const AFIELD b,
real_t rr,
coeff_t prev,
const real_t  scale 
)
protected

Definition at line 323 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve_init_RHS()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve_init_RHS ( const AFIELD b,
real_t rr,
coeff_t prev 
)
protected

Definition at line 281 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve_init_ZERO()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve_init_ZERO ( const AFIELD b,
real_t rr,
coeff_t prev 
)
protected

Definition at line 355 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ solve_step()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::solve_step ( real_t rr,
int &  iflg,
coeff_t prev 
)
protected

Definition at line 377 of file asolver_BiCGStab_Cmplx-tmpl.h.

◆ tidyup()

template<typename AFIELD >
void ASolver_BiCGStab_Cmplx< AFIELD >::tidyup ( void  )
protected

Definition at line 65 of file asolver_BiCGStab_Cmplx-tmpl.h.

Member Data Documentation

◆ class_name

template<typename AFIELD >
const std::string ASolver_BiCGStab_Cmplx< AFIELD >::class_name = "ASolver_BiCGStab_Cmplx"
static

Definition at line 57 of file asolver_BiCGStab_Cmplx.h.

◆ m_ecrit

template<typename AFIELD >
real_t ASolver_BiCGStab_Cmplx< AFIELD >::m_ecrit
private

to avoid too small denominator denominator.

Definition at line 68 of file asolver_BiCGStab_Cmplx.h.

◆ m_fopr

template<typename AFIELD >
AFopr<AFIELD>* ASolver_BiCGStab_Cmplx< AFIELD >::m_fopr
private

fermion operator.

Definition at line 61 of file asolver_BiCGStab_Cmplx.h.

◆ m_init_mult

template<typename AFIELD >
int ASolver_BiCGStab_Cmplx< AFIELD >::m_init_mult
protected

to remember convergence iteration to provide flop count.

Definition at line 88 of file asolver_BiCGStab_Cmplx.h.

◆ m_initial_mode

template<typename AFIELD >
InitialGuess ASolver_BiCGStab_Cmplx< AFIELD >::m_initial_mode
protected

mode switch for initial guess

Definition at line 91 of file asolver_BiCGStab_Cmplx.h.

◆ m_nconv

template<typename AFIELD >
int ASolver_BiCGStab_Cmplx< AFIELD >::m_nconv
protected

to remember convergence iteration to provide flop count.

Definition at line 85 of file asolver_BiCGStab_Cmplx.h.

◆ m_Niter

template<typename AFIELD >
int ASolver_BiCGStab_Cmplx< AFIELD >::m_Niter
private

maximum iteration number.

Definition at line 63 of file asolver_BiCGStab_Cmplx.h.

◆ m_Omega_tolerance

template<typename AFIELD >
real_t ASolver_BiCGStab_Cmplx< AFIELD >::m_Omega_tolerance
private

tolerance for the stability

Definition at line 66 of file asolver_BiCGStab_Cmplx.h.

◆ m_p

template<typename AFIELD >
AFIELD ASolver_BiCGStab_Cmplx< AFIELD >::m_p
private

Definition at line 73 of file asolver_BiCGStab_Cmplx.h.

◆ m_px

template<typename AFIELD >
AFIELD* ASolver_BiCGStab_Cmplx< AFIELD >::m_px
private

Matsufuru added: new AField_dev implementation Kanamori Modified: m_x is now a reference through pointer

Definition at line 72 of file asolver_BiCGStab_Cmplx.h.

◆ m_r

template<typename AFIELD >
AFIELD ASolver_BiCGStab_Cmplx< AFIELD >::m_r
private

Definition at line 73 of file asolver_BiCGStab_Cmplx.h.

◆ m_rh

template<typename AFIELD >
AFIELD ASolver_BiCGStab_Cmplx< AFIELD >::m_rh
private

Definition at line 73 of file asolver_BiCGStab_Cmplx.h.

◆ m_Stop_cond

template<typename AFIELD >
real_t ASolver_BiCGStab_Cmplx< AFIELD >::m_Stop_cond
private

stopping criterion (squared).

Definition at line 64 of file asolver_BiCGStab_Cmplx.h.

◆ m_t

template<typename AFIELD >
AFIELD ASolver_BiCGStab_Cmplx< AFIELD >::m_t
private

Definition at line 73 of file asolver_BiCGStab_Cmplx.h.

◆ m_v

template<typename AFIELD >
AFIELD ASolver_BiCGStab_Cmplx< AFIELD >::m_v
private

Definition at line 73 of file asolver_BiCGStab_Cmplx.h.


The documentation for this class was generated from the following files: