ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 5*LY*LZ
ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 6*LY*LZ
int Index(const int x0, const int x1, const int x2, const int x3) {  int y0, y1, y2, y3, ix;  y0 = (x0 + T ) % T;   y1 = (x1 + LX) % LX;   y2 = (x2 + LY) % LY;   y3 = (x3 + LZ) % LZ;  ix = ((y0*LX + y1)*LY + y2)*LZ + y3;    y0=x0;#if ((defined PARALLELT) || (defined PARALLELXT))  if(x0 == T) {    ix = VOLUME + y3 + LZ*y2 + LZ*LY*y1;  }  /* the slice at time -1 is put to T+1 */  else if(x0 == -1) {    ix = VOLUME + LX*LY*LZ + y3 + LZ*y2 + LZ*LY*y1;  }#endif#if (defined PARALLELXT)  if(x1 == LX){    ix = VOLUME + 2*LX*LY*LZ + y0*LY*LZ + y2*LZ + y3;  }  if(x1 == -1){    ix = VOLUME + 2*LX*LY*LZ + T*LY*LZ + y0*LY*LZ + y2*LZ + y3;  }     /* The edges */  if(x0 == T){    if(x1 == LX){      ix = VOLUME+RAND+y2*LZ+y3;    }    if(x1 == -1){      ix = VOLUME+RAND+LY*LZ+y2*LZ+y3;    }  }  if(x0 == -1){    if(x1 == LX){      ix = VOLUME+RAND+2*LY*LZ+y2*LZ+y3;    }    if(x1 == -1){      ix = VOLUME+RAND+3*LY*LZ+y2*LZ+y3;    }  }#endif  /* The DBW2 stuff --> second boundary slice */  /* This we put a the very end.              */#if ((defined PARALLELT) || (defined PARALLELXT))  if(x0 == T+1) {     ix = VOLUMEPLUSRAND + y3 + LZ*y2 + LZ*LY*y1;#ifdef PARALLELXT    if(x1 == LX) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ	+ y2*LZ + y3;    }    else if (x1 == -1) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 1*LY*LZ	+ y2*LZ + y3;    }#endif  }  /* the slice at time -2 is put to T+2 */  else if(x0 == -2) {    ix = VOLUMEPLUSRAND + LX*LY*LZ + y3 + LZ*y2 + LZ*LY*y1;#ifdef PARALLELXT    if(x1 == LX) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 2*LY*LZ	+ y2*LZ + y3;    }    else if (x1 == -1) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 3*LY*LZ	+ y2*LZ + y3;    }#endif  }  #endif#if (defined PARALLELXT)  if(x1 == LX+1) {    if((x0 < T) && (x0 > -1)) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + y0*LY*LZ + y2*LZ + y3;    }    else if(x0 == T) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 4*LY*LZ	+ y2*LZ + y3;    }    else if (x0 == -1) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 5*LY*LZ	+ y2*LZ + y3;    }  }  if(x1 == -2) {    if((x0 < T) && (x0 > -1)) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + T*LY*LZ + y0*LY*LZ + y2*LZ + y3;    }    else if(x0 == T) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 6*LY*LZ	+ y2*LZ + y3;    }    else if(x0 == -1) {      ix = VOLUMEPLUSRAND + 2*LX*LY*LZ + 2*T*LY*LZ + 7*LY*LZ	+ y2*LZ + y3;    }  }   #endif  return(ix);}