Use constexpr for physical constants and move them into gmx namespace
[alexxy/gromacs.git] / src / gromacs / modularsimulator / parrinellorahmanbarostat.cpp
index 81085d0cda1797465e6f61fc4eaea0355da9eb33..9b35825a6041451f1902f486d3ae8383ab85c6ac 100644 (file)
@@ -219,7 +219,7 @@ real ParrinelloRahmanBarostat::conservedEnergyContribution() const
     {
         for (int j = 0; j <= i; j++)
         {
-            real invMass = PRESFAC * (4 * M_PI * M_PI * inputrec_->compress[i][j])
+            real invMass = c_presfac * (4 * M_PI * M_PI * inputrec_->compress[i][j])
                            / (3 * inputrec_->tau_p * inputrec_->tau_p * maxBoxLength);
             if (invMass > 0)
             {
@@ -235,7 +235,7 @@ real ParrinelloRahmanBarostat::conservedEnergyContribution() const
      * track of unwrapped box diagonal elements. This case is
      * excluded in integratorHasConservedEnergyQuantity().
      */
-    energy += volume * trace(inputrec_->ref_p) / (DIM * PRESFAC);
+    energy += volume * trace(inputrec_->ref_p) / (DIM * c_presfac);
 
     return energy;
 }