Subroutine update_increment() was using time information which broke the
source term contribution. It has been moved to module EVOLUTION and its
arguments have been simplified.
The time step is now directly taken into account in the time integration
subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If option "fix_positivity" is on, we check if the pressure obtained from
conservative variables is positive. If it is negative, it is replaced by
a value corresponding to the maximum allowed sonic Mach number, provided
by option "msmax". The new value of pressure and corresponding total
energy is set in all unphysical cells then.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we set option "clip_extrema" to "on", we turn on the extrema clipping
or in other words, the reconstruction is limited in order to keep left
and right states to lay between their cell centered neighbors.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
We prepare a set of indices for all faces in the block. Those indices
point to edges and corners for each face, and are set one during the
first execution. Then, we simply iterate over faces and call
iterate_over_face() in order to apply subroutine pprocedure to edges and
corners connected to a given face.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Add subroutines to iterate over all block neighbors and check if they
reference to correct meta blocks. The neighbor consistency check is
done after initial mesh generation and each time the mesh has been
updated.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In 2D case, if we update corners using only X-edge neighbors, we get
some rare problems with symmetry. If we additionally use Y-edge
neighbors, to update corners, those problems disappear. This should be
additionally tested for both, 2D and 3D cases.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The job restart with smaller number of processors than the number of
files didn't work well, since all metablocks of all remaining files
where set to the last process before actually reading the corresponding
data blocks. This resulted in a crash in redistribute_blocks() due to
pointer not associated.
The fix lets the meta blocks to be restored with the original process
numbers. While reading files with the indices larger than the index of
the last process, all meta blocks which corresponding data blocks are
stored in the read file, are set to the process number of the reading
process. After reading data blocks from each file, the blocks are
redistributed. However, only data blocks belonging to the active
processes are redistributed.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The attribute, provided by the group identifier to which it is linked
and its name, is opened inside the subroutine
read_attribute_integer_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
If we restart a job with a different snapshot interval, the snapshot
number will continue from a different value corresponding to the
simulation time.
The snapshot number shouldn't be related to the current simulation time.
It should be always increasing. The simulation time is stored as an
attribute, anyway. This patch makes the snapshot number always
increasing continuously, without any gaps for restarted jobs.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Now, the boundary type is stored in an integer array instead of string
variables. This should reduce the comparison time in
boundary_specific().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Since we use the reflective boundary conditions for this problem, the
initial profile should respect that and also apply reflection at the
boundaries.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine is called after updating the boundaries of primitive
variables. It converts those primitive variables to their conservative
representation in all ghost cells.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The new order is to first, convert the updated conserved variables to
their primitive representation in the block interiors, update boundaries
of the primitive variables, and finally, convert the primitive variables
at the ghost cells to conserved ones.
The change updates the primitive variables in the block interiors before
the boundary update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
Conversion of the conserved to primitive variables can be expensive for
some sets of equations, such as the relativistic MHD. Therefore, we
will convert only the interior parts of blocks and update the ghost
zones later in the boundary update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>