This flag indicates whether the energy injection was performed. If not,
there is no need for the variable update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
It seems that the selective block update, i.e., update of the blocks
which have been (de)refined only, is not perfect. It violates the
numerical conservation somehow, and requires more investigation.
In order to fix this, perform the update of all data blocks, no matter
if they were refined or not. This makes some blocks to be updated twice,
but resolves the problem of variable conservation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine now used the new XML module to parge XML files. It also
used new subroutine read_binary_xml() to read binary files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This subroutine is also responsible for detection if binary data are
compressed and encoded, and respectively decompress and decode them.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This module offers a user-friendly interface for parsing XML data and
retrieving elements and attributes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit does not change any functionality. It just prepares for
easier implementation of the compression of the restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The default compression levels correspond now to the default levels
defined by each compression format library.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit implements two data filters:
1) "shuffle" - reorganizes bytes to group most to less significant parts
together: |a1|a2|a3|b1|b2|b3| -> |a1|b1|c1|a2|b2|c2|a3|b3|c3|
2) "bytedelta" - additionally stores differences between subsequent
values: |a1|a2|a3|b1|b2|b3| -> |a1|b1-a1|c1-b1|a2|b2-a2|c2-b2|a3|b3-a3|c3-b3|
For large datasets, in particular in 3D, the compression ratio can be
significantly better after applying these filters.
Inspired by https://aras-p.info/blog/2023/03/01/Float-Compression-7-More-Filtering-Optimization/
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This setup assume two flux tubes formed by eliptic magnetic field lines.
The two flux tubes enter in contact in the midplane. Moreover, the
magnetic field lines change the polarization across the contact plane.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
For of all, update_shape now works with the conservative variables.
It is called in three points:
1) Just after the integration update or when the block were (de)refined.
2) Afted the boundary update.
3) If the unphysical cell correction is on, it is applied to blocks
which contain unphysical cells after they are corrected.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This makes the multiple block refinement extremenly slow, especially
when job is restarted with the maximum refinement level increased.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
In the case of embedded integration method, the time step resulting from
the error could drop to very small values. In such situation, the next
time step is taken to a maximum value between the time step due to error
and the stability time step multiplied by the safe factor. By default
this factor is set to 0.01.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
The meaning of these variables was inverted. Therefore, the limiting of
positive variables was not working.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>