2906 Commits

Author SHA1 Message Date
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
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
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
334c31bc18 PROBLEMS, SHAPES: Add stellar wind test problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-06-07 18:18: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
e25d692295 Update CI address.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-04-12 11:01:43 -03:00
ebfca7e92c CMAKE: Remove host cpu tuning options.
It help with cross compilation and these flags can be added from the
command line, e.g., using
cmake <source_path> -DCMAKE_Fortran_FLAGS="-march=native".

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-04-01 23:25:03 -03:00
271dd571ae FORCING: Reset forcing statistics if there is no driving.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-28 10:15:23 -03:00
99d5196736 FORCING: Allow to specify the period of turbulence injection.
The period is controlled by two parameters:

'injection_time_start' - the beginning of the injection period,
'injection_time_stop'  - the end of the injection period.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-27 10:04:06 -03:00
5b26a7f726 INTERPOLATIONS: Update coefficients for OCMP9T method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-25 18:01:53 -03:00
d1a386fcf7 INTERPOLATIONS: Update coefficients for OCMP7T method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-25 17:05:50 -03:00
42b40c5238 INTERPOLATIONS: Update coefficients for OCMP9P method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-25 16:03:37 -03:00
89a2a2b3c5 INTERPOLATIONS: Update coefficients for OCMP7P method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-25 16:01:41 -03:00
76c7059a37 INTERPOLATIONS: Update coefficients for OCMP5 method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-25 15:59:17 -03:00
84977e0c83 INTERPOLATIONS: Clean up some comments.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 14:36:44 -03:00
229759f1c0 INTERPOLATIONS: Implement tridiagonal version of OCMP9 scheme.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 14:31:49 -03:00
7a99094427 INTERPOLATIONS: Implement tridiagonal version of OCMP7 scheme.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 14:07:46 -03:00
d7b3a32e07 NTERPOLATIONS: Update coefficients for OCMP9 method.
The coefficient correspond to the maximum of the imaginary part of the
modified wave number to be 2e-6 and the integrated error to be 1.54e-11.

The subroutine was renamed to to OCMP9P, as pentadiagonal.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 13:08:57 -03:00
99598582c5 INTERPOLATIONS: Update coefficients for OCMP7 method.
The coefficient correspond to the maximum of the imaginary part of the
modified wave number to be 2e-6 and the integrated error to be 1.38e-11.

The subroutine was renamed to to OCMP7P, as pentadiagonal.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 13:03:44 -03:00
2f2c28154a INTERPOLATIONS: Update coefficients for OCMP5 method.
The coefficient correspond to the maximum of the imaginary part of the
modified wave number to be 2e-6 and the integrated error to be 6.4e-12.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-22 12:44:21 -03:00
162e567870 Revert "INTERPOLATIONS: Add variants to OCMP methods."
This reverts commit bedc743258597a7200b134e4374cc84ef42298fe.
2023-02-21 12:24:30 -03:00
3ddbe189a0 IO: Fix the restart from XML snapshots with more processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-15 10:27:41 -03:00
bedc743258 INTERPOLATIONS: Add variants to OCMP methods.
There two variants selected using parameter 'ocmp_scheme_mode':

1) 'stable' - which guarantees the scheme numerical instability by
   enforcing the stable dissipation errors
2) 'minimum' - which enforced the dissipation errors to be smaller than
   2e-5

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-08 11:40:25 -03:00
9f74a1e0c9 INTERPOLATIONS: Correct mispelled name in mp_limiter().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-07 10:14:20 -03:00
57795f0ca3 INTERPOLATIONS: Rewrite the monotonicity-preserving limiter.
Restore the original Suresh & Huynh limiter and add modification by
Ahn & Lee for compact schemes. Additionally, pass the variable
positivity flag and for positive variables modifie the lower limit
using the minimum value obtained from the cubic spline interpolation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-07 10:11:48 -03:00
81de98d9e2 Update the copyright year to 2023.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-02-01 18:36:37 -03:00
d9a7cc1b9e STATISTICS: Calculate current density only if magnetic field present.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-12-17 15:09:57 -03:00
4f8c9219b2 MESH: Rewrite and simplify redistribute_blocks().
Attribute new process division and distribute data blocks in one loop.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-12-08 12:48:54 -03:00
7da9421744 BLOCKS: Do nothing if processes are equal in change_blocks_process().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-12-06 13:01:13 -03:00
295453b01c IO: Distribute files better among the restarting processes.
This is an improvement in the case a job restarted with a higher
number of processes. The reading of data blocks is spread among new
processes, so it better balances memory.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-12-04 20:16:55 -03:00
f59db0375f FORCING: Add parameter 'driving_velocity'.
By default this parameter is set to zero and the behavior is the same as
before. However, if this parameter is set to a value larger than zero,
it determines the driving time scale for the Ornstein–Uhlenbeck method,
and the injection power for the Alvelius method.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-11-27 15:55:57 -03:00