Make PBC type enumeration into PbcType enum class
[alexxy/gromacs.git] / src / gromacs / mdlib / tests / constr.cpp
index 5883fd926188246ec63401b254effa22f20f8aa1..5316e0c849b9f7a1488955107f0aaab601f0edae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -138,12 +138,12 @@ public:
 
         // Infinitely small box
         matrix boxNone = { { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 } };
-        set_pbc(&pbc, epbcNONE, boxNone);
+        set_pbc(&pbc, PbcType::No, boxNone);
         pbcs_["PBCNone"] = pbc;
 
         // Rectangular box
         matrix boxXyz = { { 10.0, 0.0, 0.0 }, { 0.0, 20.0, 0.0 }, { 0.0, 0.0, 15.0 } };
-        set_pbc(&pbc, epbcXYZ, boxXyz);
+        set_pbc(&pbc, PbcType::Xyz, boxXyz);
         pbcs_["PBCXYZ"] = pbc;
 
         //
@@ -178,7 +178,7 @@ public:
             int  j  = testData.constraints_.at(3 * c + 2);
             RVec xij0, xij1;
             real d0, d1;
-            if (pbc.ePBC == epbcXYZ)
+            if (pbc.pbcType == PbcType::Xyz)
             {
                 pbc_dx_aiuc(&pbc, testData.x_[i], testData.x_[j], xij0);
                 pbc_dx_aiuc(&pbc, testData.xPrime_[i], testData.xPrime_[j], xij1);
@@ -216,7 +216,7 @@ public:
             int  i = testData.constraints_.at(3 * c + 1);
             int  j = testData.constraints_.at(3 * c + 2);
             RVec xij0, xij1;
-            if (pbc.ePBC == epbcXYZ)
+            if (pbc.pbcType == PbcType::Xyz)
             {
                 pbc_dx_aiuc(&pbc, testData.x_[i], testData.x_[j], xij0);
                 pbc_dx_aiuc(&pbc, testData.xPrime_[i], testData.xPrime_[j], xij1);