d6b4b70aab
EVOLUTION: Treat any unphysical state properly in EULER method.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 09:18:19 -03:00
3117c19a75
EVOLUTION: Improve initial time step estimation.
...
In case the estimation returns an unphysical state, its time step is
reduced and the estimation is repeated. If it fails for 10 consecutive
times, the estimation is abandoned and the CFL time step is used.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 09:04:05 -03:00
a9cf789833
EVOLUTION: Rewrite SSPRK2(1)m method.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 22:16:40 -03:00
a87bcce907
EVOLUTION: Reorganize methods.
...
Put first non-embedded and then embedded methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 16:16:26 -03:00
6dcd400219
EVOLUTION: Treat any unphysical state properly in SSPRK3(2)4 method.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 16:09:32 -03:00
a52da2830d
EVOLUTION: Treat any unphysical state properly in SSPRK3(2)n² method.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 16:05:22 -03:00
380e4c8d7e
EVOLUTION: Synchronize status among processes in update_variables().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 15:59:34 -03:00
89bc706673
EVOLUTION: Treat any unphysical state properly in 3S*+ method.
...
If any unphysical cell is detected, the integration is immediately
reverted and resumed with a time step reduced by a factor or four.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 15:37:47 -03:00
ea49382c49
EQUATIONS: Add status flag to all cons2prim_*() subroutines.
...
We also check if the positive variables are indeed positive.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 13:21:32 -03:00
17f867cb08
EQUATIONS: Add status flag to update_primitive_variables().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 12:51:23 -03:00
86cf55e836
EVOLUTION: Add status flag to update_variables().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-09 12:32:49 -03:00
9f1c072704
DRIVER: Use only few last steps to estimate the remaining time.
...
This improved the remaining time estimation in case the number of leafs
changes significantly.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-08 22:35:38 -03:00
4f73c95616
BOUNDARIES: Use the same buffer for boundary copy.
...
The copy of boundaries between blocks at the same level always uses the
same size of buffer, so instead of using two of them, one for sending
and another for receiving, use just one for sending and receiving. This
will use the appropriate subroutine from MPITOOLS
exchange_arrays_same().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-04 10:22:13 -03:00
787e07d572
BLOCKS: Rename %block to %meta in block_info structure.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-04 09:31:44 -03:00
f3ad7924ea
MPITOOLS: Use interface for exchange_arrays().
...
Implement two subroutines, one for exchange of arrays of different
sizes, and the second for exchange of arrays of the same sizes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 22:44:30 -03:00
95617866b1
MPITOOLS: Use MPI_IN_PLACE in all MPI_Allreduce().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 22:39:33 -03:00
9ecbf83d5f
MESH: Make sure again the index nc is not out of the range.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 12:32:48 -03:00
01d0549bf5
MESH: Make sure the index nc is no out of the range.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-03 10:32:23 -03:00
20cb799fba
MPITOOLS: Fix argument intent in exchange_arrays().
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-01 13:11:35 -03:00
2098661d3c
EQUATIONS: Remove cruft.
...
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-30 16:59:32 -03:00
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