Create an ndimensional process grid. We can not use a ndimensional MPI cartesian grid for tensors since the mapping between ndim. and 2dim. index allows for an arbitrary reordering of tensor index. Therefore we can not use ndim. MPI Cartesian grid because it may not be consistent with the respective 2d grid. The 2d Cartesian MPI grid is the reference grid (since tensor data is stored as DBCSR matrix) and this routine creates an object that is a ndim. interface to this grid. map1_2d and map2_2d don't need to be specified (correctly), grid may be redefined in dbcsr_t_distribution_new Note that pgrid is equivalent to a MPI cartesian grid only if map1_2d and map2_2d don't reorder indices (which is the case if [map1_2d, map2_2d] == [1, 2, ..., ndims]). Otherwise the mapping of grid coordinates to processes depends on the ordering of the indices and is not equivalent to a MPI cartesian grid.
Type  Intent  Optional  Attributes  Name  

type(mp_comm_type),  intent(in)  ::  mp_comm 
simple MPI Communicator 

integer,  intent(inout),  DIMENSION(:)  ::  dims 
grid dimensions  if entries are 0, dimensions are chosen automatically. 

type(dbcsr_t_pgrid_type),  intent(out)  ::  pgrid 
ndimensional grid object 

integer,  intent(in),  DIMENSION(:)  ::  map1_2d 
which ndindices map to first matrix index and in which order which ndindices map to first matrix index and in which order 

integer,  intent(in),  DIMENSION(:)  ::  map2_2d 
which ndindices map to first matrix index and in which order which ndindices map to first matrix index and in which order 

integer,  intent(in),  optional,  DIMENSION(:)  ::  tensor_dims 
tensor block dimensions. If present, process grid dimensions are created such that good load balancing is ensured even if some of the tensor dimensions are small (i.e. on the same order or smaller than nproc**(1/ndim) where ndim is the tensor rank) 
integer,  intent(in),  optional  ::  nsplit 
impose a constant split factor which matrix dimension to split 

integer,  intent(in),  optional  ::  dimsplit 
impose a constant split factor which matrix dimension to split 