2074 Commits

Author SHA1 Message Date
7fe1711454 BLOCKS: Remove unused subroutines, variables, and arguments.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-31 10:48:14 -03:00
e1087c6fb7 IO: Intel Fortran need directory=, not file= in INQUIRE.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 17:12:20 -03:00
9c690c5a4d DRIVER: Make signal handling work with GNU, PGI and Intel compilers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 16:15:46 -03:00
11e3a669fe MAKEFILE: Add initial support for CMake.
Just call ccmake <path to AMUN code> and set options.

GNU Fortran, Intel Fortran and PGI Fortran are supported.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 12:58:49 -03:00
cf95264a88 IO: Intel compiler does not accept sizeof() as argument.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 12:41:31 -03:00
98fc748f9b FORCING: Initialize status argument.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 12:05:34 -03:00
ebc24c3f03 IO: Avoid using the same names for variables and modules.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 12:02:13 -03:00
91a1ce442e DRIVER: PGI compiler requires signal definition.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 11:49:43 -03:00
7c55b65bd7 DRIVER, MESH, INTEGRALS: Use predefined preprocessor macros.
GNU Fortran and Intel Fortran define preprocessor macros such
__GFORTRAN__ and __INTEL_COMPILER. Just use them.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 11:06:59 -03:00
947ed1ad78 PARAMETERS: Use Fortran 2003 command line subroutines.
Fortran 2003 introduces procedures to get the number of command line
arguments and the specific argument. Use them instead of iargc() and
getarg() from GNU extension.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 10:23:31 -03:00
31a34c4380 PARAMETERS: Add verbose flag to read_parameters().
Slightly clean up other subroutines.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 10:13:48 -03:00
04169ad0f7 PARAMETERS: Remove subroutine redistribute_parameters().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 10:01:56 -03:00
62e989e0b7 DRIVER: Read parameters' file by all processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-30 10:00:12 -03:00
7495681330 PYTHON: Add electric field components and its magnitude.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-20 16:26:21 -03:00
5bd541333c PYTHON: Add vorticity and current density components to AmunXML.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-20 16:11:49 -03:00
84a3ce1572 PYTHON: Change formatting to use .format() in AmunXML class.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-17 16:41:50 -03:00
ad3d9eec93 PYTHON: Add simple progress to AmunXML.dataset().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-07-17 16:37:04 -03:00
4b9aba7d75 PYTHON: Fix reading datasedt for non-square/non-cube domain.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 22:06:53 -03:00
5c64df35e5 HASH: Remove obsolete specific xxh64_*() functions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:32:04 -03:00
d41ec74665 IO: Use generic xxh64() to calculate all hashes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:31:59 -03:00
467609bc00 HASH: Add generic function xxh64().
This function calculates the XXH64 has using a sequence of bytes, or
integer(kind=1) vector.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:31:48 -03:00
3dbbd0b8b1 HASH: Change kind of local variables.
Local variables remain and offset cannot be larger than the size of
input array, so they can be 4-byte integers.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 08:32:27 -03:00
e1e025017a HASH: Rename argument data to input.
Word DATA is reserved in Fortran. Rename this argument, just to avoid
confusion.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 07:05:44 -03:00
86c7f87365 HASH: Fix hash calculation in xxh64_integer() for odd length vectors.
If the input data has an odd number of elements, the last 4-byte
element has to be padded by 4-byte structure of zeros.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:57:26 -03:00
97e572ec94 IO: Make sure bounds have the same domensions while stored and read.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:49:53 -03:00
ca3580e2ec IO: Fix wrong warning while reading from an XML+binary restart snapshot.
If the forcing is off, the number of forcing modes is zero, but it is
not the same as a wrong number of forcing modes stored in the restart
file.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:47:38 -03:00
7faf27e3b9 PYTHON: Use the maximum used level instead of maxlev.
This reduces the resolution and memory usage if parameter maxlev is
actually larger than the maximu used level.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-12 14:51:37 -03:00
ac7697158a PYTHON: Fix extras in setup.py.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-12 07:41:15 -03:00
425bcc2f17 PYTHON: Verify binary data hashes if python-xxhash is available.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-12 07:31:12 -03:00
1c76a5b8ca BLOCKS: Reset fields of allocated datablock to zero.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-12 06:51:54 -03:00
5fc6b8dbe5 RANDOM: Fix bitwise OR in splitmix64(), xoshiro256p(), and jump().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:47:19 -03:00
7c1d028805 IO: Store hashes in write_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:42:05 -03:00
c2294cbe5e IO: Store hashes with leading zeros in write_restart_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:29:18 -03:00
5a9ea1dc92 IO: Verify hashes while reading XML+binary restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:19:33 -03:00
52d899aa72 IO: Store hashes of binary files in XML+binary restar snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 15:19:25 -03:00
cf39fa7292 HASH: Add Fortran implementation of 64-bit xxHash function.
The aim of the hash function is to verify consistency of the binary data
written in the snapshots.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 14:00:16 -03:00
c5aa43f8ff FORCING: Correct calculation of the acceleration RMS value.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-09 19:58:39 -03:00
bd1b4724e8 HELPERS: Increase show precision of real parameters to 5 digits.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-08 18:39:03 -03:00
638fba8902 USER_PROBLEM: Print parameters.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-08 18:35:37 -03:00
195d8895b0 FORCING: Rewrite Fourier forcing so both methods use vectors e1 and e2.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-07 19:28:04 -03:00
09612783a7 Revert "FORCING: Take into account solenoidal parameter in e1 and e2 vectors."
This reverts commit 0303f4ed84c752324bb5c9195dcab1547c0df4b9.
2020-05-03 19:06:48 -03:00
0303f4ed84 FORCING: Take into account solenoidal parameter in e1 and e2 vectors.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-03 18:20:53 -03:00
15162344f5 FORCING: Driving time and velocity scales are determined from the power.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-03 17:23:48 -03:00
836b1a873c FORCING: Calculate driving scales from driving power.
The driving power and injection scale determine the characteristic time
velocity and acceleration scales.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-03 17:20:45 -03:00
3dce6e683f PYTHON: Some fixes for 3D runs.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 21:25:43 -03:00
f1c30dffec EVOLUTION, FORCING: Call update_forcing() only when enabled.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 21:16:46 -03:00
5c554a2b2d IO: Do not store driving coefficients if nmodes == 0.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 21:06:34 -03:00
add0759308 IO: Handle properly seeds and driving coeffs in HDF5 restart files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 20:58:27 -03:00
62b835ccf8 README: Add brief info how to read data.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 15:34:33 -03:00
775537cecf Update README
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 15:24:01 -03:00