7fc44367d0
Add script to generate dependencies. Use it in makefile.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 17:26:14 -03:00
7124852093
Rewrite makefile to allow for custom destination and object directories.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 15:29:52 -03:00
2d58e169be
Move make and host files to a separate build directory.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 14:09:23 -03:00
c6b61c40e3
IO: Small change in write_snapshot_h5().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-21 09:58:43 -03:00
9ac7425031
MPITOOLS: Be consistent in using logical operator.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 15:26:23 -03:00
4eb1fc3471
MPITOOLS: Remove usued cruft.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 15:24:08 -03:00
be4f40e354
DRIVER: Clean up unnecessary code.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 15:19:57 -03:00
512eda8735
MPI, COORDINATES: Move box periodicity flags.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 15:15:05 -03:00
533f83e02b
MPI: Remove pneighs array, which is not used with AMR.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 14:43:00 -03:00
aa32bd466b
MPI: Rename MPI communicator to 'comm'.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-20 14:40:48 -03:00
371b035ba8
IO, RANDOM: Generate new seeds for processes > restart files.
...
If we increase the number of MPI processes during the restart, the seed
values are read from the last available restart file. Therefore, if we
have completely random seed numbers, the extra processes will have the
same seed value.
Detect this case and generate new random seeds if necessary.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-02-09 17:37:19 -02:00
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