ADJUST THE SIZES OF THE VARIABLES IF LX3ALL==1, SO THAT THE ALLOCATIONS ARE THE CORRECT SIZE
use total number of processes since we only divide in one direction here...
should divide evenly if generated from mpigrid
COMMUNICATE THE GRID SIZE TO THE WORKERS SO THAT THEY CAN ALLOCATE SPACE
if this is a root-only simulation we don't want to error out
need to also pass the lx2all size to all workers to they know
normal (i.e. full 3D) grid ordering, or a 2D grid with 1 element naturally in the second dimension
this is apparently a 2D grid, so the x2 and x3 dimensions have been/need to be swapped
MZ - may need to change lx2-->lx2all???
Note there that the fortran arrays are the correct size, but the input data are not!!!
This means tmp variable and permutes...
ALLOCATE SPACE FOR ROOTS SUBGRID GRAVITATIONAL FIELD
SEND FULL X1 AND X2 GRIDS TO EACH WORKER (ONLY X3-DIM. IS INVOLVED IN THE MPI
workers may need a copy of this, e.g. for boudnary conditions
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.