Remove unnecessary config.h includes
[alexxy/gromacs.git] / src / gromacs / mdlib / nsgrid.c
index 5e5c7906bf14c5197198d424b42feb30e7845d39..8ad27efc6cad5902023bceb3adebcac38d9adfa1 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, 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.
  * the research papers on the package. Check out http://www.gromacs.org.
  */
 /* This file is completely threadsafe - keep it that way! */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
 
 #include <stdlib.h>
 
-#include "sysstuff.h"
-#include "typedefs.h"
-#include "types/commrec.h"
-#include "macros.h"
-#include "smalloc.h"
-#include "nsgrid.h"
-#include "gmx_fatal.h"
-#include "vec.h"
-#include "network.h"
-#include "domdec.h"
-#include "partdec.h"
-#include "pbc.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/utility/smalloc.h"
+#include "gromacs/legacyheaders/nsgrid.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/legacyheaders/network.h"
+#include "gromacs/legacyheaders/domdec.h"
+#include "gromacs/pbcutil/pbc.h"
 #include <stdio.h>
-#include "gromacs/fileio/futil.h"
+#include "gromacs/utility/futil.h"
 #include "gromacs/fileio/pdbio.h"
 
 /***********************************
@@ -292,7 +288,7 @@ static void set_grid_sizes(matrix box, rvec izones_x0, rvec izones_x1, real rlis
                      */
                     /* Determine the shift for the corners of the triclinic box */
                     add_tric = izones_size[j]*box[j][i]/box[j][j];
-                    if (dd && dd->ndim == 1 && j == ZZ)
+                    if (dd->ndim == 1 && j == ZZ)
                     {
                         /* With 1D domain decomposition the cg's are not in
                          * the triclinic box, but trilinic x-y and rectangular y-z.
@@ -890,29 +886,3 @@ void print_grid(FILE *log, t_grid *grid)
     }
     fflush(log);
 }
-
-void mv_grid(t_commrec *cr, t_grid *grid)
-{
-    int  i, start, nr;
-    int  cur = cr->nodeid;
-    int *ci, *cgindex;
-#define next ((cur+1) % (cr->nnodes-cr->npmenodes))
-
-    ci      = grid->cell_index;
-    cgindex = pd_cgindex(cr);
-    for (i = 0; (i < cr->nnodes-1); i++)
-    {
-        start = cgindex[cur];
-        nr    = cgindex[cur+1] - start;
-        gmx_tx(cr, GMX_LEFT, &(ci[start]), nr*sizeof(*ci));
-
-        start = cgindex[next];
-        nr    = cgindex[next+1] - start;
-        gmx_rx(cr, GMX_RIGHT, &(ci[start]), nr*sizeof(*ci));
-
-        gmx_tx_wait(cr);
-        gmx_rx_wait(cr);
-
-        cur = next;
-    }
-}