1603 Commits

Author SHA1 Message Date
14b7cbd9ff IO: Restore metadata from files corresponding to process number.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 17:25:04 -02:00
cdd9b8e204 RANDOM: Correct compilation error in set_seeds().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 16:53:33 -02:00
eef631de50 RANDOM: Rewrite seed numbers handling.
The array of seed numbers makes sense only when OpenMP is used. With
MPI on, the length of seed vector on each MPI process is equal to the
number of OpenMP threads. For no OpenMP, only one seed number per MPI
process is used.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 16:44:19 -02:00
56ec194862 IO: Store block IDs in coordinate group.
Block IDs might be useful for block diagnostic purposes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 15:25:39 -02:00
97b221dc14 EVOLUTION: Move DEBUG section to a better position in advance().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 07:24:47 -02:00
07a02e305e EQUATION: Fix silly bug in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 07:24:01 -02:00
7b2247849a SCHEMES: Implement HLLC Riemann solver for SR-MHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-06 11:32:24 -02:00
d85d30ea28 PYTHON: Simplify variable conditions for temperature.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-01 10:32:09 -02:00
ee913e1a10 PYTHON: Add shrink parameter to amun_dataset().
The shrink parameter is an integer factor which is the power of 2 in the
range from 1 to the minimum dimension of the block size. For example, if
shrink = 2 than the output array will be halfed in each direction.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-30 17:28:20 -02:00
4602835b1c PYTHON: Add the magnitude of current density to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 11:05:38 -02:00
a9e15906d4 PYTHON: Add vorticity magnitude to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 11:02:58 -02:00
bfacf336eb PYTHON: Add the divergence of magnetic field to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 10:51:06 -02:00
24310ff8e2 PYTHON: Add the divergence of velocity to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 10:49:31 -02:00
a1c077e13e PYTHON: Add temperature to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 10:16:11 -02:00
4f614c2b8f PYTHON: Add Lorentz factor to derived datasets.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 10:10:15 -02:00
849fe3e88e PYTHON: Add velocity and magnetic field magnitudes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 10:06:33 -02:00
938945a117 PYTHON: Add optional progress bar while reading a dataset.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:59:06 -02:00
6f76ec90fa PYTHON: Simplify repeat operation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:40:54 -02:00
4e87e40689 PYTHON: Forgot to actually calculate the magnetic energy.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:33:41 -02:00
cab5d19d86 PYTHON: Add magnetic energy for MHD/SRMHD and total energy.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:30:39 -02:00
1d9f6e973b PYTHON: Add internal energy to derived variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:23:50 -02:00
6ed09fa33a PYTHON: Add kinetic energy to derived variables (only for HD or MHD).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:16:08 -02:00
3be56b34db PYTHON: Read dataset with the ghost zones.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-18 09:03:27 -02:00
81cdde8899 EQUATIONS: Check if the state is physical in nr_iterate_srhd_adi_1dw().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 13:19:56 -02:00
989495ef97 EQUATIONS: Return correct info flag in nr_initial_brackets_srmhd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 11:41:02 -02:00
1a27369635 EQUATIONS: Slightly rewrite nr_initial_brackets_srmhd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 11:31:43 -02:00
d4ecfcccf2 EQUATIONS: Slightly rewrite nr_iterate_srmhd_adi_1dw().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 11:10:34 -02:00
45b703ad34 EQUATIONS: Adjust strings to the left in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 10:57:43 -02:00
a5400dbfb8 EQUATIONS: Improve the warning messages in correct_unphysical_states().
Also, set the minimum number of physical cells for averaging to 3.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 08:41:57 -02:00
7da950f652 EQUATIONS: Fix a bug in correct_unphysical_states().
The condition for taking the surrounding region was supposed to be based
on the number of physical cells available. Unfortunately, the counter
for unphysical cell was checked instead. Fix it.

Also increase the maximum region to four cells away.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-17 08:24:53 -02:00
27f7e9038e Add the initial Python module to read data from AMUN's files.
So far only reading of HDF5 files is supported. Also only attributes and
datasets can be read. Datasets are rescaled to the efficient resolution
simply by replicating cell values.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 13:29:32 -02:00
fe117327d1 EQUATIONS: Rewrite nr_iterate_srhd_adi_1dw().
Make sure all cases are considered. Also, in the case of profiling, the
subroutine counts timing correctly.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 11:44:08 -02:00
c7a4159af7 EQUATIONS: Fix alignment in cons2prim_srmhd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 10:34:55 -02:00
096b7bc25e EQUATIONS: Do not quit if solution not found in cons2prim_srmhd_adi().
Just skip the cell which failed to be converted from conservative to
primitive variables and hope it can be fixed later by averaging.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 10:17:05 -02:00
6047622bd4 EQUATIONS: Do not quit if solution not found in cons2prim_srhd_adi().
Just skip the cell which failed to be converted from conservative to
primitive variables and hope it can be fixed later by averaging.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 10:10:10 -02:00
f638d53064 EQUATIONS: Remove positivity flag since it is not generic.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 10:01:40 -02:00
fedba83d17 EQUATIONS: Implement correction of unphysical cells.
The unphysical cells (those with negative density or pressure) will be
corrected by averaging their states from the values of physical
neighbors.

The option is off by default, but can be turned on by setting:

fix_unphysical_cells = "on"

in the parameter file.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-16 09:57:23 -02:00
ded1fd55b1 ALGEBRA: Invert roots order in quadratic().
Fixes Special Relativity HLLC solver.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-09 11:07:45 -02:00
253ec8d77d INTERPOLATIONS: Implement PPM with new limiters by Colella & Sekora.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-08 21:58:41 -02:00
63de17cd21 PROBLEMS: Make perturbation in RT problem perfectly symmetric.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-08 12:27:53 -02:00
d15e01b4c0 Update boundary conditions for Rayleigh-Taylor problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 11:37:40 -02:00
68e5aea50e DRIVER: Print the progress info no more than once per second.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 11:36:36 -02:00
38c857c851 Remove all references to PATHSCALE compiler.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 11:15:35 -02:00
0e6c338fc3 PROBLEMS: Update Rayleigh-Taylor problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 11:11:27 -02:00
9103153c9e Rename Sedov-Taylor parameter file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 09:45:30 -02:00
1f8ce476d4 IO: Store code version in HDF5 files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-05 09:39:10 -02:00
2c32139d8c Update copyright info.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-04 12:13:09 -02:00
90da71ee4d Update the code download instruction in REAME.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-01-04 12:05:33 -02:00
198e6db77c IO: Store an attribute indicating the domain periodicity.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-12-30 14:25:49 -02:00
88434201bf IO: Store 'gamma' for adiabatic, and 'csnd' for isothermal EoS.
Depending on the equation of state, adiabatic or isothermal, we
store the adiabatic index 'gamma' or the isothermal sound speed
'csnd' in the attributes of HDF5 files.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2017-12-30 13:17:25 -02:00