QUDA  v1.1.0
A library for QCD on GPUs
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
quda::MinResExt Class Reference

This computes the optimum guess for the system Ax=b in the L2 residual norm. For use in the HMD force calculations using a minimal residual chronological method. This computes the guess solution as a linear combination of a given number of previous solutions. Following Brower et al, only the orthogonalised vector basis is stored to conserve memory. More...

#include <invert_quda.h>

Public Member Functions

 MinResExt (const DiracMatrix &mat, bool orthogonal, bool apply_mat, bool hermitian, TimeProfile &profile)
 
virtual ~MinResExt ()
 
void operator() (ColorSpinorField &x, ColorSpinorField &b, std::vector< std::pair< ColorSpinorField *, ColorSpinorField * > > basis)
 
void operator() (ColorSpinorField &x, ColorSpinorField &b, std::vector< ColorSpinorField * > p, std::vector< ColorSpinorField * > q)
 

Protected Member Functions

void solve (Complex *psi_, std::vector< ColorSpinorField * > &p, std::vector< ColorSpinorField * > &q, ColorSpinorField &b, bool hermitian)
 Solve the equation A p_k psi_k = q_k psi_k = b by minimizing the residual and using Eigen's SVD algorithm for numerical stability. More...
 

Protected Attributes

const DiracMatrixmat
 
bool orthogonal
 
bool apply_mat
 Whether to construct an orthogonal basis or not. More...
 
bool hermitian
 Whether to compute q = Ap or assume it is provided. More...
 
TimeProfileprofile
 whether A is hermitian ot not More...
 

Detailed Description

This computes the optimum guess for the system Ax=b in the L2 residual norm. For use in the HMD force calculations using a minimal residual chronological method. This computes the guess solution as a linear combination of a given number of previous solutions. Following Brower et al, only the orthogonalised vector basis is stored to conserve memory.

If Eigen support is enabled then Eigen's SVD algorithm is used for solving the linear system, else Gaussian elimination with partial pivots is used.

Definition at line 1303 of file invert_quda.h.

Constructor & Destructor Documentation

◆ MinResExt()

quda::MinResExt::MinResExt ( const DiracMatrix mat,
bool  orthogonal,
bool  apply_mat,
bool  hermitian,
TimeProfile profile 
)
Parameters
matThe operator for the linear system we wish to solve
orthogonalWhether to construct an orthogonal basis prior to constructing the linear system
apply_matWhether to apply the operator in place or assume q already contains this @profile Timing profile to use

Definition at line 7 of file inv_mre.cpp.

◆ ~MinResExt()

quda::MinResExt::~MinResExt ( )
virtual

Definition at line 16 of file inv_mre.cpp.

Member Function Documentation

◆ operator()() [1/2]

void quda::MinResExt::operator() ( ColorSpinorField x,
ColorSpinorField b,
std::vector< ColorSpinorField * >  p,
std::vector< ColorSpinorField * >  q 
)
Parameters
xThe optimum for the solution vector.
bThe source vector in the equation to be solved. This is not preserved.
pThe basis vectors in which we are building the guess
qThe basis vectors multiplied by A

Definition at line 85 of file inv_mre.cpp.

◆ operator()() [2/2]

void quda::MinResExt::operator() ( ColorSpinorField x,
ColorSpinorField b,
std::vector< std::pair< ColorSpinorField *, ColorSpinorField * > >  basis 
)
Parameters
xThe optimum for the solution vector.
bThe source vector in the equation to be solved. This is not preserved and is overwritten by the new residual.
basisVector of pairs storing the basis (p,Ap)

Definition at line 169 of file inv_mre.cpp.

◆ solve()

void quda::MinResExt::solve ( Complex psi_,
std::vector< ColorSpinorField * > &  p,
std::vector< ColorSpinorField * > &  q,
ColorSpinorField b,
bool  hermitian 
)
protected

Solve the equation A p_k psi_k = q_k psi_k = b by minimizing the residual and using Eigen's SVD algorithm for numerical stability.

Parameters
[out]psiArray of coefficients
[in]pSearch direction vectors
[in]qSearch direction vectors with the operator applied
[in]hermitianWhether the linear system is Hermitian or not

Definition at line 22 of file inv_mre.cpp.

Member Data Documentation

◆ apply_mat

bool quda::MinResExt::apply_mat
protected

Whether to construct an orthogonal basis or not.

Definition at line 1308 of file invert_quda.h.

◆ hermitian

bool quda::MinResExt::hermitian
protected

Whether to compute q = Ap or assume it is provided.

Definition at line 1309 of file invert_quda.h.

◆ mat

const DiracMatrix& quda::MinResExt::mat
protected

Definition at line 1306 of file invert_quda.h.

◆ orthogonal

bool quda::MinResExt::orthogonal
protected

Definition at line 1307 of file invert_quda.h.

◆ profile

TimeProfile& quda::MinResExt::profile
protected

whether A is hermitian ot not

Definition at line 1310 of file invert_quda.h.


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