QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
quda::GCR Class Reference

#include <invert_quda.h>

Inheritance diagram for quda::GCR:
Inheritance graph
[legend]
Collaboration diagram for quda::GCR:
Collaboration graph
[legend]

Public Member Functions

 GCR (DiracMatrix &mat, DiracMatrix &matSloppy, DiracMatrix &matPrecon, SolverParam &param, TimeProfile &profile)
 
 GCR (DiracMatrix &mat, Solver &K, DiracMatrix &matSloppy, DiracMatrix &matPrecon, SolverParam &param, TimeProfile &profile)
 
virtual ~GCR ()
 
void operator() (ColorSpinorField &out, ColorSpinorField &in)
 
- Public Member Functions inherited from quda::Solver
 Solver (SolverParam &param, TimeProfile &profile)
 
virtual ~Solver ()
 
virtual void blocksolve (ColorSpinorField &out, ColorSpinorField &in)
 
bool convergence (double r2, double hq2, double r2_tol, double hq_tol)
 
bool convergenceHQ (double r2, double hq2, double r2_tol, double hq_tol)
 Test for HQ solver convergence – ignore L2 residual. More...
 
bool convergenceL2 (double r2, double hq2, double r2_tol, double hq_tol)
 Test for L2 solver convergence – ignore HQ residual. More...
 
void PrintStats (const char *name, int k, double r2, double b2, double hq2)
 Prints out the running statistics of the solver (requires a verbosity of QUDA_VERBOSE) More...
 
void PrintSummary (const char *name, int k, double r2, double b2, double r2_tol, double hq_tol)
 Prints out the summary of the solver convergence (requires a verbosity of QUDA_SUMMARIZE). Assumes SolverParam.true_res and SolverParam.true_res_hq has been set. More...
 
void constructDeflationSpace (const ColorSpinorField &meta, const DiracMatrix &mat, bool svd)
 Constructs the deflation space. More...
 
virtual double flops () const
 

Private Attributes

const DiracMatrixmat
 
const DiracMatrixmatSloppy
 
const DiracMatrixmatPrecon
 
SolverK
 
SolverParam Kparam
 
int nKrylov
 
Complexalpha
 
Complex ** beta
 
double * gamma
 
bool init
 
ColorSpinorFieldrp
 
ColorSpinorFieldyp
 residual vector More...
 
ColorSpinorFieldtmpp
 high precision accumulator More...
 
ColorSpinorFieldy_sloppy
 temporary for mat-vec More...
 
ColorSpinorFieldr_sloppy
 sloppy solution vector More...
 
std::vector< ColorSpinorField * > p
 sloppy residual vector More...
 
std::vector< ColorSpinorField * > Ap
 

Additional Inherited Members

- Static Public Member Functions inherited from quda::Solver
static Solvercreate (SolverParam &param, DiracMatrix &mat, DiracMatrix &matSloppy, DiracMatrix &matPrecon, TimeProfile &profile)
 
static double stopping (double tol, double b2, QudaResidualType residual_type)
 Set the solver L2 stopping condition. More...
 
- Public Attributes inherited from quda::Solver
EigenSolvereig_solve
 
bool deflate_init = false
 
std::vector< ColorSpinorField * > defl_tmp1
 
std::vector< ColorSpinorField * > defl_tmp2
 
- Protected Attributes inherited from quda::Solver
SolverParamparam
 
TimeProfileprofile
 
int node_parity
 

Detailed Description

Definition at line 816 of file invert_quda.h.

Constructor & Destructor Documentation

◆ GCR() [1/2]

quda::GCR::GCR ( DiracMatrix mat,
DiracMatrix matSloppy,
DiracMatrix matPrecon,
SolverParam param,
TimeProfile profile 
)

◆ GCR() [2/2]

quda::GCR::GCR ( DiracMatrix mat,
Solver K,
DiracMatrix matSloppy,
DiracMatrix matPrecon,
SolverParam param,
TimeProfile profile 
)
Parameters
KPreconditioner

Definition at line 196 of file inv_gcr_quda.cpp.

References alpha, Ap, beta, gamma, nKrylov, and p.

◆ ~GCR()

quda::GCR::~GCR ( )
virtual

Member Function Documentation

◆ operator()()

void quda::GCR::operator() ( ColorSpinorField out,
ColorSpinorField in 
)
virtual

Implements quda::Solver.

Definition at line 241 of file inv_gcr_quda.cpp.

