1511 Commits

Author SHA1 Message Date
5056ac452b EQUATIONS: Make optional arguments really optional in fluxspeed().
This commit makes the optional arguments working only in classical systems.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-10 07:07:10 -02:00
5957461d92 REFINEMENT: Add vorticity based criterion.
Also, calculate vorticity and current density assuming dx=dy=dz=1, so
the criterion value is level independent.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-09 07:41:46 -02:00
224cc37b53 INTERPOLATIONS: Remove unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 09:54:35 -02:00
c382b714ad INTERPOLATIONS: Use tridiag() solver in CRWENO5NS reconstruction.
Also fix the matrix coefficient calculation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 09:53:34 -02:00
e3d91d48f1 INTERPOLATIONS: Use tridiag() solver in CRWENO5YC reconstruction.
Also fix the matrix coefficient calculation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 09:23:13 -02:00
52f520f215 INTERPOLATIONS: Use tridiag() solver in CRWENO5Z reconstruction.
Also fix the matrix coefficient calculation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 09:14:48 -02:00
a00dc32c71 INTERPOLATIONS: Use tridiag() solver in CRMP5 reconstruction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 08:21:39 -02:00
eb118745a1 ALGEBRA: Add tridiagonal linear system solver.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-08 08:03:08 -02:00
68b56b08ce INTERPOLATIONS: Fix weigth coeffcients in compact WENO methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-06 12:28:26 -02:00
5794ab4b13 INTERPOLATIONS: Fix weigth coeffcients in explicit WENO methods.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-06 12:03:59 -02:00
132cd3326f Revert "INTERPOLATIONS: Correct weights in WENO5Z reconstruction."
This reverts commit 9cf1eb846a3eec90f30f9fe6499adefc3ecc5519.
2015-12-06 11:44:45 -02:00
9cf1eb846a INTERPOLATIONS: Correct weights in WENO5Z reconstruction.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-06 11:17:37 -02:00
eaf4f7adfa INTERPOLATIONS: Implement 5th order Compact MP method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-04 17:52:21 -02:00
33576cecc3 INTERPOLATIONS: Implement 5th order Monotonicity Preserving method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-04 17:32:27 -02:00
ea66b5b169 BLOCKS: Do not mark neighbors of refined/derefined blocks for update.
The previous commit fixes the problem with updating boundaries for
changed blocks. It means that we don't need to mark all their neighbors
for update as well.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-04 10:21:46 -02:00
bbc09f5585 BOUNDARIES: Update boundaries if any of block has update flag set.
We can have a situation when the whole block was changed and its update
flag was set. The boundaries of the block have to be updated too,
however, the neighbor's update flag is unset. This creates a undesired
situation of the block boundaries not being updated.

Just check if either the block or its neighbor has been set to update to
avoid the above situation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-12-04 10:09:43 -02:00
81f79dee7c PARAMETERS: Support "" and '' in string parameters.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-07-03 17:00:01 -03:00
04998c29c1 README: Add point about special relativity support.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-24 17:01:01 -03:00
929789c116 IO: Store the equation system and equation of state among attributes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-24 16:53:58 -03:00
647fa7a2ea IO: Add subroutine to store string attributes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-24 16:53:16 -03:00
a76063783e EQUATIONS: Make variable eos unique.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-24 16:15:43 -03:00
2005abf687 EQUATIONS: Make variable eqsys unique.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-24 16:12:25 -03:00
6e20fa26a9 Rename LICENSE to LICENSE.md.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-15 21:55:59 -03:00
7947b7126d Rename README to README.md.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-15 21:55:10 -03:00
f7ef45c559 MESH: Fix indices to fill the borders in restrict_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-08 20:13:43 -03:00
4a5cec8168 EVOLUTION: No need to initialize fluxes in update_fluxes().
The fluxes are already initialized in update_flux().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-05 19:09:46 -03:00
95deee8113 SCHEMES: Initialize fluxes in update_flux() subroutines.
Make the flux f(:,:,:,:) output argument only.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-05 19:07:30 -03:00
ff9483e95c MESH: Fill the block borders in restrict_block().
Since the borders are undefined, it is better to fill them with the copy
of the last available boundary layers. Even though they will be later
updated by the boundary update, it eliminates the possibilty of
propagating NaNs inside the blocks.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-05 18:59:31 -03:00
a42e6a0a16 EQUATIONS: Fill the block borders in update_primitive_variables().
This should not be normally required, but it helps to avoid the
unexpected appearance of NaNs and the code execution termination due
to the floating point exceptions.

