/*
*===============================================================================
*
* d/wilson_d511/defs.h 
*
*-------------------------------------------------------------------------------
*
* Copyright (C) 2007 Thomas Streuer 
*
* This file is part of BQCD -- Berlin Quantum ChromoDynamics program
*
* BQCD is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BQCD is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with BQCD.  If not, see <http:*www.gnu.org/licenses/>.
*
*-------------------------------------------------------------------------------
*/
#define MOD_NUM (MOD_NUM_X*MOD_NUM_Y*MOD_NUM_Z*MOD_NUM_T)

#if MOD_NUM>1

#define IPF_DIRAC_SYNC_T1 0
#define IPF_DIRAC_SYNC_T2 0

#else

#define IPF_DIRAC_SYNC_T1 1
#define IPF_DIRAC_SYNC_T2 1

#endif

#define MOD_LAT_X (LAT_X/MOD_NUM_X)
#define MOD_LAT_Y (LAT_Y/MOD_NUM_Y)
#define MOD_LAT_Z (LAT_Z/MOD_NUM_Z)
#define MOD_LAT_T (LAT_T/MOD_NUM_T)


#if MOD_NUM_X>1
#define MOD_BND_X (MOD_LAT_Y*MOD_LAT_Z*MOD_LAT_T)
#define MOD_INT_X (MOD_LAT_X-2)
#else
#define MOD_BND_X 0
#define MOD_INT_X MOD_LAT_X
#endif
#if MOD_NUM_Y>1
#define MOD_BND_Y (MOD_LAT_X*MOD_LAT_Z*MOD_LAT_T)
#define MOD_INT_Y (MOD_LAT_Y-2)
#else
#define MOD_BND_Y 0
#define MOD_INT_Y MOD_LAT_Y
#endif
#if MOD_NUM_Z>1
#define MOD_BND_Z (MOD_LAT_X*MOD_LAT_Y*MOD_LAT_T)
#define MOD_INT_Z (MOD_LAT_Z-2)
#else
#define MOD_BND_Z 0
#define MOD_INT_Z MOD_LAT_Z
#endif
#if MOD_NUM_T>1
#define MOD_BND_T (MOD_LAT_X*MOD_LAT_Y*MOD_LAT_Z)
#define MOD_INT_T (MOD_LAT_T-2)
#else
#define MOD_BND_T 0
#define MOD_INT_T MOD_LAT_T
#endif
#define MOD_BNDH (MOD_BND_X+MOD_BND_Y+MOD_BND_Z+MOD_BND_T)
#define MOD_BND (2*MOD_BNDH)


#define PACKED_MOD_VOL (MOD_LAT_X*MOD_LAT_Y*MOD_LAT_Z*MOD_LAT_T)
#define MOD_VOL (PACKED_MOD_VOL)

#define PACKED_MOD_INT_VOL (MOD_INT_X*MOD_INT_Y*MOD_INT_Z*MOD_INT_T)
#define MOD_INT_VOL (PACKED_MOD_INT_VOL)

#define MOD_COORD_LEN   20
