mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-10-31 20:14:32 +00:00 
			
		
		
		
	WilsonMG: Make running MG correctness checks optional via commandline
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
| @@ -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; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user