721 Commits

Author SHA1 Message Date
Grzegorz Kowal
dc8a5830a4 Implement job restart with decrease of maxlev.
- in some rare situations we want to restart a job with the maximum
   refinement level decreased; this change implements this feature; the
   blocks are read with the previous range of refinement levels, but
   after the first mesh update all blocks which lay on levels higher
   than maxlev are automatically derefined;
2011-06-06 18:39:17 -03:00
Grzegorz Kowal
e5e265bbe5 Add new parameter for the top level.
- the new parameter toplev stores the level of refinement larger or
   equal to maxlev; this level cannot be set in the config.in, but is
   determined during the initiation or restarting the job;

 - several subroutines have been updated to use toplev instead of
   maxlev;
2011-06-06 17:31:51 -03:00
Grzegorz Kowal
9382cf3297 Refine all blocks at levels lower than minlev. 2011-06-06 17:05:49 -03:00
Grzegorz Kowal
c3e21e6408 Add parameter for the minimum refinement level. 2011-06-06 16:54:16 -03:00
Grzegorz Kowal
0a6f244f35 Allow for restart with less CPUs than restart files.
- the files corresponding to the processors are read in a normal way,
   however, the remaining files are read only on the last processor and
   the data blocks stored there are appended to this processor; as soon
   as the data block restoring finishes, the data blocks are
   redistributed among all processors;
2011-06-06 14:32:42 -03:00
Grzegorz Kowal
bbe7b6f92a Allocate restart data blocks in read_datablocks_h5().
- move allocation of restarted data blocks from read_attributes_h5() to
   read_datablocks_h5(); in this way we allocate data blocks only on the
   processors which read the data block group;

 - add a new subroutine read_datablock_dims_h5() which returns the
   dimensions of variable arrays stored in the data block group;
2011-06-06 13:20:15 -03:00
Grzegorz Kowal
0ae3872393 Optimize a bit the MP reconstructions. 2011-05-31 12:38:20 -03:00
Grzegorz Kowal
7848be9bea Optimize the WENO-Z reconstruction.
- the optimization gives about 35% speed up;
2011-05-30 12:29:50 -03:00
Grzegorz Kowal
494af11fa4 Optimize the WENO3 reconstruction.
- the optimization gives roughly 30% speed up;
2011-05-30 09:21:06 -03:00
Grzegorz Kowal
0eba0ca1e3 Compare to eps instead of 0.0 in CENO3 reconstruction. 2011-05-29 23:03:23 -03:00
Grzegorz Kowal
d17c501e6c Optimize the CENO3 reconstruction.
- optimization speeds up the CENO3 reconstruction by about 35%;
2011-05-29 22:49:41 -03:00
Grzegorz Kowal
3df4e1e4d8 Add timers for reconstruction and Riemann solver. 2011-05-29 12:22:50 -03:00
Grzegorz Kowal
980c9464c0 Correct interpolation coefficients for ENO methods. 2011-05-29 12:09:35 -03:00
Grzegorz Kowal
622d9bd86f Correct year in the reference of WENO3 reconstruction. 2011-05-28 19:39:19 -03:00
Grzegorz Kowal
86f880f4e6 Implement improved 5th order WENO-Z reconstruction.
- the implemented WENO-Z reconstruction as described by Borges at al.,
   2008, Journal of Computational Physics, 227, 3191
2011-05-28 19:37:51 -03:00
Grzegorz Kowal
2367983dfb Implement improved 3rd order WENO reconstruction.
- the improved 3rd order WENO reconstruction has been described in the
   paper by Yamaleev & Carpenter, 2000, Journal of Computational
   Physics, 228, 3025
2011-05-28 17:42:13 -03:00
Grzegorz Kowal
fef1ab3669 Rewrite a bit the CENO3 reconstruction. 2011-05-28 17:13:06 -03:00
Grzegorz Kowal
109ec2f113 Split reconstructions into separate subroutines. 2011-05-28 16:45:49 -03:00
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