mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 14:15:55 +01:00
Merge branch 'develop' into feature/hadrons
This commit is contained in:
commit
3e9ee053a1
@ -401,7 +401,10 @@ void *SharedMemory::ShmBufferTranslate(int rank,void * local_p)
|
|||||||
}
|
}
|
||||||
SharedMemory::~SharedMemory()
|
SharedMemory::~SharedMemory()
|
||||||
{
|
{
|
||||||
|
int MPI_is_finalised; MPI_Finalized(&MPI_is_finalised);
|
||||||
|
if ( !MPI_is_finalised ) {
|
||||||
MPI_Comm_free(&ShmComm);
|
MPI_Comm_free(&ShmComm);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,18 +71,14 @@ class WilsonGaugeAction : public Action<typename Gimpl::GaugeField> {
|
|||||||
|
|
||||||
RealD factor = 0.5 * beta / RealD(Nc);
|
RealD factor = 0.5 * beta / RealD(Nc);
|
||||||
|
|
||||||
//GaugeLinkField Umu(U._grid);
|
GaugeLinkField Umu(U._grid);
|
||||||
GaugeLinkField dSdU_mu(U._grid);
|
GaugeLinkField dSdU_mu(U._grid);
|
||||||
for (int mu = 0; mu < Nd; mu++) {
|
for (int mu = 0; mu < Nd; mu++) {
|
||||||
//Umu = PeekIndex<LorentzIndex>(U, mu);
|
Umu = PeekIndex<LorentzIndex>(U, mu);
|
||||||
|
|
||||||
// Staple in direction mu
|
// Staple in direction mu
|
||||||
//WilsonLoops<Gimpl>::Staple(dSdU_mu, U, mu);
|
WilsonLoops<Gimpl>::Staple(dSdU_mu, U, mu);
|
||||||
//dSdU_mu = Ta(Umu * dSdU_mu) * factor;
|
dSdU_mu = Ta(Umu * dSdU_mu) * factor;
|
||||||
|
|
||||||
|
|
||||||
WilsonLoops<Gimpl>::StapleMult(dSdU_mu, U, mu);
|
|
||||||
dSdU_mu = Ta(dSdU_mu) * factor;
|
|
||||||
|
|
||||||
PokeIndex<LorentzIndex>(dSdU, dSdU_mu, mu);
|
PokeIndex<LorentzIndex>(dSdU, dSdU_mu, mu);
|
||||||
}
|
}
|
||||||
|
@ -212,6 +212,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// For the force term
|
// For the force term
|
||||||
|
/*
|
||||||
static void StapleMult(GaugeMat &staple, const GaugeLorentz &Umu, int mu) {
|
static void StapleMult(GaugeMat &staple, const GaugeLorentz &Umu, int mu) {
|
||||||
GridBase *grid = Umu._grid;
|
GridBase *grid = Umu._grid;
|
||||||
std::vector<GaugeMat> U(Nd, grid);
|
std::vector<GaugeMat> U(Nd, grid);
|
||||||
@ -225,7 +226,7 @@ static void StapleMult(GaugeMat &staple, const GaugeLorentz &Umu, int mu) {
|
|||||||
|
|
||||||
for (int nu = 0; nu < Nd; nu++) {
|
for (int nu = 0; nu < Nd; nu++) {
|
||||||
if (nu != mu) {
|
if (nu != mu) {
|
||||||
// this is ~10% faster than the Staple
|
// this is ~10% faster than the Staple -- PAB: so what it gives the WRONG answers for other BC's!
|
||||||
tmp1 = Cshift(U[nu], mu, 1);
|
tmp1 = Cshift(U[nu], mu, 1);
|
||||||
tmp2 = Cshift(U[mu], nu, 1);
|
tmp2 = Cshift(U[mu], nu, 1);
|
||||||
staple += tmp1* adj(U[nu]*tmp2);
|
staple += tmp1* adj(U[nu]*tmp2);
|
||||||
@ -235,7 +236,7 @@ static void StapleMult(GaugeMat &staple, const GaugeLorentz &Umu, int mu) {
|
|||||||
}
|
}
|
||||||
staple = U[mu]*staple;
|
staple = U[mu]*staple;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// the sum over all staples on each site
|
// the sum over all staples on each site
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
@ -59,8 +59,8 @@ int main (int argc, char ** argv)
|
|||||||
double beta = 1.0;
|
double beta = 1.0;
|
||||||
double c1 = 0.331;
|
double c1 = 0.331;
|
||||||
|
|
||||||
//GparityPlaqPlusRectangleActionR Action(beta,c1);
|
ConjugatePlaqPlusRectangleActionR Action(beta,c1);
|
||||||
ConjugateWilsonGaugeActionR Action(beta);
|
// ConjugateWilsonGaugeActionR Action(beta);
|
||||||
//WilsonGaugeActionR Action(beta);
|
//WilsonGaugeActionR Action(beta);
|
||||||
|
|
||||||
ComplexD S = Action.S(U);
|
ComplexD S = Action.S(U);
|
||||||
|
@ -91,7 +91,7 @@ int main (int argc, char ** argv)
|
|||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// Modify the gauge field a little
|
// Modify the gauge field a little
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
RealD dt = 0.0001;
|
RealD dt = 0.01;
|
||||||
|
|
||||||
LatticeColourMatrix mommu(UGrid);
|
LatticeColourMatrix mommu(UGrid);
|
||||||
LatticeColourMatrix forcemu(UGrid);
|
LatticeColourMatrix forcemu(UGrid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user