Bridge++  Ver. 2.0.2
AShiftsolver_CG< FIELD, FOPR > Class Template Reference

Multishift Conjugate Gradient solver. More...

#include <ashiftsolver_CG.h>

Inheritance diagram for AShiftsolver_CG< FIELD, FOPR >:
AShiftsolver< FIELD >

Public Types

typedef FIELD::real_t real_t
 

Public Member Functions

 AShiftsolver_CG (FOPR *fopr)
 
 AShiftsolver_CG (FOPR *fopr, int niter, double stop_cond)
 
 ~AShiftsolver_CG ()
 
void set_parameters (const Parameters &params)
 
void set_parameters (const int niter, const double stop_cond)
 
void get_parameters (Parameters &params) const
 
void solve (std::vector< FIELD > &solution, const std::vector< double > &shift, const FIELD &source, int &Nconv, double &diff)
 
double flop_count ()
 
const std::string class_name
 
- Public Member Functions inherited from AShiftsolver< FIELD >
 AShiftsolver ()
 
virtual ~AShiftsolver ()
 

Static Public Attributes

static const std::string class_name = "AShiftsolver_CG"
 

Private Member Functions

void solve_init (double &)
 
void solve_step (double &)
 
void reset_field (const FIELD &b, const std::vector< double > &sigma, const int Nshift)
 

Private Attributes

Bridge::VerboseLevel m_vl
 
FOPR * m_fopr
 
int m_Niter
 
double m_Stop_cond
 
std::vector< FIELD > m_x
 
std::vector< FIELD > m_p
 
FIELD m_r
 
FIELD m_s
 
std::vector< double > m_zeta1
 
std::vector< double > m_zeta2
 
std::vector< double > m_csh2
 
std::vector< double > m_pp
 
double m_snorm
 
double m_alpha_p
 
double m_beta_p
 
int m_Nshift2
 
double m_sigma0
 

Detailed Description

template<typename FIELD, typename FOPR>
class AShiftsolver_CG< FIELD, FOPR >

Multishift Conjugate Gradient solver.

                            [23 Dec 2011  H.Matsufuru]

unique_ptr is introduced to avoid memory leaks [21 Mar 2015 Y.Namekawa]

Definition at line 32 of file ashiftsolver_CG.h.

Member Typedef Documentation

◆ real_t

template<typename FIELD , typename FOPR >
typedef FIELD::real_t AShiftsolver_CG< FIELD, FOPR >::real_t

Definition at line 35 of file ashiftsolver_CG.h.

Constructor & Destructor Documentation

◆ AShiftsolver_CG() [1/2]

template<typename FIELD , typename FOPR >
AShiftsolver_CG< FIELD, FOPR >::AShiftsolver_CG ( FOPR *  fopr)
inline

Definition at line 58 of file ashiftsolver_CG.h.

◆ AShiftsolver_CG() [2/2]

template<typename FIELD , typename FOPR >
AShiftsolver_CG< FIELD, FOPR >::AShiftsolver_CG ( FOPR *  fopr,
int  niter,
double  stop_cond 
)
inline

Definition at line 62 of file ashiftsolver_CG.h.

◆ ~AShiftsolver_CG()

template<typename FIELD , typename FOPR >
AShiftsolver_CG< FIELD, FOPR >::~AShiftsolver_CG ( )
inline

Definition at line 67 of file ashiftsolver_CG.h.

Member Function Documentation

◆ class_name()

const std::string AShiftsolver_CG< Field, Fopr >::class_name

Definition at line 20 of file shiftsolver_CG.cpp.

◆ flop_count()

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::flop_count
virtual

Implements AShiftsolver< FIELD >.

Definition at line 327 of file ashiftsolver_CG-tmpl.h.

◆ get_parameters()

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::get_parameters ( Parameters params) const
virtual

Implements AShiftsolver< FIELD >.

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

◆ reset_field()

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::reset_field ( const FIELD &  b,
const std::vector< double > &  sigma,
const int  Nshift 
)
private

Definition at line 286 of file ashiftsolver_CG-tmpl.h.

◆ set_parameters() [1/2]

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::set_parameters ( const int  niter,
const double  stop_cond 
)

Definition at line 60 of file ashiftsolver_CG-tmpl.h.

◆ set_parameters() [2/2]

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::set_parameters ( const Parameters params)
virtual

