146 Commits

Author SHA1 Message Date
b5caafef4c EVOLUTION: Change real variables to double precision.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-08-04 09:12:05 -03:00
9d2b829179 EVOLUTION: Add check for NaNs in variables if DEBUG=Y.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-07-14 13:25:30 -03:00
ad7125f27b EVOLUTION: Correct line formatting in new_time_step().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-02 11:47:37 -03:00
97054d050d EVOLUTION: Improve the stability for dt_hyd ~ dt_diff.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-06-02 10:37:43 -03:00
d5625ccb9f SOURCES: Implement resistive source term for MHD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-29 12:04:55 -03:00
c292b88cbd SOURCES: Implement simple model of viscosity.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-27 17:53:35 -03:00
81bec38a77 EVOLUTION: Move here update_increment() from SCHEMES.
Subroutine update_increment() was using time information which broke the
source term contribution. It has been moved to module EVOLUTION and its
arguments have been simplified.

The time step is now directly taken into account in the time integration
subroutines.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-05-27 16:29:53 -03:00
8ac8248279 SOURCES: Add initial version of source terms module.
This contains only point mass gravitational acceleration so far, as an
example.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-29 18:35:58 -03:00
f874511673 EVOLUTION: Update primitive variables before boundaries.
The new order is to first, convert the updated conserved variables to
their primitive representation in the block interiors, update boundaries
of the primitive variables, and finally, convert the primitive variables
at the ghost cells to conserved ones.

The change updates the primitive variables in the block interiors before
the boundary update.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-04-09 08:51:04 -03:00
e0ca4b0392 SHAPES: Add new module to handle shapes embedded in domain.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-02-07 12:12:27 -02:00
1ed3747efb EVOLUTION: Turn on the selective update for refined blocks.
Now, the selective update after refinement/derefinement process is on.
Before checking the refinement and update the mesh, We set all blocks to
not be updated. Then, only blocks which are refined or derefined
including all their neighbors, are set to be updated. This reduces the
repeated work, i.e. boundary update and variable conversion, on blocks
which didn't actually change.

After the mesh refinement, boundary and variable update, we mark all
blocks to be updated, so the regular temporal integration process works.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-23 10:58:15 -02:00
d3dc784c5e EVOLUTION: Rewrite subroutine update_variables().
Now, primitive variables are calculated only for the blocks marked to be
updated.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-23 10:56:29 -02:00
c01e0760fe DRIVER, IO: Implement precise snapshot times.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-01-08 18:07:54 -02:00
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