1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-18 15:57:05 +01:00

Make all tests compile

This commit is contained in:
Peter Boyle
2025-04-24 20:33:26 -04:00
parent be565ffab6
commit 677b4cc5b0
29 changed files with 93 additions and 37 deletions

View File

@ -35,6 +35,8 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
#include <Grid/algorithms/iterative/ImplicitlyRestartedLanczos.h>
#include <Grid/algorithms/iterative/LocalCoherenceLanczos.h>
#ifdef ENABLE_GPARITY
using namespace std;
using namespace Grid;
@ -378,7 +380,8 @@ void runTest(const Options &opt){
//Note: because we rely upon physical properties we must use a "real" gauge configuration
int main (int argc, char ** argv) {
int main (int argc, char ** argv)
{
Grid_init(&argc,&argv);
GridLogIRL.TimingMode(1);
@ -482,4 +485,8 @@ int main (int argc, char ** argv) {
Grid_finalize();
}
#else
int main(int argc, char **argv){};
#endif

View File

@ -29,11 +29,11 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
using namespace std;
using namespace Grid;
;
template<typename Action>
struct Setup{};
#ifdef ENABLE_GPARITY
template<>
struct Setup<GparityMobiusFermionF>{
static GparityMobiusFermionF* getAction(LatticeGaugeFieldF &Umu,
@ -47,16 +47,24 @@ struct Setup<GparityMobiusFermionF>{
return new GparityMobiusFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,mob_b,mob_b-1.,params);
}
};
#endif
template<>
struct Setup<DomainWallFermionF>{
static DomainWallFermionF* getAction(LatticeGaugeFieldF &Umu,
GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){
RealD mass=0.00054;
RealD M5=1.8;
return new DomainWallFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
}
};
template<>
struct Setup<DomainWallFermionD>{
static DomainWallFermionD* getAction(LatticeGaugeField &Umu,
GridCartesian* FGrid, GridRedBlackCartesian* FrbGrid, GridCartesian* UGrid, GridRedBlackCartesian* UrbGrid){
RealD mass=0.00054;
RealD M5=1.8;
return new DomainWallFermionF(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
return new DomainWallFermionD(Umu,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5);
}
};
@ -168,7 +176,9 @@ int main (int argc, char ** argv)
}
if(action == "GparityMobius"){
#ifdef ENABLE_GPARITY
run<GparityMobiusFermionF>();
#endif
}else if(action == "DWF"){
run<DomainWallFermionF>();
}else if(action == "Mobius"){

View File

@ -555,6 +555,7 @@ int main (int argc, char ** argv) {
double c = (args.mobius_scale - bmc)/2.; // c = 1/2 [ (b+c) - (b-c) ]
if(is_gparity){
#ifdef ENABLE_GPARITY
GparityWilsonImplD::ImplParams Params = setupGparityParams(args.GparityDirs);
readConfiguration<ConjugateGimplD>(Umu, config, args.is_cps_cfg); //Read the gauge field
@ -564,7 +565,10 @@ int main (int argc, char ** argv) {
}else if(action_s == "Mobius"){
GparityMobiusFermionD action(Umu, *FGrid, *FrbGrid, *UGrid, *UrbGrid, args.mass, args.M5, b, c, Params);
run(action, config, args);
}
}
#else
assert(0);
#endif
}else{
WilsonImplD::ImplParams Params = setupParams();
readConfiguration<PeriodicGimplD>(Umu, config, args.is_cps_cfg); //Read the gauge field