Implements AShiftsolver< FIELD >.

Definition at line 22 of file ashiftsolver_CG-tmpl.h.

◆ solve()

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::solve ( std::vector< FIELD > &  solution,
const std::vector< double > &  shift,
const FIELD &  source,
int &  Nconv,
double &  diff 
)
virtual

Implements AShiftsolver< FIELD >.

Definition at line 88 of file ashiftsolver_CG-tmpl.h.

◆ solve_init()

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::solve_init ( double &  rr)
private

Definition at line 185 of file ashiftsolver_CG-tmpl.h.

◆ solve_step()

template<typename FIELD , typename FOPR >
void AShiftsolver_CG< FIELD, FOPR >::solve_step ( double &  rr)
private

Definition at line 211 of file ashiftsolver_CG-tmpl.h.

Member Data Documentation

◆ class_name

template<typename FIELD , typename FOPR >
const std::string AShiftsolver_CG< FIELD, FOPR >::class_name = "AShiftsolver_CG"
static

Definition at line 37 of file ashiftsolver_CG.h.

◆ m_alpha_p

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::m_alpha_p
private

Definition at line 51 of file ashiftsolver_CG.h.

◆ m_beta_p

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::m_beta_p
private

Definition at line 51 of file ashiftsolver_CG.h.

◆ m_csh2

template<typename FIELD , typename FOPR >
std::vector<double> AShiftsolver_CG< FIELD, FOPR >::m_csh2
private

Definition at line 49 of file ashiftsolver_CG.h.

◆ m_fopr

template<typename FIELD , typename FOPR >
FOPR* AShiftsolver_CG< FIELD, FOPR >::m_fopr
private

Definition at line 42 of file ashiftsolver_CG.h.

◆ m_Niter

template<typename FIELD , typename FOPR >
int AShiftsolver_CG< FIELD, FOPR >::m_Niter
private

Definition at line 44 of file ashiftsolver_CG.h.

◆ m_Nshift2

template<typename FIELD , typename FOPR >
int AShiftsolver_CG< FIELD, FOPR >::m_Nshift2
private

Definition at line 52 of file ashiftsolver_CG.h.

◆ m_p

template<typename FIELD , typename FOPR >
std::vector<FIELD> AShiftsolver_CG< FIELD, FOPR >::m_p
private

Definition at line 47 of file ashiftsolver_CG.h.

◆ m_pp

template<typename FIELD , typename FOPR >
std::vector<double> AShiftsolver_CG< FIELD, FOPR >::m_pp
private

Definition at line 49 of file ashiftsolver_CG.h.

◆ m_r

template<typename FIELD , typename FOPR >
FIELD AShiftsolver_CG< FIELD, FOPR >::m_r
private

Definition at line 48 of file ashiftsolver_CG.h.

◆ m_s

template<typename FIELD , typename FOPR >
FIELD AShiftsolver_CG< FIELD, FOPR >::m_s
private

Definition at line 48 of file ashiftsolver_CG.h.

◆ m_sigma0

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::m_sigma0
private

Definition at line 54 of file ashiftsolver_CG.h.

◆ m_snorm

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::m_snorm
private

Definition at line 51 of file ashiftsolver_CG.h.

◆ m_Stop_cond

template<typename FIELD , typename FOPR >
double AShiftsolver_CG< FIELD, FOPR >::m_Stop_cond
private

Definition at line 45 of file ashiftsolver_CG.h.

◆ m_vl

template<typename FIELD , typename FOPR >
Bridge::VerboseLevel AShiftsolver_CG< FIELD, FOPR >::m_vl
private

Definition at line 40 of file ashiftsolver_CG.h.

◆ m_x

template<typename FIELD , typename FOPR >
std::vector<FIELD> AShiftsolver_CG< FIELD, FOPR >::m_x
private

Definition at line 47 of file ashiftsolver_CG.h.

◆ m_zeta1

template<typename FIELD , typename FOPR >
std::vector<double> AShiftsolver_CG< FIELD, FOPR >::m_zeta1
private

Definition at line 49 of file ashiftsolver_CG.h.

◆ m_zeta2

template<typename FIELD , typename FOPR >
std::vector<double> AShiftsolver_CG< FIELD, FOPR >::m_zeta2
private

Definition at line 49 of file ashiftsolver_CG.h.


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