643 Commits

Author SHA1 Message Date
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
Grzegorz Kowal
92265694eb Correct get_seeds() and add set_seeds() subroutines. 2011-04-24 09:12:32 -03:00
Grzegorz Kowal
9688dfbe2f Correct setting the number of seeds in init_generator(). 2011-04-24 09:07:59 -03:00
Grzegorz Kowal
042a520be7 Store random number generator seed in HDF5 files.
- the number of seeds and seed values must be stored in the restart
   file in order to restart a job properly and guarantee unchanged
   generation of random numbers after restart;
2011-04-24 09:02:35 -03:00
Grzegorz Kowal
4de25ba527 Correct the next file number after restart. 2011-04-23 23:34:18 -03:00
Grzegorz Kowal
a60b17998d Store position of meta block in restart files, as well. 2011-04-23 23:31:06 -03:00
Grzegorz Kowal
10a4d6b09f Move forcing and integrals initialization before problem setup. 2011-04-23 23:11:22 -03:00
Grzegorz Kowal
e25bc4f573 Merge branch 'master' into 'job_restart'.
Conflicts:
	src/driver.F90
2011-04-23 21:56:57 -03:00
Grzegorz Kowal
768312ef7f Move initialization of same variables just after read_params(). 2011-04-23 21:54:45 -03:00
Grzegorz Kowal
eaeae39aae Reset neighbor pointers of the refined block.
- this prevents storing wrong neighbors IDs in the HDF5 files;
2011-04-23 21:48:51 -03:00