#include #include #include #include #include "cctk.h" #include "defs.hh" #include "gh.hh" #include "th.hh" using namespace std; // Constructors th::th (gh& h_, const vector & reffacts_, const CCTK_REAL basedelta) : h(h_), reffacts(reffacts_), delta(basedelta) { assert (reffacts.size() >= 1); assert (reffacts.front() == 1); for (size_t n = 1; n < reffacts.size(); ++ n) { assert (reffacts.at(n) >= reffacts.at(n-1)); assert (reffacts.at(n) % reffacts.at(n-1) == 0); } h.add(this); } // Destructors th::~th () { h.remove(this); } // Modifiers void th::regrid () { const int old_mglevels = times.size(); times.resize(h.mglevels()); deltas.resize(h.mglevels()); for (int ml=0; ml