If the forcing is off, the number of forcing modes is zero, but it is
not the same as a wrong number of forcing modes stored in the restart
file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Completely rewrite the random generator module. The new method is
true 64-bit floating point generator in contrast to 32-bit Marsaglia's
methods. Add recommended seeds' initialization and jump for parallel
computations. Make function names more meaningful and add new functions
in IO module to store the seeds properly.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Now we can restart from restart snapshots with different number of ghost
zones. Also, remove the old restart snapshot format support from
read_datablocks_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Use it to handle parameters from restart snapshots. Also separate
printing I/O parameters from I/O module initialization.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Parameters such block dimensions, the base level dimensions, or the
domain extrema cannot be modified when the job is restarted, so read
them from the restart snapshots.
Also add new subroutine to IO read integer vector attribute from the
HDF5 snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If the job was restart with different maxlev, then
initialize_coordinates() has to know about it, so it generate
appropriate coordinates.
Read maxlev from the restart snapshot, if the job was restarted, and set
toplev as the maximum value between the previous and current maxlev.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we run a job from a restart snapshot and modify some of the
parameters in the parameter file, this could lead to problems. Some
parameters, like the set of equations, equation of state, or block
dimensions, simply cannot be modified. Therefore, any such parameter,
modifies in the parameter file, should be overwritten with the value
from the restart snapshot. The purpose of these subroutines is to read
these parameters from restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>