2964 Commits

Author SHA1 Message Date
488eb72173 Merge branch 'master' into flux-tubes 2023-08-29 17:45:00 -03:00
26022c4ce0 EVOLUTION, FORCING: Add injected flag to update_forcing().
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>
2023-08-29 17:43:03 -03:00
f50ccca3a2 Merge branch 'master' into flux-tubes 2023-08-29 17:23:32 -03:00
55b13fb895 EVOLUTION: Add missing variable update after adding turbulence forcing.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-29 17:09:48 -03:00
48f6618121 Revert "EVOLUTION: Update all blocks after the mesh update."
This reverts commit 8b36ce58e18bdc5af35c03571e77c5566efb2ae0.
2023-08-29 17:06:15 -03:00
b624595682 Merge branch 'master' into flux-tubes 2023-08-29 10:53:47 -03:00
dfe7310408 EVOLUTION: Improve the conservation in the SSPRK3 and SSPRK(4,3) methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-29 10:43:42 -03:00
91d3583a78 STATISTICS: Use Kahan summation for statistics integration.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-29 10:32:52 -03:00
8b36ce58e1 EVOLUTION: Update all blocks after the mesh update.
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>
2023-08-29 10:15:08 -03:00
39c3cdf7a4 EVOLUTION: Improve the conservation in the SSPRK3(2)4 method.
The 4th step produced errors large enought to give significant
conservation errors.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-28 17:53:59 -03:00
bb2d821df6 Merge branch 'master' into flux-tubes 2023-08-14 17:32:01 -03:00
03e99457cc MAKE: Fix mkdeps.sh.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-14 16:42:37 -03:00
47b3b50ae0 IO: Improve description of subroutine write_binary_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-14 13:05:24 -03:00
a71a1390ca IO: Formatting correction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-14 12:49:42 -03:00
5574b6fcf1 IO: Rewrite storing of restart and regular XML snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-14 11:50:07 -03:00
b11a1fad58 XML: Add subroutines to initialize a new tree and add elements.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-14 10:13:40 -03:00
8ac5e49def IO: Enable compression when storing XML restart snapshot.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-12 07:08:48 -03:00
c015d5849a IO: Add missing item_size for 'complex64' in read_binary_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-11 19:54:29 -03:00
14fad08f47 IO: Rewrite read_restart_snapshot_xml().
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>
2023-08-11 19:41:00 -03:00
64966c3eb3 IO: Add subroutine to read binary XML files.
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>
2023-08-11 19:29:08 -03:00
2a634faba4 XML: New module to handle XML files.
This module offers a user-friendly interface for parsing XML data and
retrieving elements and attributes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-11 19:26:51 -03:00
fd7ba586a9 COMPRESSION: Implement decompressing subroutine.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-11 16:12:33 -03:00
01656102d4 COMPRESSION: Implement subroutine to decode data.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-11 15:23:40 -03:00
857baa1ce4 COMPRESSION: Add get_compressor_id() and get_encoder_id().
These functions return the compressor and encoder IDs based on their
names.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-11 15:09:50 -03:00
0e90f52118 COMPRESSION: Rename cbytes to bytes in compress().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-07 19:04:53 -03:00
b9750f049b COMPRESSION: Better handle preferences in LZ4 compression.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-07 18:53:42 -03:00
fc6e8134ee COMPRESSION: Slightly rewrite ZSTD compression.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-07 18:31:29 -03:00
3cd8d789a6 COMPRESSION: Add lzma_bound() and better handle LZMA errors.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-07 18:14:56 -03:00
65c41105c6 Merge branch 'master' into flux-tubes 2023-08-05 19:02:40 -03:00
e8a220d9a7 PYTHON: Increase amunpy version to 0.9.11.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-29 18:40:27 -03:00
f2477396ca PYTHON: Change field 'data_filter' to 'data_encoder'.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-29 18:38:46 -03:00
b9c638c07b COMPRESSION, IO: Rewrite the compression.
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>
2023-07-29 18:35:45 -03:00
44abf23243 COMPRESSION: Add function to check if compression is used.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-29 16:29:44 -03:00
c7d8fdf512 COMPRESSION, IO: Rename compression_<format> to compressor_<format>.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-29 16:17:06 -03:00
db19393dd1 COMPRESSION: Make default compression levels more consistent.
The default compression levels correspond now to the default levels
defined by each compression format library.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-27 23:36:39 -03:00
6f0ecb0e42 Merge branch 'master' into flux-tubes 2023-07-27 18:44:45 -03:00
5efc38b8a1 COMPRESSION, IO: Implement data filters for better compression.
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>
2023-07-27 18:35:54 -03:00
8c94659cca PYTHON: Increase amunpy version to 0.9.10.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-24 12:40:00 -03:00
5245070499 PYTHON: Add support for data filters for AmunXML format.
The supported data filters are 'shuffle' and 'bytedelta'.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-24 12:34:16 -03:00
d9a535a432 README: Update Build Status website.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-07-13 22:32:09 -03:00
80f1fdde06 USER_PROBLEM: Implement alternative setup for flux tubes.
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>
2023-07-13 14:56:27 -03:00
334c31bc18 PROBLEMS, SHAPES: Add stellar wind test problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-06-07 18:18:03 -03:00
f7daa3f60d Merge branch 'master' into flux-tubes 2023-06-02 16:26:03 -03:00
7deb0d369d EVOLUTION: Make shape update more consistent.
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>
2023-05-31 18:16:59 -03:00
da43f1f896 MESH: Do not redistribute block after each block refinement.
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>
2023-05-31 18:12:55 -03:00
dac7168a19 EQUATIONS: Introduce interface for prim2cons().
This interface allows to call prim2cons() both, for a single cell and
for a stencil.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-05-31 18:07:45 -03:00
4fd24e3a62 EQUATIONS: Print unphysical cell locations in DEBUG only.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-05-31 16:08:19 -03:00
31e13b43b8 EVOLUTION: Introduce "dt_safe_factor".
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>
2023-05-17 15:32:29 -03:00
8343890abc INTERPOLATION: Fix variables qmn and qmx in mp_limiting().
The meaning of these variables was inverted. Therefore, the limiting of
positive variables was not working.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-05-16 18:15:06 -03:00
b733365066 Merge branch 'master' into flux-tubes 2023-04-28 17:29:40 -03:00