1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-11 03:46:55 +01:00

Hadrons: support for twisted boundary conditions

This commit is contained in:
2018-11-12 17:16:18 +00:00
parent f3f24b3017
commit 8e0d2f3402
10 changed files with 39 additions and 18 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);