706 Commits

Author SHA1 Message Date
Grzegorz Kowal
bbeb181473 Fix a bug in init_implosion(). 2011-05-12 09:45:29 -03:00
Grzegorz Kowal
7abd1386ff Rewrite init_implosion(). 2011-05-12 09:20:16 -03:00
Grzegorz Kowal
fb6a44a675 Replace pointer pblock with pdata in init_problem(). 2011-05-12 09:07:11 -03:00
Grzegorz Kowal
7a656e07c7 Replace argument pointer pblock with pdata in check_ref(). 2011-05-12 09:05:51 -03:00
Grzegorz Kowal
94ef1e83d0 Slightly rewrite init_orszag_tang(). 2011-05-12 09:04:42 -03:00
Grzegorz Kowal
146991d7b9 Slightly rewrite init_turbulence(). 2011-05-12 09:02:01 -03:00
Grzegorz Kowal
62c1aabba4 Use adr(:) to get dr in init_binaries(). 2011-05-12 08:58:13 -03:00
Grzegorz Kowal
355d7c900f Use adr(:) to get dr in shape_binaries(). 2011-05-12 08:55:56 -03:00
Grzegorz Kowal
0055e86ac2 Add adr(:) array in COORDS module.
- adr(:) array is a diagonal distance of cell for each level, i.e.,
   dr = sqrt(dx^2 + dy^2 + dz^2);
2011-05-12 08:52:03 -03:00
Grzegorz Kowal
50c3b4f3bf Use precomputed coordinates in init_multi_current_sheet(). 2011-05-12 08:47:01 -03:00
Grzegorz Kowal
da92634ddb Use precomputed coordinates in init_blast(). 2011-05-11 17:37:27 -03:00
Grzegorz Kowal
0ef1342df2 Use precomputed coordinates in init_reconnection(). 2011-05-11 17:31:25 -03:00
Grzegorz Kowal
dff7771824 Replace pblock with pdata in init_reconnection(). 2011-05-11 17:25:27 -03:00
Grzegorz Kowal
745b208ab8 Replace pblock with pdata in init_binaries(). 2011-05-11 17:24:02 -03:00
Grzegorz Kowal
b20c60404a Use precomputed coordinates in the BINARIES problem. 2011-05-11 17:20:20 -03:00
Grzegorz Kowal
0fc7717100 Move coordinate variables from MESH to new COORDS module.
- a new module COORDS handles the mesh variables which needed to be
   separated from the MESH module since they are used in PROBLEM module,
   which is required by MESH module; this created a circular dependency;
   by introducing a new COORDS module we removed that problem;
2011-05-11 15:32:01 -03:00
Grzegorz Kowal
81ba4935d2 Allow to restart job with more CPUs than the restart files.
- now, if we want to restart a job and use more processors than we used
   while creating restart files, all processors read and recreate meta
   block structure, but only N previously used processors will read data
   block; as soon as the job is restarted, we call redistribute_blocks()
   in order to get equal number of data blocks on each processor;
2011-05-10 17:15:33 -03:00
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