mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-26 05:35:55 +01:00
Constructor control of inner tolerance
This commit is contained in:
parent
11c55a0476
commit
f2fe2573a7
@ -53,15 +53,24 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
//Option to speed up *inner single precision* solves using a LinearFunction that produces a guess
|
//Option to speed up *inner single precision* solves using a LinearFunction that produces a guess
|
||||||
LinearFunction<FieldF> *guesser;
|
LinearFunction<FieldF> *guesser;
|
||||||
|
|
||||||
MixedPrecisionConjugateGradient(RealD tol,
|
MixedPrecisionConjugateGradient(RealD Tol,
|
||||||
|
Integer maxinnerit,
|
||||||
|
Integer maxouterit,
|
||||||
|
GridBase* _sp_grid,
|
||||||
|
LinearOperatorBase<FieldF> &_Linop_f,
|
||||||
|
LinearOperatorBase<FieldD> &_Linop_d) :
|
||||||
|
MixedPrecisionConjugateGradient(Tol, Tol, maxinnerit, maxouterit, _sp_grid, _Linop_f, _Linop_d) {};
|
||||||
|
|
||||||
|
MixedPrecisionConjugateGradient(RealD Tol,
|
||||||
|
RealD InnerTol,
|
||||||
Integer maxinnerit,
|
Integer maxinnerit,
|
||||||
Integer maxouterit,
|
Integer maxouterit,
|
||||||
GridBase* _sp_grid,
|
GridBase* _sp_grid,
|
||||||
LinearOperatorBase<FieldF> &_Linop_f,
|
LinearOperatorBase<FieldF> &_Linop_f,
|
||||||
LinearOperatorBase<FieldD> &_Linop_d) :
|
LinearOperatorBase<FieldD> &_Linop_d) :
|
||||||
Linop_f(_Linop_f), Linop_d(_Linop_d),
|
Linop_f(_Linop_f), Linop_d(_Linop_d),
|
||||||
Tolerance(tol), InnerTolerance(tol), MaxInnerIterations(maxinnerit), MaxOuterIterations(maxouterit), SinglePrecGrid(_sp_grid),
|
Tolerance(Tol), InnerTolerance(InnerTol), MaxInnerIterations(maxinnerit), MaxOuterIterations(maxouterit), SinglePrecGrid(_sp_grid),
|
||||||
OuterLoopNormMult(100.), guesser(NULL){ };
|
OuterLoopNormMult(100.), guesser(NULL){ assert(InnerTol < 1.0e-1);};
|
||||||
|
|
||||||
void useGuesser(LinearFunction<FieldF> &g){
|
void useGuesser(LinearFunction<FieldF> &g){
|
||||||
guesser = &g;
|
guesser = &g;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user