14 #ifndef LAYOUT_INCLUDED
15 #define LAYOUT_INCLUDED
31 static int grid_rank(
int *rank,
const int *gcoord);
32 static int grid_coord(
int *gcoord,
const int rank);
35 static int ipe(
const int idir);
36 static int npe(
const int idir);
38 static int tag(
int rank,
int idir,
int ipm);
42 const std::vector<int>& lattice_size,
43 std::vector<int>& grid_size);
static int layout_setup()
initialise layout.
static int grid_coord(int *gcoord, const int rank)
find grid coordinate corresponding to rank.
static char m_map_grid[16]
static int * m_ipe_up
rank of upward neighbour in directions.
static int subgrid_setup()
static int * m_ipe_dn
rank of downward neighbour in directions.
static int * m_dims
lattice extent (Lx, Ly, Lz, Lt)
static int subgrid_delete()
static int grid_rank(int *rank, const int *gcoord)
find rank from grid coordinate.
static int * m_grid_dims
grid dimensions in directions.
static int npe(const int idir)
grid size in idir direction.
static int grid_dims(int *gdims)
find grid size.
static MPI_Comm * m_sub_comm
subgrid
static int * m_grid_coord
grid coordinate.
Layout class for logical organisation of parallel nodes.
Layout()
constructor is hidden as private; no instantiation.
static int ipe(const int idir)
grid coordinate along idir direction.
static int tag(int rank, int idir, int ipm)
generate tag for communication.
static int layout_delete()
destroy layout and clean up.
static int * m_physical_to_logical
map between physical and logical grid
static int m_ndim
number of dimensions.
static int physical_map_delete()
Layout & operator=(const Layout &)
assignment is hidden as private.
static int physical_map_setup()
Layout(const Layout &)
copy constructor is hidden as private; no instantiation.