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

CGNR solver. More...

#include <asolver_CGNR.h>

Inheritance diagram for ASolver_CGNR< AFIELD >:
ASolver_CG< AFIELD > ASolver< AFIELD >

Public Types

typedef AFIELD::real_t real_t
 
- Public Types inherited from ASolver_CG< AFIELD >
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_CGNR (AFopr< AFIELD > *fopr)
 
 ASolver_CGNR (unique_ptr< AFopr< AFIELD > > &fopr)
 
 ~ASolver_CGNR ()
 
void set_parameters (const Parameters &params)
 setting parameters by a Parameter object. More...
 
void solve (AFIELD &solution, const AFIELD &source, 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_CG< AFIELD >
 ASolver_CG (AFopr< AFIELD > *fopr)
 constructor. More...
 
 ~ASolver_CG ()
 destructor. 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_mode)
 setting parameters. More...
 
void set_init_mode (const InitialGuess init_guess)
 
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_CGNR"
 
- Static Public Attributes inherited from ASolver_CG< AFIELD >
static const std::string class_name = "ASolver_CG"
 

Private Member Functions

void init ()
 

Private Attributes

AFopr< AFIELD > * m_fopr
 
AFIELD m_b2
 
std::string m_mode_fopr
 
double m_flop
 

Additional Inherited Members

- Protected Member Functions inherited from ASolver_CG< AFIELD >
 ASolver_CG ()
 calling constructor without fermion operator is forbidden. More...
 
void init (void)
 
void tidyup (void)
 
void solve_CG_init (real_t &rrp, real_t &rr)
 
void solve_CG_step (real_t &rrp, real_t &rr)
 
- Protected Attributes inherited from ASolver_CG< AFIELD >
AFopr< AFIELD > * m_fopr
 fermion operator. More...
 
int m_Niter
 maximum iteration number. More...
 
real_t m_Stop_cond
 stopping criterion (squared). More...
 
int m_nconv
 to remember convergence iteration to provide flop count. More...
 
InitialGuess m_initial_mode
 mode switch for initial guess More...
 
AFIELD m_x
 working vectors. More...
 
AFIELD m_r
 
AFIELD m_p
 
AFIELD m_s
 
- Protected Attributes inherited from ASolver< AFIELD >
Bridge::VerboseLevel m_vl
 

Detailed Description

template<typename AFIELD>
class ASolver_CGNR< AFIELD >

CGNR solver.

solve D x = b by (Ddag D) x = b' and b' = Ddag b.

delegate to base CG solver. NB. iter displayed by vout.detailed does not give #mult of D but #mult of DdagD

Created by copying from core library. [21 Nov 2018 H.Matsufuru]

Definition at line 31 of file asolver_CGNR.h.

Member Typedef Documentation

◆ real_t

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

Definition at line 34 of file asolver_CGNR.h.

Constructor & Destructor Documentation

◆ ASolver_CGNR() [1/2]

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

Definition at line 47 of file asolver_CGNR.h.

◆ ASolver_CGNR() [2/2]

template<typename AFIELD >
ASolver_CGNR< AFIELD >::ASolver_CGNR ( unique_ptr< AFopr< AFIELD > > &  fopr)
inline

Definition at line 51 of file asolver_CGNR.h.

◆ ~ASolver_CGNR()

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

Definition at line 55 of file asolver_CGNR.h.

Member Function Documentation

◆ class_name() [1/2]

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

Definition at line 23 of file asolver_CGNR.cpp.

◆ class_name() [2/2]

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

Definition at line 37 of file asolver_CGNR.cpp.

◆ flop_count()

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

returns the floating point operation count.

Reimplemented from ASolver_CG< AFIELD >.

Definition at line 131 of file asolver_CGNR-tmpl.h.

◆ get_fopr()

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

returns the pointer to the fermion operator.

Reimplemented from ASolver_CG< AFIELD >.

Definition at line 62 of file asolver_CGNR.h.

◆ init()

template<typename AFIELD >
void ASolver_CGNR< AFIELD >::init
private

Definition at line 24 of file asolver_CGNR-tmpl.h.

◆ set_parameters()

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

setting parameters by a Parameter object.

Reimplemented from ASolver_CG< AFIELD >.

Definition at line 36 of file asolver_CGNR-tmpl.h.

◆ solve()

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

solver main.

Reimplemented from ASolver_CG< AFIELD >.

Definition at line 49 of file asolver_CGNR-tmpl.h.

Member Data Documentation

◆ class_name

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

Definition at line 35 of file asolver_CGNR.h.

◆ m_b2

template<typename AFIELD >
AFIELD ASolver_CGNR< AFIELD >::m_b2
private

Definition at line 41 of file asolver_CGNR.h.

◆ m_flop

template<typename AFIELD >
double ASolver_CGNR< AFIELD >::m_flop
private

Definition at line 43 of file asolver_CGNR.h.

◆ m_fopr

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

Definition at line 40 of file asolver_CGNR.h.

◆ m_mode_fopr

template<typename AFIELD >
std::string ASolver_CGNR< AFIELD >::m_mode_fopr
private

Definition at line 42 of file asolver_CGNR.h.


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