Convert domdec code to C++
[alexxy/gromacs.git] / src / gromacs / legacyheaders / nsgrid.h
index 23c2fca243bf8d5c0c20306934d14eaada468f88..c00df0078fb45760eb65efe400b9c65282232ced 100644 (file)
 extern "C" {
 #endif
 
-#define   GRID_STDDEV_FAC  sqrt(3)
-#define NSGRID_STDDEV_FAC  2.0
-/*
- * GRID_STDDEV_FAC * stddev is used to estimate the interaction density.
- * sqrt(3) gives a uniform load for a rectangular block of cg's.
- * For a sphere it is not a bad approximation for 4x1x1 up to 4x2x2.
+/*! \brief Used when estimating the interaction density.
+ *
+ * GRID_STDDEV_FAC * stddev estimates the interaction density. The
+ * value sqrt(3) == 1.73205080757 gives a uniform load for a
+ * rectangular 3D block of charge groups. For a sphere, it is not a
+ * bad approximation for 4x1x1 up to 4x2x2.
  *
- * The extent of the neighborsearch grid is a bit larger than sqrt(3)
+ * \todo It would be nicer to use sqrt(3) here, when all code that
+ * #includes this file is in C++, which will let us cope with the
+ * std::sqrt<T> on Windows. */
+static const real GRID_STDDEV_FAC = 1.73205080757;
+
+/*! \brief The extent of the neighborsearch grid is a bit larger than sqrt(3)
  * to account for less dense regions at the edges of the system.
  */
+static const real NSGRID_STDDEV_FAC = 2.0;
 
 #define NSGRID_SIGNAL_MOVED_FAC  4
 /* A cell index of NSGRID_SIGNAL_MOVED_FAC*ncells signals