1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-24 12:45:56 +01:00

Verbose changes

This commit is contained in:
Quadro 2021-06-09 13:30:42 -04:00
parent 6cf3edef00
commit 9394450c1a

View File

@ -56,7 +56,7 @@ class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<
Integer TotalOuterIterations; //Number of restarts Integer TotalOuterIterations; //Number of restarts
Integer TotalFinalStepIterations; //Number of CG iterations in final patch-up step Integer TotalFinalStepIterations; //Number of CG iterations in final patch-up step
MixedPrecisionConjugateGradientOperatorFunction(RealD tol, MixedPrecisionConjugateGradientOperatorFunction(RealD tol, RealD tolInner,
Integer maxinnerit, Integer maxinnerit,
Integer maxouterit, Integer maxouterit,
GridBase *_SinglePrecGrid, GridBase *_SinglePrecGrid,
@ -69,12 +69,12 @@ class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<
FermOpF(_FermOpF), FermOpF(_FermOpF),
FermOpD(_FermOpD), FermOpD(_FermOpD),
Tolerance(tol), Tolerance(tol),
InnerTolerance(tol), InnerTolerance(tolInner),
MaxInnerIterations(maxinnerit), MaxInnerIterations(maxinnerit),
MaxOuterIterations(maxouterit), MaxOuterIterations(maxouterit),
SinglePrecGrid(_SinglePrecGrid), SinglePrecGrid(_SinglePrecGrid),
OuterLoopNormMult(100.) OuterLoopNormMult(100.)
{ }; { assert(tolInner<0.01); };
void operator()(LinearOperatorBase<FieldD> &LinOpU, const FieldD &src, FieldD &psi) void operator()(LinearOperatorBase<FieldD> &LinOpU, const FieldD &src, FieldD &psi)
{ {
@ -101,8 +101,9 @@ class MixedPrecisionConjugateGradientOperatorFunction : public OperatorFunction<
// Make a mixed precision conjugate gradient // Make a mixed precision conjugate gradient
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
// Could assume red black solver here and remove the SinglePrecGrid parameter??? // Could assume red black solver here and remove the SinglePrecGrid parameter???
MixedPrecisionConjugateGradient<FieldD,FieldF> MPCG(Tolerance,MaxInnerIterations,MaxOuterIterations,SinglePrecGrid,LinOpF,LinOpD); MixedPrecisionConjugateGradient<FieldD,FieldF> MPCG(Tolerance, InnerTolerance,MaxInnerIterations,MaxOuterIterations,SinglePrecGrid,LinOpF,LinOpD);
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient src "<<norm2(src)<< " U "<<norm2(Umu_d) <<std::endl;
std::cout << GridLogMessage << "Calling mixed precision Conjugate Gradient src "<<norm2(src) <<std::endl;
psi=Zero(); psi=Zero();
MPCG(src,psi); MPCG(src,psi);
} }