1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

Merge pull request #211 from fionnoh/develop

Enum for gaugefix and bug fix for wall source
This commit is contained in:
Peter Boyle 2019-05-18 18:57:52 +01:00 committed by GitHub
commit 77ca45ff49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -42,6 +42,8 @@ BEGIN_HADRONS_NAMESPACE
******************************************************************************/ ******************************************************************************/
BEGIN_MODULE_NAMESPACE(MGauge) BEGIN_MODULE_NAMESPACE(MGauge)
GRID_SERIALIZABLE_ENUM(Fix, undef, coulomb, Nd - 1, landau, -1);
class GaugeFixPar: Serializable class GaugeFixPar: Serializable
{ {
public: public:
@ -51,6 +53,7 @@ public:
int, maxiter, int, maxiter,
Real, Omega_tol, Real, Omega_tol,
Real, Phi_tol, Real, Phi_tol,
Fix, gaugeFix,
bool, Fourier); bool, Fourier);
}; };
@ -115,8 +118,8 @@ void TGaugeFix<GImpl>::execute(void)
//Loads the gauge and fixes it //Loads the gauge and fixes it
{ {
std::cout << "executing" << std::endl; std::cout << "executing" << std::endl;
LOG(Message) << "Fixing the Gauge" << std::endl; LOG(Message) << "Fixing the Gauge " << par().gauge << " using "
LOG(Message) << par().gauge << std::endl; << par().gaugeFix << " guage fixing. " << Nd - 1 << std::endl;
auto &U = envGet(GaugeField, par().gauge); auto &U = envGet(GaugeField, par().gauge);
auto &Umu = envGet(GaugeField, getName()); auto &Umu = envGet(GaugeField, getName());
auto &xform = envGet(GaugeMat, getName()+"_xform"); auto &xform = envGet(GaugeMat, getName()+"_xform");
@ -126,9 +129,10 @@ void TGaugeFix<GImpl>::execute(void)
int maxiter = par().maxiter; int maxiter = par().maxiter;
Real Omega_tol = par().Omega_tol; Real Omega_tol = par().Omega_tol;
Real Phi_tol = par().Phi_tol; Real Phi_tol = par().Phi_tol;
int gaugeFix = par().gaugeFix;
bool Fourier = par().Fourier; bool Fourier = par().Fourier;
Umu = U; Umu = U;
FourierAcceleratedGaugeFixer<PeriodicGimplR>::SteepestDescentGaugeFix(Umu,xform,alpha,maxiter,Omega_tol,Phi_tol,Fourier); FourierAcceleratedGaugeFixer<PeriodicGimplR>::SteepestDescentGaugeFix(Umu,xform,alpha,maxiter,Omega_tol,Phi_tol,Fourier,gaugeFix);
LOG(Message) << "Gauge Fixed" << std::endl; LOG(Message) << "Gauge Fixed" << std::endl;
} }

View File

@ -119,6 +119,9 @@ template <typename FImpl>
void TWall<FImpl>::setup(void) void TWall<FImpl>::setup(void)
{ {
envCreateLat(PropagatorField, getName()); envCreateLat(PropagatorField, getName());
envCache(Lattice<iScalar<vInteger>>, tName_, 1, envGetGrid(LatticeComplex));
envCacheLat(LatticeComplex, momphName_);
envTmpLat(LatticeComplex, "coor");
} }
// execution /////////////////////////////////////////////////////////////////// // execution ///////////////////////////////////////////////////////////////////