QUDA
v1.1.0
A library for QCD on GPUs
|
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 DiracMatrix & | mat |
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... | |
TimeProfile & | profile |
whether A is hermitian ot not More... | |
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.
quda::MinResExt::MinResExt | ( | const DiracMatrix & | mat, |
bool | orthogonal, | ||
bool | apply_mat, | ||
bool | hermitian, | ||
TimeProfile & | profile | ||
) |
mat | The operator for the linear system we wish to solve |
orthogonal | Whether to construct an orthogonal basis prior to constructing the linear system |
apply_mat | Whether 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.
|
virtual |
Definition at line 16 of file inv_mre.cpp.
void quda::MinResExt::operator() | ( | ColorSpinorField & | x, |
ColorSpinorField & | b, | ||
std::vector< ColorSpinorField * > | p, | ||
std::vector< ColorSpinorField * > | q | ||
) |
x | The optimum for the solution vector. |
b | The source vector in the equation to be solved. This is not preserved. |
p | The basis vectors in which we are building the guess |
q | The basis vectors multiplied by A |
Definition at line 85 of file inv_mre.cpp.
void quda::MinResExt::operator() | ( | ColorSpinorField & | x, |
ColorSpinorField & | b, | ||
std::vector< std::pair< ColorSpinorField *, ColorSpinorField * > > | basis | ||
) |
x | The optimum for the solution vector. |
b | The source vector in the equation to be solved. This is not preserved and is overwritten by the new residual. |
basis | Vector of pairs storing the basis (p,Ap) |
Definition at line 169 of file inv_mre.cpp.
|
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.
[out] | psi | Array of coefficients |
[in] | p | Search direction vectors |
[in] | q | Search direction vectors with the operator applied |
[in] | hermitian | Whether the linear system is Hermitian or not |
Definition at line 22 of file inv_mre.cpp.
|
protected |
Whether to construct an orthogonal basis or not.
Definition at line 1308 of file invert_quda.h.
|
protected |
Whether to compute q = Ap or assume it is provided.
Definition at line 1309 of file invert_quda.h.
|
protected |
Definition at line 1306 of file invert_quda.h.
|
protected |
Definition at line 1307 of file invert_quda.h.
|
protected |
whether A is hermitian ot not
Definition at line 1310 of file invert_quda.h.