2602 Commits

Author SHA1 Message Date
Grzegorz Kowal
3cd4923d98 Start/stop timers from the inside of mesh subroutines. 2011-05-02 23:35:48 -03:00
Grzegorz Kowal
75e405eb24 Correct comments in boundary subroutines. 2011-05-02 23:23:57 -03:00
Grzegorz Kowal
cdb37a405b Start/stop timers from the inside of I/O subroutines. 2011-05-02 23:19:46 -03:00
Grzegorz Kowal
44f2455e4f Start/stop timers from the inside of boundry subroutines. 2011-05-02 23:12:00 -03:00
Grzegorz Kowal
b713da4376 Allow for data file with index 0 as the initial state. 2011-05-02 22:07:52 -03:00
Grzegorz Kowal
50c455fb42 Move data and restart file counter to IO module.
- now the file counters for data and restart files are separated and
   moved to the IO module;

 - the number of arguments to the IO subroutines is reduced to the
   necessary minimum;
2011-05-02 21:54:32 -03:00
Grzegorz Kowal
c0f5d5316b Store and restore cmax.
- the maximum speed in the system 'cmax' is not only used to calculate
   the time step, but also to propagate and diffuse the wave of B
   divergence in the MHD case; therefore we need to store it in the
   attributes of restart files, and then restore it in order to keep
   consistency in the problem evolution;
2011-05-02 11:41:08 -03:00
Grzegorz Kowal
4c95ddafe5 Reset the start time after job restart.
- this improves the estimate for the remaining execution time after job
   restart;
2011-05-01 23:52:58 -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
16ec922b2f Fix a bug introduced in 58cfb07e9ab54a0cb77775f78bdb9e6105c89309.
- the order of flags CONSERVATIVE was wrong in the subroutines
   calculating numerical fluxes;
2011-05-01 16:56:34 -03:00
Grzegorz Kowal
c157c7d0f2 Add support for MPI to boundary_correct_fluxes().
- the initial version of MPI in boundary_correct_fluxes() works well,
   but it needs some rewriting, since the amount of data send between
   processors is definitely to large;
2011-05-01 16:07:28 -03:00
Grzegorz Kowal
fe9d53136d Put condition from previous commit in boundary_correct_fluxes(). 2011-05-01 10:44:31 -03:00
Grzegorz Kowal
0b378f75a6 Don't correct fluxes on uniform mesh. 2011-05-01 10:33:21 -03:00
Grzegorz Kowal
0ac2cfd209 Implement flux integration using RK3 method. 2011-05-01 10:31:27 -03:00
Grzegorz Kowal
39c629f3a2 Add magnetic terms to advance_solution() and update_solution(). 2011-05-01 09:44:19 -03:00
Grzegorz Kowal
48e88de4de Include forcing term in update_solution(). 2011-05-01 09:24:11 -03:00
Grzegorz Kowal
e6408438c9 Implement flux integration using RK2.
- implement subroutine flux_rk2() which calculates fluxes at time t and
   t + dt and averages them; then the calculated flux is passed to
   variable update;

 - implement subroutine advance_solution() which advances an array of
   conserved variables using fluxes provided as an argument;

 - use advance_solution() in update_solution();
2011-05-01 08:57:14 -03:00
Grzegorz Kowal
ed4c3d23af Implement subroutines to correct boundary fluxes.
- subroutine boundary_correct_fluxes() sweeps over all leafs and if it
   finds that a neighbor is at higher level, performs a correction of
   the numerical flux of current block in this direction; this
   subroutine does not support MPI yet!;

 - subroutine correct_flux() performs the atual correction of the
   numerical flux; only part belonging to domain is updated, since ghost
   zones are updated anyway in the next step during the variable update;

 - call boundary_correct_flux() from evolve();
2011-04-30 15:10:02 -03:00
Grzegorz Kowal
735605c575 Add one step update of conserved variables.
- after calculating an integrals of fluxes with a given order we
   performed one step updated of the conserved variables stored in data
   blocks using corresponding numerical flux stored in the same data
   block; the subroutine which performs update is called
   update_solution();
2011-04-30 13:14:07 -03:00
Grzegorz Kowal
5953dfc817 Implement flux integration using Euler method.
- subroutine flux_euler() integrates the numerical flux using the first
   order Euler method;
2011-04-30 12:53:17 -03:00
Grzegorz Kowal
58cfb07e9a Return fluxes instead of their derivatives if CONSERVATIVE=Y.
- if the flag CONSERVATIVE is enable, we need to return the numerical
   fluxes instead of their derivatives; the directional derivatives are
   calculated after sunchronization of the flux;
2011-04-30 12:49:29 -03:00
Grzegorz Kowal
ed429e795e Add a subroutine to calculate numerical fluxes.
- the subroutine update_flux() in the SCHEME module calculates
   numerical fluxes from the conserved variables; the calculated fluxes
   are then returned;
2011-04-30 12:28:02 -03:00
Grzegorz Kowal
8f86cb231e Add an array for numerical fluxes to block structure.
- the purpose of a new allocatable array in the block structure is to
   store the numerical fluxes, which need to be synchronized, and then
   used to update conserved variables in a conservative way;
