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 /Carpet/Carpet/src/variables.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 'Carpet/Carpet/src/variables.cc')
-rw-r--r-- | Carpet/Carpet/src/variables.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Carpet/Carpet/src/variables.cc b/Carpet/Carpet/src/variables.cc index 0198a6018..c9d82cb16 100644 --- a/Carpet/Carpet/src/variables.cc +++ b/Carpet/Carpet/src/variables.cc @@ -42,6 +42,9 @@ namespace Carpet { // Maps int maps; + // Timelevels + int timelevels; + // Current position on the grid hierarchy @@ -51,6 +54,7 @@ namespace Carpet { int map; int component; int local_component; + int timelevel; // Current refinement factors int timereflevelfact; @@ -68,7 +72,7 @@ namespace Carpet { // Times and spaces on the refinement levels CCTK_REAL global_time; - vector<vector<CCTK_REAL> > leveltimes; // [mglevel][reflevel] + // vector<vector<CCTK_REAL> > leveltimes; // [mglevel][reflevel] CCTK_REAL delta_time; vector<vector<vect<CCTK_REAL,dim> > > origin_space; // [map][mglevel] @@ -109,7 +113,7 @@ namespace Carpet { // The grid hierarchy vector<gh*> vhh; // [map] vector<dh*> vdd; // [map] - vector<th*> vtt; // [map] + th* tt; int regridding_epoch; // Data for the groups @@ -122,6 +126,6 @@ namespace Carpet { // MPI Communicators MPI_Comm comm_universe = MPI_COMM_NULL; - MPI_Comm comm_world = MPI_COMM_NULL; + MPI_Comm comm_world = MPI_COMM_NULL; } // namespace Carpet |