the conjugate gradient inverter More...
#include <fermiqcd_cg_inverter.h>
Static Public Member Functions | |
template<class fieldT , class fieldG > | |
static inversion_stats | inverter (fieldT &psi_out, fieldT &psi_in, fieldG &U, coefficients &coeff, mdp_real absolute_precision=mdp_precision, mdp_real relative_precision=0, int max_steps=2000, bool qdaggerq=false) |
the conjugate gradient inverter
It inverts mul_Q(psi_out,psi_in,U,coeff) ///not really
psi_out | the output field passed by reference | |
psi_in | the input field passed by reference | |
U | the gauge field to be passed to mul_Q | |
coeff | the gauge parameters to be passed to mul_Q | |
absolute_precision | the target absolute precision | |
relative_precision | the target relative precision | |
max_steps | the maximum number of steps |
Example:
/// gauge_field U(lattice,nc); /// fermi_field psi(lattice,nc); /// fermi_field chi(lattice,nc); /// coefficinets coeff; /// coeff["kappa"]=1.12; /// U.load("myfield"); /// psi.load("myfield_psi"); /// CG2::inverter(chi,psi,U,coeff); /// chi.save("myfield_chi"); ///
Note that mul_invQ(chi,psi,U,coeff) reads
static inversion_stats CG2::inverter | ( | fieldT & | psi_out, | |
fieldT & | psi_in, | |||
fieldG & | U, | |||
coefficients & | coeff, | |||
mdp_real | absolute_precision = mdp_precision , |
|||
mdp_real | relative_precision = 0 , |
|||
int | max_steps = 2000 , |
|||
bool | qdaggerq = false | |||
) | [inline, static] |