630 Commits

Author SHA1 Message Date
Grzegorz Kowal
ffb197844c Fix error formatting for --config and -c arguments. 2011-05-09 17:48:50 -03:00
Grzegorz Kowal
efd52e038c Fix formatting in printing error, warning or info. 2011-05-09 17:44:06 -03:00
Grzegorz Kowal
58a1b52d0e Add command line argument to set different configuration file.
- now it is possible to change the configuration file from the command
   line using arguments '-c' or '--config'; both arguments require a
   name of configuration file which exists and is valid;
2011-05-09 17:39: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
f809cd024f Fix another problem with the satellite orbit calculation. 2011-05-07 12:59:07 -03:00
Grzegorz Kowal
2ef05c243e Fix a mistake in calculation of the orbit parameters in binaries. 2011-05-07 12:28:56 -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
5e0f4b27ee Make the binaries problem working again. 2011-05-06 23:18:28 -03:00
Grzegorz Kowal
a5992579a8 Store mesh statistics only when they change. 2011-05-06 11:39:30 -03:00
Grzegorz Kowal
67c9ce262d Estimate the remaining execution time using dt.
- the new estimator uses the remaining time, time step and the previous
   step execution time to estimate the remaining execution time; this
   estimate varies much more for the initial steps, and for short
   models, but may better estimate the remaining time for already
   developed models, where the time step and number of blocks do not
   change too much;
2011-05-06 09:51:40 -03:00
Grzegorz Kowal
862bbd264f Add more subroutines to set block fields.
- new subroutines to set ID, cpu, refine, config, etc. have been added
   to the BLOCK module;

 - use new subroutines in read_metablocks_h5();
2011-05-06 09:17:01 -03:00
Grzegorz Kowal
5bdc20c7db Fix bug introduced in 027f115394450c93b9317aa078f8c7ff7c3b3836.
- the problem was demonstrating in the way that after restart the
   number of leafs was set to zero; this was because while recreating
   the meta blocks structure we set nleafs directly instead of using
   metablock_set_leaf(); after using this subroutine we don't need to
   to set nleafs anymore, and the restart continues properly;
2011-05-06 08:50:16 -03:00
Grzegorz Kowal
00cc664b1f Export check_metablock if DEGUB flag is set. 2011-05-06 08:40:21 -03:00
Grzegorz Kowal
6ef7411ad3 Correct comments in init_blocks() and clear_blocks(). 2011-05-05 23:48:10 -03:00
Grzegorz Kowal
d4db46150b More comment fixes in BLOCKS module. 2011-05-05 23:41:42 -03:00
Grzegorz Kowal
b312279c7c Spell fixes and line breaking in the BLOCKS module. 2011-05-05 23:36:44 -03:00
Grzegorz Kowal
8076970c22 Update copyright headers with the new email. 2011-05-05 18:37:53 -03:00
Grzegorz Kowal
027f115394 Reorganize module BLOCKS.
- reorganize order of subroutines and separate them between groups for
   meta and data blocks, refinement, and private functions and
   subroutines;

 - change the copyright header; update to new email address;

 - make all module pointers, variables, and subroutines private and
   allow only for subset of them to be public;

 - improve the description of block structures;

 - add several functions to return module variables such as the number
   of meta and data blocks, the number of leafs, the last id, etc.;

 - update several subroutines from other modules which required some of
   the BLOCK module variables;
2011-05-05 18:25:24 -03:00
Grzegorz Kowal
dcd58927cc Remove remaining dependency of BLOCK on CONFIG modules.
- now, the BLOCK module dependends only on ERROR module; all other
   dependencies have been removed;
2011-05-05 16:59:51 -03:00
Grzegorz Kowal
f590f85b72 Move the level resolution array to MESH module.
- the level resolution array 'res' has been moved to mesh module, where
   it should belong; due to this it needs to be provided as an argument
   to subroutines in BLOCK and PROBLEM modules which use it;

 - the level resolution array stores block resolutions in each
   directions, so it is now a two dimensional array, with the dimensions
   corresponding to the number of levels and number of dimensions;

 - update subroutine write_coordinates_h5() to store the level
   resolution array properly;
2011-05-05 16:51:35 -03:00
Grzegorz Kowal
e28a0a83c8 Make module BLOCKS independent of VARIABLES.
- add a new subroutine set_datablock_dims() to set dimensions of the
   allocatable arrays in data blocks; this subroutine is called from
   init_mesh(), which is the right place to initiate BLOCK module;

 - remove dependency of blocks.o on variables.o;

 - boundaries.o depends on timers.o;
2011-05-05 15:56:38 -03:00
Grzegorz Kowal
67ba2b5422 Module blocks does not depend on mpitools. 2011-05-05 14:26:26 -03:00
Grzegorz Kowal
afefeff129 Start/stop timers from the inside of evolution subroutines. 2011-05-03 00:01:00 -03:00
Grzegorz Kowal
131eb5948c Add the mesh timer to clear_mesh(). 2011-05-02 23:46:16 -03:00
Grzegorz Kowal
61fdca1666 Reorganize the initialization timer execution. 2011-05-02 23:43:58 -03:00
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