mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Fixed HMC SU(N) integrator which was causing fields to leave Lie Algebra manifold for N>2
This commit is contained in:
parent
2c22db841a
commit
4f1e66b044
@ -38,7 +38,6 @@ public:
|
|||||||
|
|
||||||
static inline void update_field(Field& P, Field& U, double ep) {
|
static inline void update_field(Field& P, Field& U, double ep) {
|
||||||
U += P*ep;
|
U += P*ep;
|
||||||
std::cout << "Field updated. Epsilon = " << std::setprecision(10) << ep << std::endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline RealD FieldSquareNorm(Field& U) {
|
static inline RealD FieldSquareNorm(Field& U) {
|
||||||
@ -175,14 +174,13 @@ public:
|
|||||||
P *= scale;
|
P *= scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Field projectForce(Field& P) {return P;}
|
static inline Field projectForce(Field& P) {return Ta(P);}
|
||||||
|
|
||||||
static inline void update_field(Field &P, Field &U, double ep)
|
static inline void update_field(Field &P, Field &U, double ep)
|
||||||
{
|
{
|
||||||
#ifndef USE_FFT_ACCELERATION
|
#ifndef USE_FFT_ACCELERATION
|
||||||
double t0=usecond();
|
double t0=usecond();
|
||||||
U += P*ep;
|
U += P*ep;
|
||||||
std::cout << "Field updated. Epsilon = " << std::setprecision(10) << ep << std::endl;
|
|
||||||
double t1=usecond();
|
double t1=usecond();
|
||||||
double total_time = (t1-t0)/1e6;
|
double total_time = (t1-t0)/1e6;
|
||||||
std::cout << GridLogIntegrator << "Total time for updating field (s) : " << total_time << std::endl;
|
std::cout << GridLogIntegrator << "Total time for updating field (s) : " << total_time << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user