1639 Commits

Author SHA1 Message Date
794433c17f IO: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 23:01:02 -03:00
0128f976f0 BLOCKS: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 21:04:50 -03:00
88d8aa4b06 INTERPOLATIONS: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 19:32:10 -03:00
3490e84825 ALGEBRA: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 19:18:03 -03:00
91b710f8a5 BOUNDARIES: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 19:14:31 -03:00
8096dbaca5 MESH: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-26 19:04:12 -03:00
bfcd38a16c MPITOOLS: Print error messages directly to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-25 23:06:27 -03:00
df79530b0c PROBLEMS: Do not depend on ERROR module.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-25 22:36:21 -03:00
32cbdec6b6 MAKEFILE: Remove utils from source files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-25 22:27:43 -03:00
523737835e UTILS: Remove unused module.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-25 22:26:23 -03:00
840d70bd2b mkdep.sh: Consider only source files in building dependencies.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-23 18:11:30 -03:00
f2a203bd17 EQUATIONS: Print unphysical cell info to standard error.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-23 18:05:00 -03:00
1cefe88de4 EQUATIONS: More control over the unphysical cell correction.
Give more control over the unphysical cell correction by allowing to
specify the minimum number of physical cells to perform averaging
(parameter "npavg") and the maximum distance to be considered from the
corrected cell (parameter "ngavg").

These two parameters allow to avoid averaging of extended unphysical
regions from two physical points.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-21 23:02:51 -03:00
808c1583ba EQUATIONS: Improve unphysical cell correction.
If there are no enough physical neighbors, the cell cannot be corrected
and the code simply stops. Allow the code to continue the execution in
such a case by simply correcting the unphysical cells by replacing the
negative values of positive variables with a lower bounds, dmin and
pmin, for density and pressure, respectively.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-21 22:45:49 -03:00
ae06f4fb73 MESH: Avoid infinite loop in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-07 15:19:56 -03:00
a3383488ce BOUNDARIES: Avoid infinite loop in prolong subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-07 15:15:08 -03:00
8c0c89d0af INTERPOLATIONS: Avoid infinite loop in interfaces_tvd() and interfaces_mgp().
In case an interpolated cell, which should be positive, is zero or negative,
and the sum of derivatives is zero as well, the correction of
derivatives can enter into an infinite loop. It shouldn't normally
happen, since such a situation is unphysical.

Avoid the infinite loop and print a warning about encountered problems.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-07 14:59:42 -03:00
5964d50720 EVOLUTION: Fix unphysical cells after mesh update.
Unphysical cells can appear due to various reasons, e.g conservative to
primitive variable conversion in recently created block after mesh
refinements. Such unphysical cells can be immediately propagated to
neighbor blocks through boundary update, blocks which have not been
marked as recently updated. In such situation, the unphysical cells are
not corrected in these neighbors.

This change fixes this by marking all neighbors of blocks created in the
mesh update to be verified for unphysical cells too.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-08-07 14:13:34 -03:00
cd4474ad23 Makefile: Fix module path for non-GNU compilers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-05-03 16:57:46 -03:00
444b78450e PYTHON: Add two subroutines to read integral (.dat) files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-31 12:01:40 -03:00
461260ed38 Improve 'make clean' even more.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-31 11:44:37 -03:00
c35d5ccf64 Improve slightly makefile for makedeps generation and cleaning.
File 'makedeps' is now generated automatically if it does not exist or
any of source files has been modified.

Improve the cleaning of compilation files. Only files created during the
compilation are removed. Also if the OBJDIR is empty, it is removed as
well.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-31 11:33:06 -03:00
f0594b0b06 Update the code building steps in README.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 21:38:53 -03:00
bcf7495e0e Generate object file dependency only if makedeps not present.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 21:36:10 -03:00
ed38be7ebf Make mkdeps.sh script more robust.
Get rid of 'grep' and use only 'awk', 'sort' and 'uniq'. All should be
available in any linux system.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2018-03-30 21:31:36 -03:00
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