Module DOMAINS provided only one subroutine to generate the block
structure of the rectangular base domain. This change just moved this
subroutine to module MESH.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This workspace removes the necessity of allocating the local subroutine
arrays. It is allocated once in initialize_mesh() and can be used in any
place of the code. By default, the size of this workspace is controlled
by the block dimensions, the number of variables, and the simulation
dimension, but it can be controlled by a parameter 'workspace_size'.
Additionally, there is a logical flag 'work_in_use' exported from this
module to permit the verification if the workspace is currently in use.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This rewrite removes large buffers used by the MPI exchange of data
block arrays between processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This removes the use of extra buffer for MPI block exchange. The
exchange is now a zero-copy operation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The prolongation is not expected to be done very frequently, comparing
to the number of leafs. Therefore, allocate the prolongation array only
when it is required.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Instead of using a temporary array for all variables, we now reuse the
same array for the prolongation of each variable.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
There are situations when one process can suddenly have many data
blocks refined resulting in a significant memory stress before
the new blocks are redistributed among all processes. Just
redistribute data blocks each time the block refinement is
performed to avoid such a situation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This change tries to maintain a similar number of data blocks per node,
while balancing them across all processes. This should improve the
memory utilization among nodes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Block field %uu addopts its size according to the used integration
methods. Use it for all operation insteado of fields %u0, %u1, and %u2.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
GNU Fortran and Intel Fortran define preprocessor macros such
__GFORTRAN__ and __INTEL_COMPILER. Just use them.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>