653 Commits

Author SHA1 Message Date
Grzegorz Kowal
cf1c08d6ef Slightly rewrite TVD reconstructions. 2011-05-28 09:49:35 -03:00
Grzegorz Kowal
2f78b2bf3c Implement the CENO3 reconstruction.
- the CENO3 reconstruction is based on the 3rd order Convex ENO
   reconstruction presented in Del Zanna & Buciantini, 2002,
   A&A, 390, 1177.
2011-05-28 09:44:20 -03:00
Grzegorz Kowal
8b748dc2d2 Move parameter decay to CONFIG module.
- the parameter decay depends only on alpha_p and cfl parameters and is
   constant for all evolution, so move it to CONFIG module;
2011-05-27 12:59:09 -03:00
Grzegorz Kowal
97306e4262 Remove unnecessary variable from boundary_restrict(). 2011-05-27 12:53:37 -03:00
Grzegorz Kowal
9e9fdce183 Use constant interpolation in boundary_prolong().
- in the corners of prolongated boundaries we use constant
   interpolation, but the remaining part of boundaries is still
   prolongated using the linear interpolation; in this way we solve the
   problem of 90 degree symmetry;
2011-05-26 20:35:48 -03:00
Grzegorz Kowal
37077fda98 Small fixes in boundary_variables(). 2011-05-26 19:41:59 -03:00
Grzegorz Kowal
ecfc9e75ab Rewrite boundary_variables().
- the boundary update goes through levels and updates first from blocks
   at the same levels, then restricts from higher level blocks, then in
   the another round prolongates from blocks at lower levels, and
   finally copies once again from blocks at the same level;
2011-05-26 19:20:31 -03:00
Grzegorz Kowal
fc60dc1b7b Rename pmeta_block, pdata_block to pmeta, pdata in generate_mesh(). 2011-05-26 10:14:37 -03:00
Grzegorz Kowal
e7a057b3d9 Use linear interpolation for boundary prolongation. 2011-05-25 22:32:16 -03:00
Grzegorz Kowal
283713ce07 Try to slightly improve the boundary conditions. 2011-05-25 22:08:31 -03:00
Grzegorz Kowal
a3fead0431 Use linear interpolation for block prolongation. 2011-05-24 14:03:39 -03:00
Grzegorz Kowal
199fe274d5 If uniform mesh is used, copy boundaries only once.
- when the uniform mesh is used, perform the boundary update (copy)
   only once;

 - when the adaptive mesh is used update boundaries between blocks at
   the same levels once before and once after both prolongation and
   restriction;
2011-05-23 12:16:45 -03:00
Grzegorz Kowal
60071ae6f2 Restore previous version of flux_rk3(). 2011-05-22 16:49:18 -03:00
Grzegorz Kowal
99051827f6 Use constant interpolation for block prolongation.
- this removes asymmetries created due to inequalities of
   the interpolation procedure;
2011-05-22 13:03:01 -03:00
Grzegorz Kowal
8e2ecfcd66 Rewrite boundary_variables() to keep the precise symmetries.
- boundary conditions for AMR are non-trivial; before and after
   restrictions and prolongations we need to apply copying around all
   blocks, even those on diagonals; only then we will assure the machine
   precision of 90 and 180 degree rotation symmetry;

 - all steps, copying, prolongation, and restriction, scan all blocks,
   even those which do not need update; this can be probably improved by
   introducing, for example, boundary update dependent on the refinement
   level;
2011-05-22 12:15:41 -03:00
Grzegorz Kowal
58c7aa135c Restore previous version of flux_rk2(). 2011-05-21 22:12:46 -03:00
Grzegorz Kowal
38776b603d Correct flux_rk3() to compute conservative fluxes. 2011-05-19 20:53:38 -03:00
Grzegorz Kowal
9ad6861c8d Correct flux_rk2() to compute conservative fluxes.
- the subroutine flux_rk2() updates one dimensional fluxes using the
   2nd order Runge-Kutta method, and then calculates the averaged flux,
   which is used to update the block variables;
2011-05-19 18:41:51 -03:00
Grzegorz Kowal
01b91a9c94 Add subroutine advance_solution_1d().
- this subroutine advances the solution only along the one direction
   using a directional flux;
2011-05-19 18:35:36 -03:00
Grzegorz Kowal
5ce57da3bc Calculate directional fluxes in update_flux() only.
- instead of calculating all fluxes at once in update_flux(), select
   the direction as a subroutine argument and calculate only the flux
   along this direction;

 - directional fluxes are needed for the directional RK integration of
   the numerical fluxes;

 - update subroutines flux_euler(), flux_rk2(), and flux_rk3() to use
   new update_flux() subroutine;
2011-05-19 18:24:09 -03:00
Grzegorz Kowal
069bc8c887 Pass timestep as an argument to advance_solution(). 2011-05-19 15:00:20 -03:00
Grzegorz Kowal
156d8596ec Small rewrite of correct_flux(). 2011-05-19 09:31:39 -03:00
Grzegorz Kowal
d9077affd5 Slightly rewrite advance_solution(). 2011-05-18 17:03:24 -03:00
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