Use ArrayRef in calc_mu
[alexxy/gromacs.git] / src / gromacs / mdlib / calcmu.cpp
index 982faf33e02020aa5a85eb91ec562d5de490faf2..07b27aad0048a020d041d2777f5b9495add4abb4 100644 (file)
@@ -52,9 +52,9 @@
 void calc_mu(int                            start,
              int                            homenr,
              gmx::ArrayRef<const gmx::RVec> x,
-             const real                     q[],
-             const real                     qB[],
-             int                            nChargePerturbed,
+             gmx::ArrayRef<const real>      q,
+             gmx::ArrayRef<const real>      qB,
+             bool                           havePerturbedCharges,
              dvec                           mu,
              dvec                           mu_B)
 {
@@ -82,7 +82,7 @@ void calc_mu(int                            start,
         mu[m] *= gmx::c_enm2Debye;
     }
 
-    if (nChargePerturbed)
+    if (havePerturbedCharges)
     {
         mu_x = mu_y = mu_z = 0.0;
 #pragma omp parallel for reduction(+: mu_x, mu_y, mu_z) schedule(static) \