diff --git a/Hadrons/Modules/MAction/DWF.hpp b/Hadrons/Modules/MAction/DWF.hpp index 257782a1..a7104b42 100644 --- a/Hadrons/Modules/MAction/DWF.hpp +++ b/Hadrons/Modules/MAction/DWF.hpp @@ -49,7 +49,8 @@ public: unsigned int, Ls, double , mass, double , M5, - std::string , boundary); + std::string , boundary, + std::string , twist); }; template @@ -119,8 +120,9 @@ void TDWF::setup(void) auto &grb4 = *envGetRbGrid(FermionField); auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); - std::vector boundary = strToVec(par().boundary); - typename DomainWallFermion::ImplParams implParams(boundary); + typename DomainWallFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, DomainWallFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, implParams); } diff --git a/Hadrons/Modules/MAction/MobiusDWF.hpp b/Hadrons/Modules/MAction/MobiusDWF.hpp index 01223267..0ba9c4c3 100644 --- a/Hadrons/Modules/MAction/MobiusDWF.hpp +++ b/Hadrons/Modules/MAction/MobiusDWF.hpp @@ -49,7 +49,8 @@ public: double , M5, double , b, double , c, - std::string , boundary); + std::string , boundary, + std::string , twist); }; template @@ -119,8 +120,9 @@ void TMobiusDWF::setup(void) auto &grb4 = *envGetRbGrid(FermionField); auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); - std::vector boundary = strToVec(par().boundary); - typename MobiusFermion::ImplParams implParams(boundary); + typename MobiusFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, MobiusFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, par().b, par().c, implParams); diff --git a/Hadrons/Modules/MAction/ScaledDWF.hpp b/Hadrons/Modules/MAction/ScaledDWF.hpp index f7a09eef..3b8066e6 100644 --- a/Hadrons/Modules/MAction/ScaledDWF.hpp +++ b/Hadrons/Modules/MAction/ScaledDWF.hpp @@ -48,7 +48,8 @@ public: double , mass, double , M5, double , scale, - std::string , boundary); + std::string , boundary, + std::string , twist); }; template @@ -118,8 +119,9 @@ void TScaledDWF::setup(void) auto &grb4 = *envGetRbGrid(FermionField); auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); - std::vector boundary = strToVec(par().boundary); - typename MobiusFermion::ImplParams implParams(boundary); + typename ScaledShamirFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, ScaledShamirFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, par().scale, implParams); diff --git a/Hadrons/Modules/MAction/Wilson.hpp b/Hadrons/Modules/MAction/Wilson.hpp index 093449e6..b5e53837 100644 --- a/Hadrons/Modules/MAction/Wilson.hpp +++ b/Hadrons/Modules/MAction/Wilson.hpp @@ -47,7 +47,9 @@ public: GRID_SERIALIZABLE_CLASS_MEMBERS(WilsonPar, std::string, gauge, double , mass, - std::string, boundary); + std::string, boundary, + std::string, string, + std::string, twist); }; template @@ -113,8 +115,9 @@ void TWilson::setup(void) auto &U = envGet(GaugeField, par().gauge); auto &grid = *envGetGrid(FermionField); auto &gridRb = *envGetRbGrid(FermionField); - std::vector boundary = strToVec(par().boundary); - typename WilsonFermion::ImplParams implParams(boundary); + typename WilsonFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, WilsonFermion, getName(), 1, U, grid, gridRb, par().mass, implParams); } diff --git a/Hadrons/Modules/MAction/WilsonClover.hpp b/Hadrons/Modules/MAction/WilsonClover.hpp index 0b78bb55..ad301380 100644 --- a/Hadrons/Modules/MAction/WilsonClover.hpp +++ b/Hadrons/Modules/MAction/WilsonClover.hpp @@ -51,7 +51,8 @@ public: double , csw_r, double , csw_t, WilsonAnisotropyCoefficients ,clover_anisotropy, - std::string, boundary + std::string, boundary, + std::string, twist ); }; @@ -119,8 +120,9 @@ void TWilsonClover::setup(void) auto &U = envGet(GaugeField, par().gauge); auto &grid = *envGetGrid(FermionField); auto &gridRb = *envGetRbGrid(FermionField); - std::vector boundary = strToVec(par().boundary); - typename WilsonCloverFermion::ImplParams implParams(boundary); + typename WilsonCloverFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, WilsonCloverFermion, getName(), 1, U, grid, gridRb, par().mass, par().csw_r, par().csw_t, par().clover_anisotropy, implParams); diff --git a/Hadrons/Modules/MAction/ZMobiusDWF.hpp b/Hadrons/Modules/MAction/ZMobiusDWF.hpp index 40b04d7f..12ad82ea 100644 --- a/Hadrons/Modules/MAction/ZMobiusDWF.hpp +++ b/Hadrons/Modules/MAction/ZMobiusDWF.hpp @@ -50,7 +50,8 @@ public: double , b, double , c, std::vector>, omega, - std::string , boundary); + std::string , boundary, + std::string , twist); }; template @@ -127,8 +128,9 @@ void TZMobiusDWF::setup(void) auto &g5 = *envGetGrid(FermionField, par().Ls); auto &grb5 = *envGetRbGrid(FermionField, par().Ls); auto omega = par().omega; - std::vector boundary = strToVec(par().boundary); - typename ZMobiusFermion::ImplParams implParams(boundary); + typename ZMobiusFermion::ImplParams implParams; + implParams.boundary_phases = strToVec(par().boundary); + implParams.twist_n_2pi_L = strToVec(par().twist); envCreateDerived(FMat, ZMobiusFermion, getName(), par().Ls, U, g5, grb5, g4, grb4, par().mass, par().M5, omega, par().b, par().c, implParams); diff --git a/tests/hadrons/Test_QED.cc b/tests/hadrons/Test_QED.cc index fb6f8198..9053c6ed 100644 --- a/tests/hadrons/Test_QED.cc +++ b/tests/hadrons/Test_QED.cc @@ -72,6 +72,7 @@ int main(int argc, char *argv[]) // set fermion boundary conditions to be periodic space, antiperiodic time. std::string boundary = "1 1 1 -1"; + std::string twist = "0. 0. 0. 0."; //stochastic photon field MGauge::StochEm::Par photonPar; @@ -90,6 +91,7 @@ int main(int argc, char *argv[]) actionPar.M5 = 1.8; actionPar.mass = mass[i]; actionPar.boundary = boundary; + actionPar.twist = "0. 0. 0. 0."; application.createModule("DWF_" + flavour[i], actionPar); diff --git a/tests/hadrons/Test_hadrons.hpp b/tests/hadrons/Test_hadrons.hpp index 1ee72356..7f07bea5 100644 --- a/tests/hadrons/Test_hadrons.hpp +++ b/tests/hadrons/Test_hadrons.hpp @@ -126,6 +126,7 @@ inline void makeWilsonAction(Application &application, std::string actionName, actionPar.gauge = gaugeField; actionPar.mass = mass; actionPar.boundary = boundary; + actionPar.twist = "0. 0. 0. 0."; application.createModule(actionName, actionPar); } } @@ -154,6 +155,7 @@ inline void makeDWFAction(Application &application, std::string actionName, actionPar.M5 = M5; actionPar.mass = mass; actionPar.boundary = boundary; + actionPar.twist = "0. 0. 0. 0."; application.createModule(actionName, actionPar); } } diff --git a/tests/hadrons/Test_hadrons_meson_3pt.cc b/tests/hadrons/Test_hadrons_meson_3pt.cc index 5b7cda22..741e2a7c 100644 --- a/tests/hadrons/Test_hadrons_meson_3pt.cc +++ b/tests/hadrons/Test_hadrons_meson_3pt.cc @@ -66,6 +66,7 @@ int main(int argc, char *argv[]) // set fermion boundary conditions to be periodic space, antiperiodic time. std::string boundary = "1 1 1 -1"; + std::string twist = "0. 0. 0. 0."; // sink MSink::Point::Par sinkPar; @@ -80,6 +81,7 @@ int main(int argc, char *argv[]) actionPar.M5 = 1.8; actionPar.mass = mass[i]; actionPar.boundary = boundary; + actionPar.twist = twist; application.createModule("DWF_" + flavour[i], actionPar); // solvers diff --git a/tests/hadrons/Test_hadrons_spectrum.cc b/tests/hadrons/Test_hadrons_spectrum.cc index b57deb38..af1dccd7 100644 --- a/tests/hadrons/Test_hadrons_spectrum.cc +++ b/tests/hadrons/Test_hadrons_spectrum.cc @@ -72,6 +72,7 @@ int main(int argc, char *argv[]) // set fermion boundary conditions to be periodic space, antiperiodic time. std::string boundary = "1 1 1 -1"; + std::string twist = "0. 0. 0. 0."; for (unsigned int i = 0; i < flavour.size(); ++i) { @@ -82,6 +83,7 @@ int main(int argc, char *argv[]) actionPar.M5 = 1.8; actionPar.mass = mass[i]; actionPar.boundary = boundary; + actionPar.twist = twist; application.createModule("DWF_" + flavour[i], actionPar); // solvers