Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Shiftsolver_CG Class Reference

Multishift Conjugate Gradient solver. More...

#include <shiftsolver_CG.h>

Inheritance diagram for Shiftsolver_CG:
Shiftsolver

Public Member Functions

 Shiftsolver_CG (Fopr *fopr)
 
 Shiftsolver_CG (Fopr *fopr, const int niter, const double stop_cond)
 
 Shiftsolver_CG (unique_ptr< Fopr > &fopr)
 
 Shiftsolver_CG (unique_ptr< Fopr > &fopr, const int niter, const double stop_cond)
 
 ~Shiftsolver_CG ()
 
void set_parameters (const Parameters &params)
 
void set_parameters (const int niter, const double stop_cond)
 
void solve (std::vector< Field > &solution, const std::vector< double > &shift, const Field &source, int &Nconv, double &diff)
 
- Public Member Functions inherited from Shiftsolver
 Shiftsolver ()
 
virtual ~Shiftsolver ()
 
void set_parameter_verboselevel (const Bridge::VerboseLevel vl)
 

Static Public Attributes

static const std::string class_name = "Shiftsolver_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

Foprm_fopr
 
int m_Niter
 
double m_Stop_cond
 
std::vector< Fieldm_x
 
std::vector< Fieldm_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
 

Additional Inherited Members

- Protected Attributes inherited from Shiftsolver
Bridge::VerboseLevel m_vl
 

Detailed Description

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 31 of file shiftsolver_CG.h.

Constructor & Destructor Documentation

Shiftsolver_CG::Shiftsolver_CG ( Fopr fopr)
inline

Definition at line 52 of file shiftsolver_CG.h.

Shiftsolver_CG::Shiftsolver_CG ( Fopr fopr,
const int  niter,
const double  stop_cond 
)
inline

Definition at line 55 of file shiftsolver_CG.h.

Shiftsolver_CG::Shiftsolver_CG ( unique_ptr< Fopr > &  fopr)
inline

Definition at line 61 of file shiftsolver_CG.h.

Shiftsolver_CG::Shiftsolver_CG ( unique_ptr< Fopr > &  fopr,
const int  niter,
const double  stop_cond 
)
inline

Definition at line 64 of file shiftsolver_CG.h.

Shiftsolver_CG::~Shiftsolver_CG ( )
inline

Definition at line 70 of file shiftsolver_CG.h.

Member Function Documentation

void Shiftsolver_CG::reset_field ( const Field b,
const std::vector< double > &  sigma,
const int  Nshift 
)
private

Definition at line 258 of file shiftsolver_CG.cpp.

void Shiftsolver_CG::set_parameters ( const Parameters params)
virtual

Implements Shiftsolver.

Definition at line 19 of file shiftsolver_CG.cpp.

void Shiftsolver_CG::set_parameters ( const int  niter,
const double  stop_cond 
)

Definition at line 43 of file shiftsolver_CG.cpp.

void Shiftsolver_CG::solve ( std::vector< Field > &  solution,
const std::vector< double > &  shift,
const Field source,
int &  Nconv,
double &  diff 
)
virtual

Implements Shiftsolver.

Definition at line 67 of file shiftsolver_CG.cpp.

void Shiftsolver_CG::solve_init ( double &  rr)
private

Definition at line 159 of file shiftsolver_CG.cpp.

void Shiftsolver_CG::solve_step ( double &  rr)
private

Definition at line 184 of file shiftsolver_CG.cpp.

Member Data Documentation

const std::string Shiftsolver_CG::class_name = "Shiftsolver_CG"
static

Definition at line 34 of file shiftsolver_CG.h.

double Shiftsolver_CG::m_alpha_p
private

Definition at line 46 of file shiftsolver_CG.h.

double Shiftsolver_CG::m_beta_p
private

Definition at line 46 of file shiftsolver_CG.h.

std::vector<double> Shiftsolver_CG::m_csh2
private

Definition at line 44 of file shiftsolver_CG.h.

Fopr* Shiftsolver_CG::m_fopr
private

Definition at line 37 of file shiftsolver_CG.h.

int Shiftsolver_CG::m_Niter
private

Definition at line 39 of file shiftsolver_CG.h.

int Shiftsolver_CG::m_Nshift2
private

Definition at line 47 of file shiftsolver_CG.h.

std::vector<Field> Shiftsolver_CG::m_p
private

Definition at line 42 of file shiftsolver_CG.h.

std::vector<double> Shiftsolver_CG::m_pp
private

Definition at line 44 of file shiftsolver_CG.h.

Field Shiftsolver_CG::m_r
private

Definition at line 43 of file shiftsolver_CG.h.

Field Shiftsolver_CG::m_s
private

Definition at line 43 of file shiftsolver_CG.h.

double Shiftsolver_CG::m_sigma0
private

Definition at line 49 of file shiftsolver_CG.h.

double Shiftsolver_CG::m_snorm
private

Definition at line 46 of file shiftsolver_CG.h.

double Shiftsolver_CG::m_Stop_cond
private

Definition at line 40 of file shiftsolver_CG.h.

std::vector<Field> Shiftsolver_CG::m_x
private

Definition at line 42 of file shiftsolver_CG.h.

std::vector<double> Shiftsolver_CG::m_zeta1
private

Definition at line 44 of file shiftsolver_CG.h.

std::vector<double> Shiftsolver_CG::m_zeta2
private

Definition at line 44 of file shiftsolver_CG.h.


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