489 Commits

Author SHA1 Message Date
Grzegorz Kowal
75c01885a3 If a block doesn't have parent, do not set its pointer.
- if we are restarting a job and recreating the meta block structure,
   do not associate the parent pointer of blocks which do not have
   parents;
2011-05-10 16:01:31 -03:00
Grzegorz Kowal
352b3634be Move autobalancing to subroutine redistribute_blocks().
- the new subroutine redistribute_blocks() calculates the new
   distribution of blocks among all processors and move data blocks
   which need to be moved to another processor;

 - replace autobalancing in update_mesh() using the new subroutine
   redistribute_blocks();
2011-05-10 14:53:50 -03:00
Grzegorz Kowal
455ebd69b5 Take into account the satellite motion when resetting its velocity.
- in the binaries problem we have to reinitiate the velocity within
   the satellite properly, taking into account not only the speed of
   wind at the surface, but also setting the satellite's velocity due to
   its orbital motion; this produces properly the bow shock in front of
   the satellite, and the new time step is calculated correctly since it
   includes the speed of the satellite;
2011-05-09 19:40:00 -03:00
Grzegorz Kowal
08f705ba20 Normalize velocities withing stars by their radii.
- this will keep the surface wind velocity of the star and satellite
   independent of their radii;
2011-05-09 19:01:13 -03:00
Grzegorz Kowal
22a0e1b2ed Make the satellite orbit really eliptical. 2011-05-09 18:49:28 -03:00
Grzegorz Kowal
09b6955cd4 Remove unneeded coordinate variables in binaries problem. 2011-05-09 18:46:38 -03:00
Grzegorz Kowal
0943c31af0 Calculate properly kinetic energy in shape_binaries(). 2011-05-09 18:36:20 -03:00
Grzegorz Kowal
a521068011 Increase radii in binaries problem if mesh is too coarse.
- in the case when we work in low resolution and the radii of star and
   sattelite are too small we increase them to be equal to the mesh
   size;
2011-05-09 18:34:08 -03:00
Grzegorz Kowal
0657926966 Remove unnecessary pointer in init_problem(). 2011-05-09 18:20:52 -03:00
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