122 Commits

Author SHA1 Message Date
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
Grzegorz Kowal
92980164c2 Pass pointers to objects as arguments instead of objects.
- in EVOLUTION module subroutines pass pointers to objects as arguments
   instead of objects themself; it should reduce memory operations a
   bit;
2011-05-08 00:15:51 -03:00
Grzegorz Kowal
062ae41acf Rewrite the binaries problem.
- allow for time varying shapes;

 - remove unnecessary configuration parameters for the boundaries
   problem and give the remaining parameters more descriptive names;

 - place the star always in the origin of the coordinate system, which
   is the focus point of the satellite orbit, as well;

 - make the satellite orbiting around the main star with a given period
   discribed by a parameter 'tsat'; the satellite orbit is an elipse
   described by the minimum distance from the focus point 'dsat' and
   eccentricity 'esat';
2011-05-07 12:14:34 -03:00
Grzegorz Kowal
7a729ea0a1 Rewrite subroutine update_shapes() so it works with CONSERVATIVE.
- subroutine update_shapes() has been rewritten so now it works well
   with both CONSERVATIVE=Y and CONSERVATIVE=N;

 - since we are calling update_shapes() only once per step per block
   now, it gives a small performance optimization;
2011-05-07 10:33:49 -03:00
Grzegorz Kowal
0e930499a1 Fix diffusion of Psi in MHD-GLM after last changes.
- the diffusion of Psi in MHD-GLM requires spacial step dxmin, so
   update the diffusion so it works after the last commit changes;

 - call find_new_timestep() after job restart, since some parameters
   could change;
2011-05-07 09:32:10 -03:00
Grzegorz Kowal
1bdc4b8706 Replace update_maximum_speed() with find_new_timestep().
- subroutine update_maximum_speed() has been replaced with
   find_new_timestep(), which first finds the minimum spacial step
   dxmin, then finds the maximum speed in the domain, and finally
   estimates new time step;

 - dx_min has been removed from MESH module, since it is not required
   anymore;
2011-05-07 09:23:16 -03:00
Grzegorz Kowal
8076970c22 Update copyright headers with the new email. 2011-05-05 18:37:53 -03:00
Grzegorz Kowal
afefeff129 Start/stop timers from the inside of evolution subroutines. 2011-05-03 00:01:00 -03:00
Grzegorz Kowal
3cd4923d98 Start/stop timers from the inside of mesh subroutines. 2011-05-02 23:35:48 -03:00
Grzegorz Kowal
44f2455e4f Start/stop timers from the inside of boundry subroutines. 2011-05-02 23:12:00 -03:00
Grzegorz Kowal
5610cbfd4a Add injected energy to total one in adiabatic case.
- if we use forcing in the case of adiabatic equation of state, the
   total energy of each cell must be updated by the kinetic energy
   injected to this cell; otherwise the energy conservation will be
   violated;
2011-05-01 19:21:43 -03:00
Grzegorz Kowal
fe9d53136d Put condition from previous commit in boundary_correct_fluxes(). 2011-05-01 10:44:31 -03:00