133 Commits

Author SHA1 Message Date
8009d6ff5c EVOLUTION: Rename n and t to step and time, respectively.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-08 17:34:15 -02:00
f422d5d399 EVOLUTION: Nullify pointers in finalize_evolution().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-02 12:18:04 -02:00
788d328f7a Update years in copyright information.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-02 11:52:59 -02:00
360fc7a0c6 PROBLEMS: Rewrite blast problem.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-12 16:09:47 -02:00
e9d48d078f Make MHD equations work.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-12 15:36:55 -02:00
a59220bac3 EVOLUTION: Remove parameter dtini.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-11 22:48:48 -02:00
071a414969 EVOLUTION: Module rewrite.
The time integration method can be chose now through the runtime
parameter 'time_advance'.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-11 10:59:25 -02:00
1bd066f56f Remove dependency of the module VARIABLES.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-10 21:36:35 -02:00
f48950aa4d EQUATIONS: Completely rewrite this module.
Now, module EQUATIONS provides a complet interface for equation systems,
including the definition of the number of equations/independent
variables, variable indices and names, conversion subroutines between
primitive and conservative variables, flux and characteristic speed
calculation, and maximum speed determination.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-10 20:56:37 -02:00
386fd36f5e Update copyright line.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2013-12-10 15:23:28 -02:00
Grzegorz Kowal
92e67b2f36 Fix an MPI bug in new_time_step().
The maximum level was estimated from the list of data blocks.  If we
have many processors, sometimes all blocks could lay at level smaller
than maxlev, what can cause wrong dx_min estimation and desyncronization
between processors.
2012-08-03 02:48:38 -03:00
Grzegorz Kowal
b3a455fa52 Remove unused variables from advance() in EVOLUTION. 2012-08-02 23:45:53 -03:00
Grzegorz Kowal
1d02d28905 Rename subroutine boundary_correct_fluxes() to boundary_fluxes(). 2012-08-01 17:41:56 -03:00
Grzegorz Kowal
88bbafeeb4 Rename module SCHEME to SCHEMES and rewrite it completely. 2012-08-01 16:38:10 -03:00
Grzegorz Kowal
bbed8c41e5 Rewrite module EVOLUTION. Move update_interval() to SCHEME.
Improve subroutine comments and remove unused code.
2012-08-01 12:56:52 -03:00
Grzegorz Kowal
2413de249f Move maxspeed() to module EQUATIONS. 2012-08-01 12:16:38 -03:00
Grzegorz Kowal
fca524da42 Remove all remaining and unused evolution subroutines. 2012-07-31 17:43:11 -03:00
Grzegorz Kowal
abc6c263b0 Remove subroutine evolve(). 2012-07-31 17:40:34 -03:00
Grzegorz Kowal
bc57d406d1 Use primitive variables in maxspeed() and remove cons2prim(). 2012-07-31 16:55:00 -03:00
Grzegorz Kowal
db606cfa1a Use primitive variables in the Riemann solvers.
There is no need to convert conservative variables to primitive ones,
since they are already up to date, so pass primitive variables directly
to Riemann solvers in subroutine update_flux().
2012-07-31 16:49:14 -03:00
Grzegorz Kowal
272b40ddbb Move primitive variable update for all blocks to update_variables(). 2012-07-31 16:38:16 -03:00
Grzegorz Kowal
e0860d9afb Move variable interval calculation to update_interval(). 2012-07-31 16:23:20 -03:00
Grzegorz Kowal
3d5582f230 Remove flag CONSERVATIVE from advance_rk2(). 2012-07-31 16:04:43 -03:00
Grzegorz Kowal
68dc3de4d9 Move flux update of data blocks to update_fluxes(). 2012-07-31 16:02:59 -03:00
Grzegorz Kowal
e3df4f38f2 Update time step after updating primitive variables in advance(). 2012-07-31 15:16:25 -03:00
Grzegorz Kowal
eda9cdcf43 Make subroutine find_new_timestep() private.
Also call it in initialize_evolution().
2012-07-31 15:13:51 -03:00
Grzegorz Kowal
63d1c8c0b1 Implement subroutines advance() and advance_rk2().
Subroutine advance() is a replacement for the subroutine evolve().  It
performs one step variable update by calling the selected integration
method.  So far only 2nd order Runge-Kutta is supported, which is
implemented in subroutine advance_rk2().