2011-04-30 12:11:57 -03:00
Grzegorz Kowal
cf3abbf138 Introduce directional indices inx, iny, and inz. 2011-04-30 12:06:56 -03:00
Grzegorz Kowal
0494df3285 Add CONSERVATIVE flag to the build system.
- CONSERVATIVE flag determines if the scheme must be fully
   conservative; this works only when adaptive mesh is used; in such a
   case instead of update variables at each block, we first calculate
   high order integration of fluxes, then we synchronize them between
   blocks at different levels, and finally we perform one-step update
   for each block using updated fluxes; this might be also a first step
   to implement Galerkin methods;
2011-04-30 11:45:48 -03:00
Grzegorz Kowal
72e0038d2f Add SIGNALS flag to default host file. 2011-04-29 15:01:06 -03:00
Grzegorz Kowal
fc32225dc1 Change the license to GNU General Public License, version 2. 2011-04-29 11:21:30 -03:00
Grzegorz Kowal
31ea11db57 Implement proper termination with restart file.
- the program now handles properly some of the termination signals,
   which means that if the program receives a signal to terminate its
   execution, it will finish the current loop, write restart files,
   end then exit properly;
2011-04-29 00:51:28 -03:00
Grzegorz Kowal
6538a9a9c4 Do not print info about generated mesh.
- this information is stored in mesh.log now;
2011-04-28 12:18:55 -03:00
Grzegorz Kowal
4406f4cedd Implement a log file for storing mesh statistics.
- a new file 'mesh.log' is created with the following colums: step,
   time, the number of leafs, the number of meta blocks, the coverage
   efficiency, which is the number of leafs divided by the number of top
   level blocks covering the whole domain, the AMR efficiency which
   shows the advantage of using adaptive mesh (with boundaries taken
   into account), block distribution over levels and processors;

 - the AMR efficiency is the number of leafs multiplied by the number of
   cells in one block (with boundaries included) and divided by the
   effective resolution with boundaries included; if this parameter is
   smaller than 1.0 we should expect faster calculations due to the
   adaptive mesh, if the parameter is larger than 1.0, we only slow down
   the calculations by using the adaptive mesh;
2011-04-28 12:04:22 -03:00
Grzegorz Kowal
01e290aa4d Rename subroutine init_coords() to init_mesh(). 2011-04-27 22:39:25 -03:00
Grzegorz Kowal
ef387eb448 Rename subroutine init_mesh() to generate_mesh(). 2011-04-27 22:35:38 -03:00
Grzegorz Kowal
50b44c814e Use eps instead of 0.0 in determining local extrema.
- it seems that when we compare side derivatives for interpolated
   states to zero, there are some problems with symmetry; using a small
   value 'eps' instead of 0.0 solves this problem;
2011-04-26 20:54:02 -03:00
Grzegorz Kowal
4e54018330 Perform the refinement step only if maxlev > 1. 2011-04-26 12:37:25 -03:00
Grzegorz Kowal
e43f5a76e4 Mark the point of restart in the integrals file. 2011-04-26 12:22:50 -03:00
Grzegorz Kowal
6acbc9dc3b Fix forcing term in subroutine evolve_rk2(). 2011-04-26 11:50:57 -03:00
Grzegorz Kowal
f4631876fc Store integrals after the initiation of a problem. 2011-04-26 11:38:16 -03:00
Grzegorz Kowal
1729a53b67 Allow for appending the integrals for restarted jobs. 2011-04-26 11:37:27 -03:00
Grzegorz Kowal
2c715155e0 Small correction of the initial info printing. 2011-04-26 10:41:10 -03:00
Grzegorz Kowal
72ca908bc6 Add forcing terms after the main update.
- change order of calculating terms; first perform the main update
   of the conserved variables, then add forcing and source terms; in
   this way we do not change time step which determines the stability of
   scheme before the conserved variables enter Riemann solver; this is
   especially important in highly supersonic simulations, when in the
   presence of very low density, even small change of velocity can make
   the scheme numerically unstable;
2011-04-26 10:36:16 -03:00
Grzegorz Kowal
3409368815 Prevent from creating local extrema in MP reconstructions. 2011-04-26 09:19:09 -03:00
Grzegorz Kowal
a39a88a72d Change total cover blocks to maximum cover blocks. 2011-04-25 22:22:32 -03:00
Grzegorz Kowal
037723c1f0 Improve printing info about resolution and block structure. 2011-04-25 19:01:56 -03:00
Grzegorz Kowal
0ff433e16b Rename the code from Godunov-AMR to AMUN. 2011-04-25 13:44:34 -03:00
Grzegorz Kowal
8c6ebc3768 Improve program and module setup information formatting. 2011-04-25 13:31:41 -03:00
Grzegorz Kowal
de2be2f4dd Recalculate block coordinates after changing maxlev. 2011-04-24 20:36:13 -03:00
Grzegorz Kowal
fa01b0e205 Fix correction of FLUX in Makefile. 2011-04-24 09:59:45 -03:00
Grzegorz Kowal
09d477cb9c After the main loop store only restart files.
- in this way we keeps consistency in the file numbering;
2011-04-24 09:56:58 -03:00
Grzegorz Kowal
1237cbc5c8 Find the maximum speed only after problem initialization.
- this step is not required after job restart, since time and time
   steps are stored in the restart files;
2011-04-24 09:45:24 -03:00
Grzegorz Kowal
6bb85024d5 Restore random generator seeds during job restart.
- implement new subroutine read_attribute_vector_integer_h5() to read
   an integer vector attribute;
2011-04-24 09:42:27 -03:00