1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-10 14:10:46 +01:00

WilsonMG: Make running MG correctness checks optional via commandline

This commit is contained in:
Daniel Richtmann 2018-06-11 16:27:52 +02:00
parent 73a955be20
commit f32714a2d1
No known key found for this signature in database
GPG Key ID: B33C490AF0772057
2 changed files with 12 additions and 6 deletions

View File

@ -77,7 +77,6 @@ int main(int argc, char **argv) {
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
const int nbasis = 40;
RealD toleranceForMGChecks = 1e-13; // TODO: depends on the precision MG precondtioner is run in
WilsonFermionR Dw(Umu, *FGrid, *FrbGrid, mass);
@ -93,7 +92,11 @@ int main(int argc, char **argv) {
auto MGPreconDw = createMGInstance<vSpinColourVector, vTComplex, nbasis, WilsonFermionR>(mgParams, levelInfo, Dw, Dw);
MGPreconDw->setup();
if(GridCmdOptionExists(argv, argv + argc, "--runchecks")) {
RealD toleranceForMGChecks = (getPrecision<LatticeFermion>::value == 1) ? 1e-6 : 1e-13;
MGPreconDw->runChecks(toleranceForMGChecks);
}
std::vector<std::unique_ptr<OperatorFunction<LatticeFermion>>> solversDw;

View File

@ -79,7 +79,6 @@ int main(int argc, char **argv) {
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
const int nbasis = 40;
RealD toleranceForMGChecks = 1e-13; // TODO: depends on the precision MG precondtioner is run in
WilsonCloverFermionR Dwc(Umu, *FGrid, *FrbGrid, mass, csw_r, csw_t);
@ -95,7 +94,11 @@ int main(int argc, char **argv) {
auto MGPreconDwc = createMGInstance<vSpinColourVector, vTComplex, nbasis, WilsonCloverFermionR>(mgParams, levelInfo, Dwc, Dwc);
MGPreconDwc->setup();
if(GridCmdOptionExists(argv, argv + argc, "--runchecks")) {
RealD toleranceForMGChecks = (getPrecision<LatticeFermion>::value == 1) ? 1e-6 : 1e-13;
MGPreconDwc->runChecks(toleranceForMGChecks);
}
std::vector<std::unique_ptr<OperatorFunction<LatticeFermion>>> solversDwc;