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

Few more tests

This commit is contained in:
Guido Cossu 2017-03-10 22:33:48 +09:00
parent ec035983fd
commit d7767a2a62
3 changed files with 18 additions and 16 deletions

View File

@ -125,10 +125,10 @@ class Integrator {
Mom -= MomDer * ep; Mom -= MomDer * ep;
// Auxiliary fields // Auxiliary fields
//P.update_auxiliary_momenta(ep*0.5); P.update_auxiliary_momenta(ep*0.5);
//P.AuxiliaryFieldsDerivative(MomDer); P.AuxiliaryFieldsDerivative(MomDer);
//Mom -= MomDer * ep; Mom -= MomDer * ep;
//P.update_auxiliary_momenta(ep*0.5); P.update_auxiliary_momenta(ep*0.5);
for (int a = 0; a < as[level].actions.size(); ++a) { for (int a = 0; a < as[level].actions.size(); ++a) {
@ -193,9 +193,9 @@ class Integrator {
} }
// Auxiliary fields // Auxiliary fields
//P.update_auxiliary_momenta(ep*0.5); P.update_auxiliary_momenta(ep*0.5);
//P.AuxiliaryFieldsDerivative(AuxDer); P.AuxiliaryFieldsDerivative(AuxDer);
//Msum += AuxDer; Msum += AuxDer;
// Here run recursively // Here run recursively
@ -222,7 +222,7 @@ class Integrator {
P.Mom = NewMom; P.Mom = NewMom;
// update the auxiliary fields momenta // update the auxiliary fields momenta
//P.update_auxiliary_momenta(ep*0.5); P.update_auxiliary_momenta(ep*0.5);
} }
@ -265,7 +265,7 @@ class Integrator {
P.DerivativeP(Mom1); // first term in the derivative P.DerivativeP(Mom1); // first term in the derivative
//P.update_auxiliary_fields(ep*0.5); P.update_auxiliary_fields(ep*0.5);
do { do {
@ -293,7 +293,7 @@ class Integrator {
U = NewU; U = NewU;
//P.update_auxiliary_fields(ep*0.5); P.update_auxiliary_fields(ep*0.5);
} }
@ -340,6 +340,7 @@ class Integrator {
void reverse_momenta(){ void reverse_momenta(){
P.Mom *= -1.0; P.Mom *= -1.0;
P.AuxMom *= -1.0;
} }
// to be used by the actionlevel class to iterate // to be used by the actionlevel class to iterate

View File

@ -344,7 +344,8 @@ class ImplicitLeapFrog : public Integrator<FieldImplementation, SmearingPolicy,
if (last_step){ if (last_step){
this->update_P(U, level, eps / 2.0); this->update_P(U, level, eps / 2.0);
} else { } else {
this->implicit_update_P(U, level, eps, true);// intermediate step this->implicit_update_P(U, level, eps, true);// works intermediate step
// this->update_P(U, level, eps); // looks not reversible
} }
} }
} }

View File

@ -105,7 +105,7 @@ public:
// Modify the distribution with the metric // Modify the distribution with the metric
M.MSquareRoot(Mom); M.MSquareRoot(Mom);
if (0) { if (1) {
// Auxiliary momenta // Auxiliary momenta
// do nothing if trivial, so hide in the metric // do nothing if trivial, so hide in the metric
MomentaField AuxMomTemp(Mom._grid); MomentaField AuxMomTemp(Mom._grid);
@ -132,7 +132,7 @@ public:
Hloc += trace(Mom_mu * inv_mu); Hloc += trace(Mom_mu * inv_mu);
} }
if (0) { if (1) {
// Auxiliary Fields // Auxiliary Fields
// hide in the metric // hide in the metric
M.M(AuxMom, inv); M.M(AuxMom, inv);
@ -167,7 +167,7 @@ public:
void AuxiliaryFieldsDerivative(MomentaField& der){ void AuxiliaryFieldsDerivative(MomentaField& der){
der = zero; der = zero;
if (0){ if (1){
// Auxiliary fields // Auxiliary fields
MomentaField der_temp(der._grid); MomentaField der_temp(der._grid);
MomentaField X(der._grid); MomentaField X(der._grid);
@ -194,13 +194,13 @@ public:
} }
void update_auxiliary_momenta(RealD ep){ void update_auxiliary_momenta(RealD ep){
if(0){ if(1){
AuxMom -= ep * AuxField; AuxMom -= ep * AuxField;
} }
} }
void update_auxiliary_fields(RealD ep){ void update_auxiliary_fields(RealD ep){
if (0) { if (1) {
MomentaField tmp(AuxMom._grid); MomentaField tmp(AuxMom._grid);
MomentaField tmp2(AuxMom._grid); MomentaField tmp2(AuxMom._grid);
M.M(AuxMom, tmp); M.M(AuxMom, tmp);