24 Commits

Author SHA1 Message Date
29f1e94e9c HELPERS: Add functions to enable/disable I/O flush and sync.
This change introduces the logical flag 'noflush' to control the flushing
and synchronization of I/O buffers. Subsequently, subroutines
'enable_flush_and_sync' and 'disable_flush_and_sync' were added to enable
and disable the flushing and synchronization, respectively.

The 'flush_and_sync' subroutine was modified to respect the noflush flag.

Additionally, this change updates 'statistics.F90' to read
the 'enable_io_flush' parameter and call the appropriate subroutine
('enable_flush_and_sync' or 'disable_flush_and_sync') based on its value.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-19 10:00:18 -03:00
0e703cf9b5 STATISTICS: Calculate pressure for the isothermal case.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-07-03 22:36:02 -03:00
9ae03a4998 STATISTICS: Fix bug in integrating the injected energy and rate.
The injected energy and rate were added to the global array within the
loop over the blocks, essentially multiplying the energy by the number
of blocks for each process. This fix moves the injected energy
accounting out of the loop over the blocks.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-05-24 18:28:49 -03:00
e76e875004 Update the copyright year to 2024.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2024-03-07 09:34:43 -03:00
78e3b72889 STATISTICS: Parallelize statistics calculation with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-31 17:45:17 -03:00
7ab1348259 STATISTICS: Get 'statistics_interval' on all processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-12-23 12:13:13 -03:00
91d3583a78 STATISTICS: Use Kahan summation for statistics integration.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-08-29 10:32:52 -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
caa0a1bcdb STATISTICS: Fix averaging of the boundary fluxes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-24 10:06:36 -03:00
5c8d13f385 STATISTICS: Remove unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-24 08:54:03 -03:00
fbfc1983e6 STATISTICS: Implement mass and energy conservation terms calculation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-23 22:42:17 -03:00
296da6a63e STATISTICS: Introduce flags to enable/disable statistics collection.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-17 12:37:20 -03:00
9829505650 Update copyright year to 2022.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-02 09:51:41 -03:00
a634d9bed5 VARIOUS: Make thread number thread private.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-08 11:52:16 -03:00
9b8b578931 STATISTICS: Make nt save in store_statistics().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-08 10:49:12 -03:00
fc0448a156 STATISTICS: Store total entropy in the integrals file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-02 23:21:52 -03:00
08c95ef5bf STATISTICS: Store forcing statistics in a separate file.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-02 22:57:35 -03:00
71a0e03114 STATISTICS: Fix mesh statistic header when MPI=off.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-10 10:45:33 -03:00
c6fc8d5194 OPENMP: Declare some local variables as threadprivate.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-07 19:55:30 -03:00
ea0b9b83dc WORKSPACE: Make workspace thread safe.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-07 10:46:18 -03:00
0c7e7eca15 STATISTICS: Stop compiler complaining if MPI is off.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-03 10:48:07 -03:00
42d60bdd0e STATISTICS: Use print_message().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 12:37:18 -03:00
ebe3662bb2 INTEGRALS: Rename module and its subroutine to STATISTICS.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-18 12:52:42 -03:00