mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 13:40:46 +01:00
WilsonMG: Make running MG correctness checks optional via commandline
This commit is contained in:
parent
73a955be20
commit
f32714a2d1
@ -76,8 +76,7 @@ int main(int argc, char **argv) {
|
|||||||
LevelInfo levelInfo(FGrid, mgParams);
|
LevelInfo levelInfo(FGrid, mgParams);
|
||||||
|
|
||||||
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
|
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
|
||||||
const int nbasis = 40;
|
const int nbasis = 40;
|
||||||
RealD toleranceForMGChecks = 1e-13; // TODO: depends on the precision MG precondtioner is run in
|
|
||||||
|
|
||||||
WilsonFermionR Dw(Umu, *FGrid, *FrbGrid, mass);
|
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);
|
auto MGPreconDw = createMGInstance<vSpinColourVector, vTComplex, nbasis, WilsonFermionR>(mgParams, levelInfo, Dw, Dw);
|
||||||
|
|
||||||
MGPreconDw->setup();
|
MGPreconDw->setup();
|
||||||
MGPreconDw->runChecks(toleranceForMGChecks);
|
|
||||||
|
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;
|
std::vector<std::unique_ptr<OperatorFunction<LatticeFermion>>> solversDw;
|
||||||
|
|
||||||
|
@ -78,8 +78,7 @@ int main(int argc, char **argv) {
|
|||||||
LevelInfo levelInfo(FGrid, mgParams);
|
LevelInfo levelInfo(FGrid, mgParams);
|
||||||
|
|
||||||
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
|
// Note: We do chiral doubling, so actually only nbasis/2 full basis vectors are used
|
||||||
const int nbasis = 40;
|
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);
|
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);
|
auto MGPreconDwc = createMGInstance<vSpinColourVector, vTComplex, nbasis, WilsonCloverFermionR>(mgParams, levelInfo, Dwc, Dwc);
|
||||||
|
|
||||||
MGPreconDwc->setup();
|
MGPreconDwc->setup();
|
||||||
MGPreconDwc->runChecks(toleranceForMGChecks);
|
|
||||||
|
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;
|
std::vector<std::unique_ptr<OperatorFunction<LatticeFermion>>> solversDwc;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user