Fixed indexing typo, and definition of Suzuki-Yashida constants array
authorunknown <Sander@.(none)>
Mon, 21 Dec 2009 15:01:22 +0000 (16:01 +0100)
committerunknown <Sander@.(none)>
Mon, 21 Dec 2009 15:01:22 +0000 (16:01 +0100)
include/maths.h
src/mdlib/domdec_top.c

index 2822e1db67b0330b60588442cdabc00e336f5e08..7c17fac7e89e60a1279c867324b9c2f35eacc091 100644 (file)
@@ -72,7 +72,21 @@ extern "C" {
     
 #define MAX_SUZUKI_YOSHIDA_NUM 5
 #define SUZUKI_YOSHIDA_NUM  5
-    
+
+static const double sy_const_1[] = { 1. };
+static const double sy_const_3[] = { 0.828981543588751,-0.657963087177502,0.828981543588751 };
+static const double sy_const_5[] = { 0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065 };
+
+static const double* sy_const[] = {
+    NULL,
+    sy_const_1,
+    NULL,
+    sy_const_3,
+    NULL,
+    sy_const_5
+};
+
+/*
 static const double sy_const[MAX_SUZUKI_YOSHIDA_NUM+1][MAX_SUZUKI_YOSHIDA_NUM+1] = {
     {},
     {1},
@@ -80,7 +94,7 @@ static const double sy_const[MAX_SUZUKI_YOSHIDA_NUM+1][MAX_SUZUKI_YOSHIDA_NUM+1]
     {0.828981543588751,-0.657963087177502,0.828981543588751},
     {},
     {0.2967324292201065,0.2967324292201065,-0.186929716880426,0.2967324292201065,0.2967324292201065}
-};
+};*/
 
 extern int             gmx_nint(real a);
 extern  real    sign(real x,real y);
index 786f5d48feb3ed08298839cbcf5b70cdcb10fbb6..2df14e975308ae7d07650c795f7673bb5c451702 100644 (file)
@@ -1568,7 +1568,7 @@ void dd_init_local_state(gmx_domdec_t *dd,
     {
         buf[0] = state_global->flags;
         buf[1] = state_global->ngtc;
-        buf[3] = state_global->nnhchains;
+        buf[2] = state_global->nnhchains;
     }
     dd_bcast(dd,3*sizeof(int),buf);