References alpha, Ap, quda::blas::axpy(), beta, quda::blas::cabxpyzAxNorm(), quda::blas::cDotProductNormA(), quda::SolverParam::compute_null_vector, quda::SolverParam::compute_true_res, quda::Solver::constructDeflationSpace(), quda::Solver::convergence(), quda::blas::copy(), quda::ColorSpinorParam::create, quda::ColorSpinorField::Create(), csParam, quda::Solver::defl_tmp1, quda::Solver::defl_tmp2, quda::SolverParam::deflate, quda::Solver::deflate_init, quda::EigenSolver::deflateSVD(), quda::SolverParam::delta, quda::Solver::eig_solve, errorQuda, quda::SolverParam::evals, quda::SolverParam::evecs, quda::DiracMatrix::Expose(), quda::blas::flops, quda::Solver::flops(), quda::DiracMatrix::flops(), gamma, getVerbosity(), quda::SolverParam::gflops, quda::blas::HeavyQuarkResidualNorm(), init, quda::SolverParam::iter, K, quda::TimeProfile::Last(), mat, matPrecon, matSloppy, quda::SolverParam::max_res_increase, quda::SolverParam::max_res_increase_total, quda::SolverParam::maxiter, nKrylov, quda::blas::norm2(), quda::orthoDir(), p, quda::Solver::param, pipeline, quda::SolverParam::pipeline, popVerbosity(), quda::LatticeField::Precision(), quda::SolverParam::precision_sloppy, quda::SolverParam::preserve_source, printfQuda, quda::Solver::PrintStats(), quda::Solver::PrintSummary(), quda::Solver::profile, pushVerbosity(), QUDA_COMPUTE_NULL_VECTOR_NO, QUDA_CPU_FIELD_LOCATION, QUDA_DEBUG_VERBOSE, QUDA_HEAVY_QUARK_RESIDUAL, QUDA_NULL_FIELD_CREATE, QUDA_PRESERVE_SOURCE_NO, quda::QUDA_PROFILE_COMPUTE, quda::QUDA_PROFILE_EPILOGUE, quda::QUDA_PROFILE_FREE, quda::QUDA_PROFILE_INIT, quda::QUDA_PROFILE_PREAMBLE, QUDA_SUMMARIZE, QUDA_USE_INIT_GUESS_NO, QUDA_USE_INIT_GUESS_YES, QUDA_VERBOSE, r_sloppy, quda::SolverParam::residual_type, rp, quda::SolverParam::secs, quda::ColorSpinorParam::setPrecision(), quda::SolverParam::sloppy_converge, quda::sqrt(), quda::Solver::stopping(), tmp, tmpp, quda::SolverParam::tol, quda::SolverParam::tol_hq, quda::SolverParam::true_res, quda::SolverParam::true_res_hq, quda::updateSolution(), quda::SolverParam::use_init_guess, quda::SolverParam::use_sloppy_partial_accumulator, quda::SolverParam::verbosity_precondition, warningQuda, quda::blas::xmyNorm(), quda::blas::xpy(), y_sloppy, yp, and quda::blas::zero().

Here is the call graph for this function:

Member Data Documentation

◆ alpha

Complex* quda::GCR::alpha
private

Definition at line 831 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ Ap

std::vector<ColorSpinorField*> quda::GCR::Ap
private

Definition at line 847 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ beta

Complex** quda::GCR::beta
private

Definition at line 832 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ gamma

double* quda::GCR::gamma
private

Definition at line 833 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ init

bool quda::GCR::init
private

Solver uses lazy allocation: this flag to determine whether we have allocated.

Definition at line 838 of file invert_quda.h.

Referenced by operator()(), and ~GCR().

◆ K

Solver* quda::GCR::K
private

Definition at line 823 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ Kparam

SolverParam quda::GCR::Kparam
private

Definition at line 824 of file invert_quda.h.

Referenced by GCR().

◆ mat

const DiracMatrix& quda::GCR::mat
private

Definition at line 819 of file invert_quda.h.

Referenced by operator()().

◆ matPrecon

const DiracMatrix& quda::GCR::matPrecon
private

Definition at line 821 of file invert_quda.h.

Referenced by operator()().

◆ matSloppy

const DiracMatrix& quda::GCR::matSloppy
private

Definition at line 820 of file invert_quda.h.

Referenced by operator()().

◆ nKrylov

int quda::GCR::nKrylov
private

The size of the Krylov space that GCR uses

Definition at line 829 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ p

std::vector<ColorSpinorField*> quda::GCR::p
private

sloppy residual vector

Definition at line 846 of file invert_quda.h.

Referenced by GCR(), operator()(), and ~GCR().

◆ r_sloppy

ColorSpinorField* quda::GCR::r_sloppy
private

sloppy solution vector

Definition at line 844 of file invert_quda.h.

Referenced by operator()(), and ~GCR().

◆ rp

ColorSpinorField* quda::GCR::rp
private

Definition at line 840 of file invert_quda.h.

Referenced by operator()(), and ~GCR().

◆ tmpp

ColorSpinorField* quda::GCR::tmpp
private

high precision accumulator

Definition at line 842 of file invert_quda.h.

Referenced by operator()(), and ~GCR().

◆ y_sloppy

ColorSpinorField* quda::GCR::y_sloppy
private

temporary for mat-vec

Definition at line 843 of file invert_quda.h.

Referenced by operator()(), and ~GCR().

◆ yp

ColorSpinorField* quda::GCR::yp
private

residual vector

Definition at line 841 of file invert_quda.h.

Referenced by operator()(), and ~GCR().


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