Those two subroutines insert a new meta block after or before the block
which is provided by additional pointer.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
These subroutines not only allocate/deallocate meta blocks, but also
takes care about the appending or removal of the blocks to or from the
meta block list.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In these two arrays we store temporary states during the Runge-Kutta
integration. The new pointer %u in the block structure points to the
current array of the conservative variables.
- the problem was demonstrating in the way that after restart the
number of leafs was set to zero; this was because while recreating
the meta blocks structure we set nleafs directly instead of using
metablock_set_leaf(); after using this subroutine we don't need to
to set nleafs anymore, and the restart continues properly;
- reorganize order of subroutines and separate them between groups for
meta and data blocks, refinement, and private functions and
subroutines;
- change the copyright header; update to new email address;
- make all module pointers, variables, and subroutines private and
allow only for subset of them to be public;
- improve the description of block structures;
- add several functions to return module variables such as the number
of meta and data blocks, the number of leafs, the last id, etc.;
- update several subroutines from other modules which required some of
the BLOCK module variables;
- the level resolution array 'res' has been moved to mesh module, where
it should belong; due to this it needs to be provided as an argument
to subroutines in BLOCK and PROBLEM modules which use it;
- the level resolution array stores block resolutions in each
directions, so it is now a two dimensional array, with the dimensions
corresponding to the number of levels and number of dimensions;
- update subroutine write_coordinates_h5() to store the level
resolution array properly;
- add a new subroutine set_datablock_dims() to set dimensions of the
allocatable arrays in data blocks; this subroutine is called from
init_mesh(), which is the right place to initiate BLOCK module;
- remove dependency of blocks.o on variables.o;
- boundaries.o depends on timers.o;
- the purpose of a new allocatable array in the block structure is to
store the numerical fluxes, which need to be synchronized, and then
used to update conserved variables in a conservative way;
BLOCK STRUCTURE
- add new field pos in the meta block structure determining the
position of the current block in the parent block; this might be very
useful in determining which boundary region should be updated;
- add new subroutine metablock_set_position() which sets the position
of the child in the parent block;