This should also help with more advanced open boundary conditions (such
as the conditions which keep the divergence or curl of vector fields
zero).

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-06-05 18:41:39 -03:00
8678de92f5 EVOLUTION: Initialize array %f(:,:,:,:,:) in update_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-27 18:22:55 -03:00
769e69d704 EVOLUTION: Initialize array du in update_increment().
We do not update all elements of array du(:,:,:,:) in
update_increment(), therefore some of its elements may be NaNs. Make
sure that all elements have arithmetic representation by initializing
du(:,:,:,:) with zeros.

Also, indicate that array du(:,:,:,:) is only output argument.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-27 17:58:30 -03:00
309b6b2e0b UTILS: Add assert_array_3d() to assert interface.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-27 16:33:03 -03:00
59ffba724d UTILS: New module with utility subroutines.
The initial version provides assertion subroutines.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-27 15:34:23 -03:00
4534110d28 EQUATIONS: Pass time and time increment to update_shapes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-16 15:58:01 -03:00
c48aa3ee8a EVOLUTION: Update shapes after updating boundaries.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-16 10:31:16 -03:00
8bc24eeb80 SCHEMES: In HD and MHD we reconstruct states using primitive variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-11 10:38:09 -03:00
2e4dfbdc09 EVOLUTION: Move boundary_variables() to update_variables().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-11 07:33:29 -03:00
b1f397e7f8 SHAPES: Calculate conserved variables for jet only once.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-11 07:03:24 -03:00
190f1ba644 INTERPOLATIONS: Rename limiter() to limiter_tvd().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 10:12:20 -03:00
408760bf15 INTERPOLATIONS: Make the prolongation limiter independent.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 10:05:22 -03:00
f574dc2a33 INTERPOLATIONS: Make the extrema clipping limiter independent.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 09:43:39 -03:00
9c7962915d INTERPOLATIONS: Apply TVD reconstruction to clipped extrema.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 08:33:26 -03:00
99cc1ca2ab INTERPOLATIONS: Make sure MC, VL, and SB limiters do not overshoot.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-10 08:09:43 -03:00
573873f76b EQUATIONS: Use pressure from energy in lower bracket estimation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-04 12:35:29 -03:00
38a89bad1c EQUATIONS: Use maximum estimated root as the lower bracket.
In nr_initial_brackets_srmhd_adi() we estimate the lower bracket, which
guarantees the physical solution, from the pressure positivity derived
from both, the equation of state and the total energy. We take the
maximum of them as the lower bracket.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-04 11:03:41 -03:00
12fc4838fe EQUATIONS: Print input parameters if the bracket solution fails.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-02 13:07:04 -03:00
62d224dbee EQUATIONS: Use energy equation to calculate pressure.
In cons2prim_srmhd_adi() we use the energy equation to calculate the
pressure. If the enthalpy was calculated exactly, this the energy
equation gives pressure equal to the one obtained from the equation of
state. If the physical state couldn't be solved, the returned enthalpy
guarantees that the state is physical (v<1, p>0), but the solution
violates the equation of state.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-02 13:00:37 -03:00
366dbdbd38 EQUATIONS: Use energy equation to find the lower bracket for W.
The equation for total energy gives another condition for the positivity
of pressure which is a cubic function.  This condition is somewhat
stronger than the condition coming from the pressure equation and
costs less computationally.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-02 12:43:28 -03:00
61ca7eae12 EQUATIONS: Check pressure positivity in cons2prim_srmhd_adi().
If the pressure is negative or zero, print a warning and set it to the
minimum allowed value pmin.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-05-02 11:47:24 -03:00
e47d7dc28a EQUATIONS: Fix mistake in coefficients in nr_initial_brackets_srmhd_adi().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2015-04-30 18:49:01 -03:00