diff options
author | shawley <> | 2002-07-18 12:30:00 +0000 |
---|---|---|
committer | shawley <> | 2002-07-18 12:30:00 +0000 |
commit | 3a23570c1712aa4eebbfb8667c6db155f6421640 (patch) | |
tree | 7690cff0947f9f1776f820f6111ee2cf4af0156b | |
parent | 27372695104d5c2f9791a536a2552f6449643184 (diff) |
Ad
darcs-hash:20020718123044-e415b-c9e2ab9f69c32a3773cf372130979c79578ae4fc.gz
-rw-r--r-- | Carpet/Carpet/src/Cycle.cc | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/Carpet/Carpet/src/Cycle.cc b/Carpet/Carpet/src/Cycle.cc index dcece6f13..ab11e4481 100644 --- a/Carpet/Carpet/src/Cycle.cc +++ b/Carpet/Carpet/src/Cycle.cc @@ -8,7 +8,7 @@ #include "carpet.hh" -static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Cycle.cc,v 1.8 2002/06/06 21:04:56 schnetter Exp $"; +static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/Carpet/src/Cycle.cc,v 1.9 2002/07/18 14:30:44 shawley Exp $"; CCTK_FILEVERSION(Carpet_Cycle_cc) @@ -63,5 +63,55 @@ namespace Carpet { } } } + + + void FlipTimeLevelsOnCoarser (const cGH* cgh, const int cur_rl) + { + Checkpoint ("%*sFlipTimeLevels", 2*reflevel, ""); + + for (int group=0; group<CCTK_NumGroups(); ++group) { + if (CCTK_GroupTypeI(group) == CCTK_GF + && CCTK_QueryGroupStorageI(cgh, group)) { + for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) { + + assert (group<(int)arrdata.size()); + assert (var<(int)arrdata[group].data.size()); + for (int rl=0; rl<arrdata[group].hh->reflevels(); ++rl) { + if (rl <= cur_rl) { + for (int c=0; c<arrdata[group].hh->components(rl); ++c) { + arrdata[group].data[var]->flip (rl, c, mglevel); + } + } + } + + } + } + } + } + + void CopyCurrToPrevTimeLevels (const cGH* cgh, const int cur_rl) + { + Checkpoint ("%*sFlipTimeLevels", 2*reflevel, ""); + + for (int group=0; group<CCTK_NumGroups(); ++group) { + if (CCTK_GroupTypeI(group) == CCTK_GF + && CCTK_QueryGroupStorageI(cgh, group)) { + for (int var=0; var<CCTK_NumVarsInGroupI(group); ++var) { + + assert (group<(int)arrdata.size()); + assert (var<(int)arrdata[group].data.size()); + for (int rl=0; rl<arrdata[group].hh->reflevels(); ++rl) { + for (int c=0; c<arrdata[group].hh->components(rl); ++c) { + arrdata[group].data[var]->copytoprevs (rl, c, mglevel); + } + } + + } + } + } + } + + + } // namespace Carpet |