diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-03-18 15:10:52 -0700 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:33 +0000 |
commit | 0707cfeb82f565afec604f39202dafcbef889db0 (patch) | |
tree | 820f1ac0bc04d5f9827e4e00bf1efccb6d76727e /CarpetDev/CarpetMG/src/mg.cc | |
parent | 6b2d5314e79a5547f2fdd1dc4898bdeef74da9f2 (diff) |
Re-organise time level handling
Store the current Cactus time (and not a fake Carpet time) in the th
"time hiearchy". This removes the now redundant "leveltimes" data
structure in Carpet.
Add past time levels to th, so that it can store the time for past
time levels instead of assuming the time step size is constant. This
allows changing the time step size during evolution.
Share the time hierarchy between all maps, instead of having one time
hierarchy per map.
Simplify the time level cycling and time stepping code used during
evolution.
Improve structure of the code that loops over time levels for certain
schedule bins. Introduce a new Carpet variable "timelevel", similar
to "reflevel".
This also makes it possible to avoid time interpolation for the past
time levels during regridding. The past time levels of the fine grid
then remain aligned (in time) with the past time levels of the coarse
grid. This is controlled by a new parameter
"time_interpolation_during_regridding", which defaults to "yes" for
backwards compatibility.
Simplify the three time level initialisation. Instead of initialising
all three time levels by taking altogether three time steps (forwards
and backwards), initialise only one past time level by taking one time
step backwards. The remaining time level is initialised during the
first time step of the evolution, which begins by cycling time levels,
which drops the non-initialised last time level anyway.
Update Carpet and the mode handling correspondingly.
Update the CarpetIOHDF5 checkpoint format correspondingly.
Update CarpetInterp, CarpetReduce, and CarpetRegrid2 correspondingly.
Update CarpetJacobi and CarpetMG correspondingly.
Diffstat (limited to 'CarpetDev/CarpetMG/src/mg.cc')
-rw-r--r-- | CarpetDev/CarpetMG/src/mg.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/CarpetDev/CarpetMG/src/mg.cc b/CarpetDev/CarpetMG/src/mg.cc index d76a10212..07e889e02 100644 --- a/CarpetDev/CarpetMG/src/mg.cc +++ b/CarpetDev/CarpetMG/src/mg.cc @@ -1015,7 +1015,6 @@ namespace CarpetMG { int const tl = 0; for (comm_state state; !state.done(); state.step()) { for (int m=0; m<maps; ++m) { - const CCTK_REAL time = vtt.at(m)->time (tl, reflevel, mglevel); for (int n=0; n<var.size(); ++n) { int const vi = var.at(n); assert (vi >= 0); @@ -1024,7 +1023,7 @@ namespace CarpetMG { int const v0 = CCTK_FirstVarIndexI (gi); assert (v0 >= 0); arrdata.at(gi).at(m).data.at(vi-v0)->ref_restrict_all - (state, tl, reflevel, mglevel, time); + (state, tl, reflevel, mglevel); } // for n } // for m } // for state @@ -1040,9 +1039,9 @@ namespace CarpetMG { { assert (reflevel > 0); int const tl = 0; + CCTK_REAL const time = tt->get_time (mglevel, reflevel, tl); for (comm_state state; !state.done(); state.step()) { for (int m=0; m<maps; ++m) { - const CCTK_REAL time = vtt.at(m)->time (tl, reflevel, mglevel); for (int n=0; n<var.size(); ++n) { int const vi = var.at(n); assert (vi >= 0); |