mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Hadrons: support for twisted boundary conditions
This commit is contained in:
parent
f3f24b3017
commit
8e0d2f3402
@ -49,7 +49,8 @@ public:
|
||||
unsigned int, Ls,
|
||||
double , mass,
|
||||
double , M5,
|
||||
std::string , boundary);
|
||||
std::string , boundary,
|
||||
std::string , twist);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
@ -119,8 +120,9 @@ void TDWF<FImpl>::setup(void)
|
||||
auto &grb4 = *envGetRbGrid(FermionField);
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename DomainWallFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename DomainWallFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, DomainWallFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, implParams);
|
||||
}
|
||||
|
@ -49,7 +49,8 @@ public:
|
||||
double , M5,
|
||||
double , b,
|
||||
double , c,
|
||||
std::string , boundary);
|
||||
std::string , boundary,
|
||||
std::string , twist);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
@ -119,8 +120,9 @@ void TMobiusDWF<FImpl>::setup(void)
|
||||
auto &grb4 = *envGetRbGrid(FermionField);
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename MobiusFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename MobiusFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, MobiusFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, par().b, par().c,
|
||||
implParams);
|
||||
|
@ -48,7 +48,8 @@ public:
|
||||
double , mass,
|
||||
double , M5,
|
||||
double , scale,
|
||||
std::string , boundary);
|
||||
std::string , boundary,
|
||||
std::string , twist);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
@ -118,8 +119,9 @@ void TScaledDWF<FImpl>::setup(void)
|
||||
auto &grb4 = *envGetRbGrid(FermionField);
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename MobiusFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename ScaledShamirFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, ScaledShamirFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, par().scale,
|
||||
implParams);
|
||||
|
@ -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 <typename FImpl>
|
||||
@ -113,8 +115,9 @@ void TWilson<FImpl>::setup(void)
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &grid = *envGetGrid(FermionField);
|
||||
auto &gridRb = *envGetRbGrid(FermionField);
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename WilsonFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename WilsonFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, WilsonFermion<FImpl>, getName(), 1, U, grid, gridRb,
|
||||
par().mass, implParams);
|
||||
}
|
||||
|
@ -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<FImpl>::setup(void)
|
||||
auto &U = envGet(GaugeField, par().gauge);
|
||||
auto &grid = *envGetGrid(FermionField);
|
||||
auto &gridRb = *envGetRbGrid(FermionField);
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename WilsonCloverFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename WilsonCloverFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, WilsonCloverFermion<FImpl>, getName(), 1, U, grid,
|
||||
gridRb, par().mass, par().csw_r, par().csw_t,
|
||||
par().clover_anisotropy, implParams);
|
||||
|
@ -50,7 +50,8 @@ public:
|
||||
double , b,
|
||||
double , c,
|
||||
std::vector<std::complex<double>>, omega,
|
||||
std::string , boundary);
|
||||
std::string , boundary,
|
||||
std::string , twist);
|
||||
};
|
||||
|
||||
template <typename FImpl>
|
||||
@ -127,8 +128,9 @@ void TZMobiusDWF<FImpl>::setup(void)
|
||||
auto &g5 = *envGetGrid(FermionField, par().Ls);
|
||||
auto &grb5 = *envGetRbGrid(FermionField, par().Ls);
|
||||
auto omega = par().omega;
|
||||
std::vector<Complex> boundary = strToVec<Complex>(par().boundary);
|
||||
typename ZMobiusFermion<FImpl>::ImplParams implParams(boundary);
|
||||
typename ZMobiusFermion<FImpl>::ImplParams implParams;
|
||||
implParams.boundary_phases = strToVec<Complex>(par().boundary);
|
||||
implParams.twist_n_2pi_L = strToVec<Real>(par().twist);
|
||||
envCreateDerived(FMat, ZMobiusFermion<FImpl>, getName(), par().Ls, U, g5,
|
||||
grb5, g4, grb4, par().mass, par().M5, omega,
|
||||
par().b, par().c, implParams);
|
||||
|
@ -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<MAction::DWF>("DWF_" + flavour[i], actionPar);
|
||||
|
||||
|
||||
|
@ -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<MAction::Wilson>(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<MAction::DWF>(actionName, actionPar);
|
||||
}
|
||||
}
|
||||
|
@ -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<MAction::DWF>("DWF_" + flavour[i], actionPar);
|
||||
|
||||
// solvers
|
||||
|
@ -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<MAction::DWF>("DWF_" + flavour[i], actionPar);
|
||||
|
||||
// solvers
|
||||
|
Loading…
Reference in New Issue
Block a user