Apply re-formatting to C++ in src/ tree.
[alexxy/gromacs.git] / src / gromacs / tables / cubicsplinetable.cpp
index 9f0bf2b451aba1bd28df6a029a1c024d72f8f209..dcbdbfe7a2a8d6c83b6b710679f5a0da097cbf07 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017,2018,2019, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,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.
@@ -116,8 +116,8 @@ void cubicSplineInterpolationFromFunctionAndDerivative(double  functionValue0,
 {
     double Y, F, G, H;
 
-    calculateCubicSplineCoefficients(functionValue0, functionValue1, derivativeValue0,
-                                     derivativeValue1, spacing, &Y, &F, &G, &H);
+    calculateCubicSplineCoefficients(
+            functionValue0, functionValue1, derivativeValue0, derivativeValue1, spacing, &Y, &F, &G, &H);
 
     double Fp = fma(fma(H, eps, G), eps, F);
 
@@ -179,8 +179,15 @@ void fillSingleCubicSplineTableData(const std::function<double(double)>& functio
 
         if (functionIsInRange)
         {
-            calculateCubicSplineCoefficients(tmpFunctionValue, nextHigherFunction, tmpDerivativeValue,
-                                             nextHigherDerivative, spacing, &Y, &F, &G, &H);
+            calculateCubicSplineCoefficients(tmpFunctionValue,
+                                             nextHigherFunction,
+                                             tmpDerivativeValue,
+                                             nextHigherDerivative,
+                                             spacing,
+                                             &Y,
+                                             &F,
+                                             &G,
+                                             &H);
             lastIndexInRange--;
         }
         else
@@ -250,9 +257,14 @@ void fillSingleCubicSplineTableData(ArrayRef<const double>       function,
 
         if (functionIsInRange)
         {
-            cubicSplineInterpolationFromFunctionAndDerivative(
-                    function[index], function[index + 1], derivative[index], derivative[index + 1],
-                    inputSpacing, eps, &(tmpFunction[i]), &(tmpDerivative[i]));
+            cubicSplineInterpolationFromFunctionAndDerivative(function[index],
+                                                              function[index + 1],
+                                                              derivative[index],
+                                                              derivative[index + 1],
+                                                              inputSpacing,
+                                                              eps,
+                                                              &(tmpFunction[i]),
+                                                              &(tmpDerivative[i]));
             lastIndexInRange--;
         }
         else
@@ -273,8 +285,8 @@ void fillSingleCubicSplineTableData(ArrayRef<const double>       function,
         double nextFunction   = ((i + 1) < endIndex) ? tmpFunction[i + 1] : 0.0;
         double nextDerivative = ((i + 1) < endIndex) ? tmpDerivative[i + 1] : 0.0;
 
-        calculateCubicSplineCoefficients(tmpFunction[i], nextFunction, tmpDerivative[i],
-                                         nextDerivative, spacing, &Y, &F, &G, &H);
+        calculateCubicSplineCoefficients(
+                tmpFunction[i], nextFunction, tmpDerivative[i], nextDerivative, spacing, &Y, &F, &G, &H);
         (*yfghTableData)[4 * i]     = Y;
         (*yfghTableData)[4 * i + 1] = F;
         (*yfghTableData)[4 * i + 2] = G;
@@ -362,11 +374,11 @@ CubicSplineTable::CubicSplineTable(std::initializer_list<AnalyticalSplineTableIn
         {
             std::vector<real> tmpYfghTableData;
 
-            fillSingleCubicSplineTableData(thisFuncInput.function, thisFuncInput.derivative, range_,
-                                           spacing, &tmpYfghTableData);
+            fillSingleCubicSplineTableData(
+                    thisFuncInput.function, thisFuncInput.derivative, range_, spacing, &tmpYfghTableData);
 
-            internal::fillMultiplexedTableData(tmpYfghTableData, &yfghMultiTableData_, 4,
-                                               numFuncInTable_, funcIndex);
+            internal::fillMultiplexedTableData(
+                    tmpYfghTableData, &yfghMultiTableData_, 4, numFuncInTable_, funcIndex);
 
             funcIndex++;
         }
@@ -467,11 +479,15 @@ CubicSplineTable::CubicSplineTable(std::initializer_list<NumericalSplineTableInp
 
             std::vector<real> tmpYfghTableData;
 
-            fillSingleCubicSplineTableData(thisFuncInput.function, thisFuncInput.derivative,
-                                           thisFuncInput.spacing, range, spacing, &tmpYfghTableData);
+            fillSingleCubicSplineTableData(thisFuncInput.function,
+                                           thisFuncInput.derivative,
+                                           thisFuncInput.spacing,
+                                           range,
+                                           spacing,
+                                           &tmpYfghTableData);
 
-            internal::fillMultiplexedTableData(tmpYfghTableData, &yfghMultiTableData_, 4,
-                                               numFuncInTable_, funcIndex);
+            internal::fillMultiplexedTableData(
+                    tmpYfghTableData, &yfghMultiTableData_, 4, numFuncInTable_, funcIndex);
 
             funcIndex++;
         }