QUDA  v0.7.0
A library for QCD on GPUs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
quda::Solver Class Referenceabstract

#include <invert_quda.h>

+ Inheritance diagram for quda::Solver:

Public Member Functions

 Solver (SolverParam &param, TimeProfile &profile)
 
virtual ~Solver ()
 
virtual void operator() (cudaColorSpinorField &out, cudaColorSpinorField &in)=0
 
bool convergence (const double &r2, const double &hq2, const double &r2_tol, const double &hq_tol)
 
bool convergenceHQ (const double &r2, const double &hq2, const double &r2_tol, const double &hq_tol)
 
bool convergenceL2 (const double &r2, const double &hq2, const double &r2_tol, const double &hq_tol)
 
void PrintStats (const char *, int k, const double &r2, const double &b2, const double &hq2)
 
void PrintSummary (const char *name, int k, const double &r2, const double &b2)
 

Static Public Member Functions

static Solvercreate (SolverParam &param, DiracMatrix &mat, DiracMatrix &matSloppy, DiracMatrix &matPrecon, TimeProfile &profile)
 
static double stopping (const double &tol, const double &b2, QudaResidualType residual_type)
 

Protected Attributes

SolverParamparam
 
TimeProfileprofile
 

Detailed Description

Definition at line 220 of file invert_quda.h.

Constructor & Destructor Documentation

quda::Solver::Solver ( SolverParam param,
TimeProfile profile 
)
inline

Definition at line 227 of file invert_quda.h.

virtual quda::Solver::~Solver ( )
inlinevirtual

Definition at line 228 of file invert_quda.h.

Member Function Documentation

bool quda::Solver::convergence ( const double &  r2,
const double &  hq2,
const double &  r2_tol,
const double &  hq_tol 
)

Test for solver convergence

Parameters
r2L2 norm squared of the residual
hq2Heavy quark residual
r2_tolSolver L2 tolerance
hq_tolSolver heavy-quark tolerance

Definition at line 82 of file solver.cpp.

bool quda::Solver::convergenceHQ ( const double &  r2,
const double &  hq2,
const double &  r2_tol,
const double &  hq_tol 
)

Test for HQ solver convergence – ignore L2 residual

Parameters
r2L2 norm squared of the residual
hq2Heavy quark residual
r2_tolSolver L2 tolerance
hq_tolSolver heavy-quark tolerance

Definition at line 99 of file solver.cpp.

bool quda::Solver::convergenceL2 ( const double &  r2,
const double &  hq2,
const double &  r2_tol,
const double &  hq_tol 
)

Test for L2 solver convergence – ignore HQ residual

Parameters
r2L2 norm squared of the residual
hq2Heavy quark residual
r2_tolSolver L2 tolerance
hq_tolSolver heavy-quark tolerance

Definition at line 110 of file solver.cpp.

Solver * quda::Solver::create ( SolverParam param,
DiracMatrix mat,
DiracMatrix matSloppy,
DiracMatrix matPrecon,
TimeProfile profile 
)
static

Definition at line 12 of file solver.cpp.

virtual void quda::Solver::operator() ( cudaColorSpinorField out,
cudaColorSpinorField in 
)
pure virtual
void quda::Solver::PrintStats ( const char *  name,
int  k,
const double &  r2,
const double &  b2,
const double &  hq2 
)

Prints out the running statistics of the solver (requires a verbosity of QUDA_VERBOSE)

Definition at line 122 of file solver.cpp.

void quda::Solver::PrintSummary ( const char *  name,
int  k,
const double &  r2,
const double &  b2 
)

Prints out the summary of the solver convergence (requires a versbosity of QUDA_SUMMARIZE). Assumes SolverParam.true_res and SolverParam.true_res_hq has been set

Definition at line 137 of file solver.cpp.

double quda::Solver::stopping ( const double &  tol,
const double &  b2,
QudaResidualType  residual_type 
)
static

Set the solver stopping condition

Parameters
b2L2 norm squared of the source vector

Definition at line 65 of file solver.cpp.

Member Data Documentation

SolverParam& quda::Solver::param
protected

Definition at line 223 of file invert_quda.h.

TimeProfile& quda::Solver::profile
protected

Definition at line 224 of file invert_quda.h.


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