Subroutine advance_rk2() advances the conservative variables by one step
using the 2nd order Runge-Kutta method with the boundary update after
each substep.  This results in the reduced number of ghost zones, for
example 2 instead of 4, as in the previous version.
2012-07-31 15:04:40 -03:00
Grzegorz Kowal
4cca807172 Remove module dependency of EVOLUTION on CONFIG. 2012-07-28 11:47:14 -03:00
Grzegorz Kowal
d230bc369e Update primitive variables for each block after each time advance. 2012-07-27 22:33:18 -03:00
Grzegorz Kowal
fc72250516 Rename module PROBLEM to PROBLEMS and update dependencies. 2012-07-27 19:23:11 -03:00
Grzegorz Kowal
10d65b727a Slightly rewrite module EVOLUTION. 2012-07-27 17:01:21 -03:00
Grzegorz Kowal
ff60bb681c Rename module COORDS to COORDINATES. 2012-07-22 22:26:51 -03:00
Grzegorz Kowal
515c82d435 Rewrite module MPITOOLS and adopt the rest to the changes.
Another step of reducing differences between the AMUN and GODUNOV codes.
2012-07-22 19:01:27 -03:00
Grzegorz Kowal
0da52f7aec Rewrite module TIMERS to be compatible with Godunov version. 2012-07-22 15:46:56 -03:00
Grzegorz Kowal
64a098c9bb Rename module TIMER to TIMERS.
Rename internal array timers(:) to times(:) to not conflict with the
module name.
2012-07-22 12:59:15 -03:00
Grzegorz Kowal
dbfbabc613 Change the license to GNU General Public License version 3. 2012-07-22 12:30:20 -03:00
Grzegorz Kowal
1abbafed99 Allow for gradual introduction of the forcing term.
- the new parameter tbfor determines the time when the forcing starts
   to be introduced gradually; the parameter tefor determines at what
   time the forcing operates with the full power; the transition between
   tbfor and tefor is described by sinus function;
2011-06-10 15:46:40 -03:00
Grzegorz Kowal
e5e265bbe5 Add new parameter for the top level.
- the new parameter toplev stores the level of refinement larger or
   equal to maxlev; this level cannot be set in the config.in, but is
   determined during the initiation or restarting the job;

 - several subroutines have been updated to use toplev instead of
   maxlev;
2011-06-06 17:31:51 -03:00
Grzegorz Kowal
8b748dc2d2 Move parameter decay to CONFIG module.
- the parameter decay depends only on alpha_p and cfl parameters and is
   constant for all evolution, so move it to CONFIG module;
2011-05-27 12:59:09 -03:00
Grzegorz Kowal
60071ae6f2 Restore previous version of flux_rk3(). 2011-05-22 16:49:18 -03:00
Grzegorz Kowal
58c7aa135c Restore previous version of flux_rk2(). 2011-05-21 22:12:46 -03:00
Grzegorz Kowal
38776b603d Correct flux_rk3() to compute conservative fluxes. 2011-05-19 20:53:38 -03:00
Grzegorz Kowal
9ad6861c8d Correct flux_rk2() to compute conservative fluxes.
- the subroutine flux_rk2() updates one dimensional fluxes using the
   2nd order Runge-Kutta method, and then calculates the averaged flux,
   which is used to update the block variables;
2011-05-19 18:41:51 -03:00
Grzegorz Kowal
01b91a9c94 Add subroutine advance_solution_1d().
- this subroutine advances the solution only along the one direction
   using a directional flux;
2011-05-19 18:35:36 -03:00
Grzegorz Kowal
5ce57da3bc Calculate directional fluxes in update_flux() only.
- instead of calculating all fluxes at once in update_flux(), select
   the direction as a subroutine argument and calculate only the flux
   along this direction;

 - directional fluxes are needed for the directional RK integration of
   the numerical fluxes;

 - update subroutines flux_euler(), flux_rk2(), and flux_rk3() to use
   new update_flux() subroutine;
2011-05-19 18:24:09 -03:00
Grzegorz Kowal
069bc8c887 Pass timestep as an argument to advance_solution(). 2011-05-19 15:00:20 -03:00
Grzegorz Kowal
d9077affd5 Slightly rewrite advance_solution(). 2011-05-18 17:03:24 -03:00
Grzegorz Kowal
3e586c94d3 Fix finding of dxmin in find_new_timestep(). 2011-05-17 20:26:33 -03:00
Grzegorz Kowal
68a39a28e4 Look for dxmin only once in find_new_timestep(). 2011-05-15 13:55:52 -03:00
Grzegorz Kowal
0fc7717100 Move coordinate variables from MESH to new COORDS module.
- a new module COORDS handles the mesh variables which needed to be
   separated from the MESH module since they are used in PROBLEM module,
   which is required by MESH module; this created a circular dependency;
   by introducing a new COORDS module we removed that problem;
2011-05-11 15:32:01 -03:00