620 Commits

Author SHA1 Message Date
8d5f356d8d MPITOOLS: A real value and array are the same for NVIDIA compiler.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-30 16:53:35 -03:00
0ff346597d HELPERS: fnum() is GNU Fortran specific.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-29 11:55:43 -03:00
f567a9ddf8 USER_PROBLEM: Pass the simulation time to user_time_statistics().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 12:01:01 -03:00
b0401e96c6 PROBLEMS: Pass the run count to user problem initialization.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 11:59:11 -03:00
6187c6d76d USER_PROBLEM: Rename user gravitational acceleration subroutine.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 09:09:13 -03:00
8c808fd70c USER_PROBLEM: Rename subroutines boundary_user_() to user_boundary().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 09:02:43 -03:00
22455676f4 USER_PROBLEM: Add user_time_statistics() to module USER_PROBLEM.
This file can we use to calculate and store the user defined time
statistics.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 09:00:03 -03:00
94a621a3c5 USER_PROBLEM: Rename use problem subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-26 08:52:03 -03:00
6362fe13ad EVOLUTION: Fix partial times and timesteps in 3S*+ methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-23 20:52:03 -03:00
8297482639 IO: Store 'cmax' so we can properly resume jobs.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-23 11:23:58 -03:00
44ea63bc3d EVOLUTION: Implement optimized embedded methods by Ranocha et al.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-20 18:08:54 -03:00
27041d0feb DRIVER, EVOLUTION, IO: Rewrite handling precise snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 14:03:57 -03:00
55b0d24b77 EVOLUTION: Rework slightly the way new time step is calculated.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 13:28:25 -03:00
c604467a5c DRIVER: Use the initialize_time_step() instead of new_time_step().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 13:15:04 -03:00
d501b19041 EVOLUTION: Implement estimation of the initial time step.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 13:11:41 -03:00
6ca36c93e3 DRIVER, EVOLUTION: Move dtnext to evolution module.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-18 11:33:14 -03:00
0c8d8fac9c EVOLUTION: Rewrite SSPRK4(2)M integration method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-16 19:03:25 -03:00
418a580888 EVOLUTION: Print 'err/tol' not the error during the integration.
This is more meaninful, since it shows the ratio of the maximum error to
the tolerance atol + rtol * max(U).

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-15 15:29:42 -03:00
155b5d7575 EVOLUTION: Implement L2 and maximum norms for error calculation.
Alow the user to choose between these two norms.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-15 13:51:25 -03:00
271af020df EVOLUTION: Implement 3rd order embedded SSP3(2)4 with error control.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-15 12:15:14 -03:00
6ffb3f5910 INTERPOLATIONS: Add a couple of limiters.
Use limiter_average() which is not a limiter, just returns average of
left and right derivatives, as the default limiter for prolongation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-09-21 11:29:16 -03:00
d3c0737c8d BOUNDARIES, MESH: Allow to choose prolongation limiter.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-09-21 11:28:23 -03:00
61ed993821 EVOLUTION: Fix decay rate of ψ field.
This scalar potential tracks the development of div(B). Its decay
depends on the cell size, so make it calculated per refinement level.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-09-20 08:44:38 -03:00
9d48cc9367 OPERATORS: Implement high-order differential operators.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-09-10 18:25:11 -03:00
7713df3ebf EVOLUTION: Add dth to track hydrodynamic timestep.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-08-17 11:23:36 -03:00
c766bb9059 MESH: Redistribute data blocks after each refinement.
There are situations when one process can suddenly have many data
blocks refined resulting in a significant memory stress before
the new blocks are redistributed among all processes. Just
redistribute data blocks each time the block refinement is
performed to avoid such a situation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-20 17:58:44 -03:00
6dbda8bf14 IO: Use the same array to store each variable in write_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-20 17:56:51 -03:00
a0b6e60d7e EVOLUTION: Simplify conditions for the new time step.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 15:12:08 -03:00
b2a7bd08b6 EVOLUTION: Consider dte only for methods with error control.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:16:31 -03:00
8ec801228c EVOLUTION: Fix formatting once again.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:03:40 -03:00
d8bd7eb800 EVOLUTION: Fix formatting.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 13:02:14 -03:00
30215029d4 EVOLUTION: Be explicit about the method with error control.
Do not show the parameters controlling the integration errors if the
method do not control this error.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-19 12:58:57 -03:00
3817822f6f HELPERS: Move flush_and_sync() to HELPERS.
Use it in mesh statistics.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-18 19:25:49 -03:00
92f5905b6b MESH: Store statistics when the distribution of blocks changes too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-18 19:07:00 -03:00
7ba3d7ae37 DRIVER: Print message on received signal to error unit.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-16 11:33:49 -03:00
047e9af130 MESH: Balance data blocks not only among processes but nodes too.
This change tries to maintain a similar number of data blocks per node,
while balancing them across all processes. This should improve the
memory utilization among nodes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 21:10:17 -03:00
19e89c4dd2 MPITOOLS: Add maximum rank of the node.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 17:25:32 -03:00
b933c444df MPITOOLS: Determine the number of nodes, processes per node, and local rank.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 17:22:00 -03:00
6532c998fb IO: Implement restoring from version 2.0 of AmunXML restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:57:34 -03:00
3b44444211 IO: Implement storing the version 2.0 of AmunXML restart snapshots.
This version avoids allocation of big arrays to store the array fields
of data blocks. Fields with primitive and conservative variables are
stores separately for each block.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:06:48 -03:00
d78b827f37 BOUNDARIES: Fix compilation with MPI=off.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-13 10:58:42 -03:00
339d8e3ca4 BOUNDARIES: Simplify 2D and 3D cases in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-12 22:10:06 -03:00
b455ddaa6b BOUNDARIES: Add support for passive scalars to boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-12 16:26:01 -03:00
02a516aa6d BOUNDARIES: Fix missing indices in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 12:30:44 -03:00
1836f733c7 BLOCKS: Remove field %f from data block structure.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 01:28:12 -03:00
580e1b832e BOUNDARIES: Rewrite bondary_fluxes() to update dU.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-11 01:26:15 -03:00
2509cf3d5a BLOCKS, EVOLUTION: Add block interface fluxes and update them.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 19:25:44 -03:00
0a03dd6f2f EVOLUTION: Separate dU update from the intermitate state update.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 18:52:55 -03:00
8c46b83626 EVOLUTION: Call update_flux() in update_increment().
Remove update_fluxes().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 18:26:52 -03:00
c4a0d1df09 BLOCKS, EVOLUTION: Make dU to be blocks field and use it.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 17:51:28 -03:00