g_iup[ix][1] = g_ipt[x0][(x1+LX+1)%LX][x2][x3]; g_idn[ix][1] = g_ipt[x0][(x1+LX-1)%LX][x2][x3];
g_iup[ix][1] = g_ipt[y0][(x1+LX+1)%LX][x2][x3]; g_idn[ix][1] = g_ipt[y0][(x1+LX-1)%LX][x2][x3];
void geometry() {    int x0,x1,x2,x3,ix=0;  int y0, y1, z0, z1;  int i_even = 0,i_odd = VOLUME/2;  int startvaluet = 0;  int startvaluex = 0;  int xeven[VOLUMEPLUSRAND] ALIGN;#if (defined PARALLELT || defined PARALLELXT)  startvaluet = 1;#endif#ifdef PARALLELXT  startvaluex = 1;#endif  set_ipt();  /* extended for neighbour slices at x0=-1 and x0=T */  for (x0 = -startvaluet; x0 < (T+startvaluet); x0++){    for (x1 = -startvaluex; x1 < (LX+startvaluex); x1++){      for (x2 = 0; x2 < LY; x2++){	for (x3 = 0; x3 < LZ; x3++){	  y0 = x0;	  y1 = x1;	  if(x0 == -1) y0 = T+1;	  if(x1 == -1) y1 = LX+1;	  z0 = y0 - 1;	  z1 = y1 - 1;	  if(x0 == 0) z0 = T+1;	  if(x1 == 0) z1 = LX+1;	  ix = g_ipt[y0][y1][x2][x3];	  /* g_proc_id*T is added to allow for odd T when the number of 	     nodes is even */	  if((x0+x1+x2+x3+g_proc_coords[0]*T+g_proc_coords[1]*LX)%2==0) {	    xeven[ix]=1;	  } 	  else {	    xeven[ix]=0; 	  }#if ((defined PARALLELT) || (defined PARALLELXT))	  if(x0 <  T) g_iup[ix][0] = g_ipt[x0+1][y1][x2][x3];	  if(x0 > -1) g_idn[ix][0] = g_ipt[z0  ][y1][x2][x3];#else	  g_iup[ix][0] = g_ipt[(x0+T+1)%T][x1][x2][x3];	  g_idn[ix][0] = g_ipt[(x0+t-1)%T][x1][x2][x3];#endif#if (defined PARALLELXT)	  if(x1 < LX) g_iup[ix][1] = g_ipt[y0][x1+1][x2][x3];	  if(x1 > -1) g_idn[ix][1] = g_ipt[y0][z1  ][x2][x3];#else	  g_iup[ix][1] = g_ipt[x0][(x1+LX+1)%LX][x2][x3];	  g_idn[ix][1] = g_ipt[x0][(x1+LX-1)%LX][x2][x3];#endif	  g_iup[ix][2] = g_ipt[y0][y1][(x2+LY+1)%LY][x3];	  g_idn[ix][2] = g_ipt[y0][y1][(x2+LY-1)%LY][x3];	  g_iup[ix][3] = g_ipt[y0][y1][x2][(x3+LY+1)%LZ];	  g_idn[ix][3] = g_ipt[y0][y1][x2][(x3+LY-1)%LZ];	  	}      }    }  }  i_even=0;  i_odd=0;  for (ix = 0; ix < (VOLUME+RAND); ix++){    if(xeven[ix]==1){      g_lexic2eo[ix] = i_even;      g_lexic2eosub[ix] = i_even;      g_eo2lexic[i_even] = ix;      i_even++;    }    else{      g_lexic2eo[ix] = (VOLUME+RAND)/2+i_odd;      g_lexic2eosub[ix] = i_odd;      g_eo2lexic[(VOLUME+RAND)/2+i_odd] = ix;      i_odd++;    }  }}