correct potential energy
authorPritish Jetley <pjetley2@illinois.edu>
Fri, 14 Oct 2011 02:45:57 +0000 (21:45 -0500)
committerPritish Jetley <pjetley2@illinois.edu>
Fri, 14 Oct 2011 02:45:57 +0000 (21:45 -0500)
DataManager.cpp

index b946108..50def95 100644 (file)
@@ -1301,7 +1301,7 @@ void DataManager::kickDriftKick(OrientedBox<Real> &box, Real &energy){
   dt_k2 = globalParams.dthf;
 
   for(Particle *p = pstart; p != pend; p++){
-    energy += p->potential;
+    energy += p->mass*p->potential;
     // kick
     p->velocity += dt_k1*p->acceleration;
     savedEnergy += p->mass*(p->velocity.lengthSquared());