73 Commits

Author SHA1 Message Date
dac7168a19 EQUATIONS: Introduce interface for prim2cons().
This interface allows to call prim2cons() both, for a single cell and
for a stencil.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-05-31 18:07:45 -03:00
4fd24e3a62 EQUATIONS: Print unphysical cell locations in DEBUG only.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2023-05-31 16:08:19 -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
64c58bb4bd EQUATIONS: Make compiler happy with imported variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-10-17 11:26:19 -03:00
0f104bd033 EQUATIONS: Print the location just once in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-27 11:59:35 -03:00
e50e83bb1c EQUATIONS: Adapt unphysical cell info for 2D and 3D.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-27 11:54:32 -03:00
edb3924499 EQUATION: Correct formatting in correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-26 22:34:47 -03:00
aa99145260 EQUATIONS: Print the location of unphysical cell.
Also slightly rewrite and simplify the arguments of
correct_unphysical_states().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-05-26 22:21:02 -03:00
a4890bb240 EQUATIONS: Rewrite slightly correct_unphysical_states().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 13:34:31 -03:00
1e1c39da1a EQUATIONS: Process all cells in update_primitive_variables().
If cons2prim() returns status indicating the existence of non-physical
cell, just update the subroutine status and continue with the variable
conversion.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 12:52:04 -03:00
06103eca50 EQUATIONS: Rewrite cons2prim() subroutines.
Do not quit immediately if a negative density or pressure is
encountered. Just mark the status flag non-zero and continue. The
non-physical cell can be corrected later.

Also, if the compilation flag DEBUG is present, print the conservative
variables for the non-physical cell.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-19 12:46:46 -03:00
9e327d76ca EQUATIONS: Add option ghosts to update_primitive_variables().
This is a logical flag controling if the conversion should be done for
the whole block, including the ghost zones, or just the interior part.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-04 16:36:50 -03:00
9829505650 Update copyright year to 2022.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-02-02 09:51:41 -03:00
4645652e41 EQUATIONS: Remove all functions maxspeed().
These functions were replaced by get_maximum_speeds().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-28 13:06:53 -03:00
57c6a7c6ec EQUATIONS: Remove all subroutines for Roe solver.
Roe Riemann solver with their eigensystems are constructed in SCHEMES
now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-28 13:01:38 -03:00
af4b83cd7c BOUNDARIES: Make variable initialization OpenMP conformant.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-08 11:39:48 -03:00
67a0934242 EQUATIONS: Make variable initialization OpenMP conformant.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-08 10:45:02 -03:00
9b5198a5ff EQUATIONS, EVOLUTION: Rework get_maximum_speeds().
There is no need for the maximum characteristic speed. The divergence
correcting speed cglm is calculated using the maximum eigenvalue and
physical velocity.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-07 15:38:54 -03:00
0cf2481992 EQUATIONS: Add subroutines get_maximum_speeds().
These subroutines determine the maximum physical and characteristic
speeds, and the maximum eigenvalue in the system.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-06 22:44:21 -03:00
25ea3c3daf EQUATIONS: Take into account ½ψ² in total energy for adiabatic MHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-06 16:32:58 -03:00
d5bf2990d1 EQUATIONS: Print adiabatic index and sound speed.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2022-01-01 12:39:49 -03:00
8843b6f45f EQUATIONS: Rewrite a bit esystem_roe_mhd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 16:45:33 -03:00
e0f11b9b21 EQUATIONS: Rewrite a bit esystem_roe_mhd_iso().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 16:22:37 -03:00
94b54723b7 EQUATIONS: Rewrite a bit esystem_roe_hd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 14:06:44 -03:00
ad7fa788f8 EQUATIONS: Rewrite a bit esystem_roe_hd_iso().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 13:02:12 -03:00
5ae63db0b4 EQUATIONS: Remove unused matrix evroe.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 12:47:19 -03:00
37af0380f4 EQUATIONS: Make esystem_roe_hd_iso() to work with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 12:46:39 -03:00
5094050026 EQUATIONS: Make esystem_roe_hd_adi() to work with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 12:44:10 -03:00
751c08ea9d EQUATIONS: Make esystem_roe_mhd_iso() to work with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 12:40:40 -03:00
32ea1f68e6 EQUATIONS: Make esystem_roe_mhd_adi() to work with OpenMP.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-12-15 12:35:02 -03:00
ed59b64960 EQUATIONS: Use print_message().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 12:33:47 -03:00
f659000e8c PROFILE: Remove all custom profiling.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 15:22:15 -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
2098661d3c EQUATIONS: Remove cruft.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-30 16:59:32 -03:00
3d16d5c13d Update copyrights.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-02-04 17:35:04 -03:00
3d13d30e60 EQUATIONS: Add vector to store integration errors of variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-28 21:30:56 -03:00
3fae5b58fe EQUATIONS: Take into account passive scalars in positivity indicators.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-22 18:32:08 -03:00
6bf3afcf0b EQUATIONS: Rename parameter 'csnd' to 'sound_speed'.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-16 16:46:27 -03:00
fda340b21b EQUATIONS: Rename gamma to adiabatic_index.
Keyword 'gamma' is reserved in Fortran for calculating Gamma function.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-16 16:41:28 -03:00
8f33e4aeb5 EQUATIONS: Remove unused variables for 2D case.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-15 01:28:28 -03:00
85d2c958e7 EQUATIONS: Remove unused variables and subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-06 18:31:14 -03:00
961774c7fb EQUATIONS: Make sure Alfven speed is never larger than fast one.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-04 11:16:40 -03:00
b446456f96 EQUATIONS: Remove unnecessary spaces.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-20 13:09:16 -03:00
5f366ab2eb EQUATIONS: Add indicator of positive variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:45:06 -03:00
c2c2a65dbf SCHEMES: Unify subroutine update_flux().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:45:01 -03:00
87216b1b73 EQUATIONS: Add the vector of variable indices for update_flux().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:44:56 -03:00
c54505917a SCHEMES: Use rather subroutines instead of pointers from equations.
Use compatible (for the same set of equations and equation of state) in
Riemann solvers, not the procedure pointers.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:44:23 -03:00
ad37de3a99 EQUATIONS, SCHEMES: Merge speeds cm and cp into one variable.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:43:55 -03:00
f3670ddf37 EQUATIONS: Reorganize variable indices.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-03 10:43:45 -03:00