mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Adding few comments
This commit is contained in:
@ -60,9 +60,11 @@ class ConjugateGradient : public OperatorFunction<Field> {
|
|||||||
// Defaults true.
|
// Defaults true.
|
||||||
RealD Tolerance;
|
RealD Tolerance;
|
||||||
Integer MaxIterations;
|
Integer MaxIterations;
|
||||||
|
|
||||||
|
// Reproducibility controls
|
||||||
bool ReproTest;
|
bool ReproTest;
|
||||||
CG_state CGState;//to check reproducibility by repeating the CG
|
CG_state CGState; //to check reproducibility by repeating the CG
|
||||||
ReproducibilityState<typename Field::vector_object> ReprTest;
|
ReproducibilityState<typename Field::vector_object> ReprTest; // for the inner proucts
|
||||||
|
|
||||||
ConjugateGradient(RealD tol, Integer maxit, bool err_on_no_conv = true,
|
ConjugateGradient(RealD tol, Integer maxit, bool err_on_no_conv = true,
|
||||||
bool ReproducibilityTest = false)
|
bool ReproducibilityTest = false)
|
||||||
@ -95,7 +97,7 @@ class ConjugateGradient : public OperatorFunction<Field> {
|
|||||||
Linop.HermOpAndNorm(psi, mmp, d, b);
|
Linop.HermOpAndNorm(psi, mmp, d, b);
|
||||||
|
|
||||||
if(!ReprTest.do_check)
|
if(!ReprTest.do_check)
|
||||||
ReprTest.reset();
|
ReprTest.reset();
|
||||||
ReprTest.enable_reprocheck=ReproTest;
|
ReprTest.enable_reprocheck=ReproTest;
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,6 +63,9 @@ class HmcRunner : public NerscHmcRunner {
|
|||||||
Real mass = -0.77;
|
Real mass = -0.77;
|
||||||
FermionAction FermOp(U, *FGrid, *FrbGrid, mass);
|
FermionAction FermOp(U, *FGrid, *FrbGrid, mass);
|
||||||
|
|
||||||
|
// To enable the CG reproducibility tests use
|
||||||
|
// ConjugateGradient<FermionField> CG(1.0e-8, 10000, true, true);
|
||||||
|
// This is the plain version
|
||||||
ConjugateGradient<FermionField> CG(1.0e-8, 10000);
|
ConjugateGradient<FermionField> CG(1.0e-8, 10000);
|
||||||
|
|
||||||
TwoFlavourPseudoFermionAction<ImplPolicy> Nf2(FermOp, CG, CG);
|
TwoFlavourPseudoFermionAction<ImplPolicy> Nf2(FermOp, CG, CG);
|
||||||
|
Reference in New Issue
Block a user