Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / mdlib / rf_util.cpp
index deb1285a59f38f443cddf9a44c8873f7b33ae0e1..fc4822182b68109b573e6fb204f86130fb74357a 100644 (file)
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/pleasecite.h"
 
-void calc_rffac(FILE *fplog, real eps_r, real eps_rf, real Rc,
-                real *krf, real *crf)
+void calc_rffac(FILE* fplog, real eps_r, real eps_rf, real Rc, real* krf, real* crf)
 {
     /* eps == 0 signals infinite dielectric */
     if (eps_rf == 0)
     {
-        *krf = 1/(2*Rc*Rc*Rc);
+        *krf = 1 / (2 * Rc * Rc * Rc);
     }
     else
     {
-        *krf = (eps_rf - eps_r)/(2*eps_rf + eps_r)/(Rc*Rc*Rc);
+        *krf = (eps_rf - eps_r) / (2 * eps_rf + eps_r) / (Rc * Rc * Rc);
     }
-    *crf   = 1/Rc + *krf*Rc*Rc;
+    *crf = 1 / Rc + *krf * Rc * Rc;
 
     if (fplog)
     {
-        fprintf(fplog, "%s:\n"
+        fprintf(fplog,
+                "%s:\n"
                 "epsRF = %g, rc = %g, krf = %g, crf = %g, epsfac = %g\n",
-                eel_names[eelRF], eps_rf, Rc, *krf, *crf, ONE_4PI_EPS0/eps_r);
+                eel_names[eelRF], eps_rf, Rc, *krf, *crf, ONE_4PI_EPS0 / eps_r);
         // Make sure we don't lose resolution in pow() by casting real arg to double
-        real rmin = gmx::invcbrt(static_cast<double>(*krf*2.0));
-        fprintf(fplog,
-                "The electrostatics potential has its minimum at r = %g\n",
-                rmin);
+        real rmin = gmx::invcbrt(static_cast<double>(*krf * 2.0));
+        fprintf(fplog, "The electrostatics potential has its minimum at r = %g\n", rmin);
     }
 }