530 Commits

Author SHA1 Message Date
Grzegorz Kowal
ab957aea06 Merge branch 'master' into boundaries 2011-05-17 21:08:40 -03:00
Grzegorz Kowal
6c68231c6a Reduce number of local variables in binaries problem. 2011-05-17 21:01:20 -03:00
Grzegorz Kowal
acbce0c125 Fix initial angular velocity in init_binaries(). 2011-05-17 20:29:41 -03:00
Grzegorz Kowal
3e586c94d3 Fix finding of dxmin in find_new_timestep(). 2011-05-17 20:26:33 -03:00
Grzegorz Kowal
e68a189916 Implement Keplerian orbit for the satellite in binaries problem.
- now the satellite changes positions and velocity accordind to Keplers
   laws; correct Keplerian orbit has been implemented in
   shape_binaries();

 - correct initialization of the satellite in init_binaries();
2011-05-17 20:23:44 -03:00
Grzegorz Kowal
8ba555a67c Remove subroutine bnd_prol() since it is not used anymore. 2011-05-17 14:27:37 -03:00
Grzegorz Kowal
70f3098d31 Remove unnecessary case conditions from boundary_variables(). 2011-05-17 14:14:01 -03:00
Grzegorz Kowal
8c4e774d1f Make the boundary prolongation work correctly.
- now a more efficient boundary prolongation works correctly both for
   the uni- and multiprocessor runs;

 - the only difference now, however, since we are using a constant
   interpolation for the prolongation, is that the criterion for the
   refinement does not oscilate so much, but keeps the block at higher
   level until the fields are completely smooth; thus, the possibility
   of using linear interpolation should be reinvestigated;

 - the implemented method removes the necessity of repeating the
   prolongated boundary update twice;
2011-05-17 13:44:40 -03:00
Grzegorz Kowal
614c7455de Add subroutine boundary_prolong().
- this subroutine takes the input array and expands it to match the
   size of the boundary of the current block; the expansion is done with
   the constant interpolation;

 - this subroutine is required to reduce the amount of data transfered
   between processors;
2011-05-17 12:20:04 -03:00
Grzegorz Kowal
405d962804 Remove bnd_rest() since it is not used anymore. 2011-05-17 11:43:31 -03:00
Grzegorz Kowal
7e43396302 Use boundary_restrict() for boundary update on different CPUs.
- the new version reduces the data transfer between processors by a big
   factor when we restrict neighbors data in order to update the current
   block boundary; this commit implements this optimization for the
   blocks belonging to different processors;
2011-05-17 11:39:45 -03:00
Grzegorz Kowal
2efb1cc21d Use boundary_restrict() for boundary update on the same CPU. 2011-05-17 11:20:19 -03:00
Grzegorz Kowal
9ec06d0d56 Add subroutine boundary_restrict().
- this subroutines restricts the data from neighbor in order to update
   the current block boundary; this function does the same as
   bnd_rest(), but passes only the subdomain which is used for
   restriction;
2011-05-17 10:52:49 -03:00
Grzegorz Kowal
3964342fb1 Remove bnd_copy() since it is not required anymore. 2011-05-16 18:54:14 -03:00
Grzegorz Kowal
062dde34e5 Rewrite the exchange of data for copying boundaries.
- this rewrite minimizes the amount of data transfered between
   processors for boundary update between blocks at the same level;
2011-05-16 18:51:59 -03:00
Grzegorz Kowal
36ee73800d Add subroutine boundary_copy() and use it.
- this subroutine does exactly the same as bnd_copy, i.e. copies domain
   from a neighbor at the same level to the boundary of the current
   block, but instead of passing the whola array U it passes only the
   part of the domain which will update the boundary;
2011-05-16 16:33:55 -03:00
Grzegorz Kowal
89d6be4ff0 Rewrite subroutine boundary_variables().
- separate the boundaries for different level differences between the
   updated block and its neighbor in order to prepare this subroutine
   for sending only minimum required subvolume of variables between
   processors;
2011-05-16 13:38:59 -03:00
Grzegorz Kowal
00e9457d46 Merge branch 'master' into boundaries 2011-05-15 14:01:50 -03:00
Grzegorz Kowal
68a39a28e4 Look for dxmin only once in find_new_timestep(). 2011-05-15 13:55:52 -03:00
Grzegorz Kowal
957ae55b4b Rewrite specific boundary conditions.
- change the subroutine name to boundary_specific;

 - rewrite the subroutine in order to minimize unnecessary calculations;
2011-05-15 13:54:05 -03:00
Grzegorz Kowal
af1e78a2f8 Reduce the amount of data exchanged in the flux update. 2011-05-14 21:36:10 -03:00
Grzegorz Kowal
fae2fb8ca2 Do not call redistribute_blocks() if MPI is off. 2011-05-14 19:37:40 -03:00
Grzegorz Kowal
740236958c Add new subroutine read_restart_params_h5().
- this subroutine reads the number of processors and the maximum level
   from the first restart file; these two parameters are required
   before restoring the data for a job restart if we want to restart it
   with a different number of processors or with a different maximum
   level;
2011-05-13 16:04:04 -03:00
Grzegorz Kowal
3dcd8ad2b9 Improve compatibility with Fortran 2003. 2011-05-13 15:25:09 -03:00
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