aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Carpet/CarpetLib/src/th.cc18
-rw-r--r--Carpet/CarpetLib/src/th.hh6
2 files changed, 20 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/th.cc b/Carpet/CarpetLib/src/th.cc
index e355221b9..9817e77bb 100644
--- a/Carpet/CarpetLib/src/th.cc
+++ b/Carpet/CarpetLib/src/th.cc
@@ -19,10 +19,24 @@ list<th*> th::allth;
// Constructors
+th::th (gh& h_,
+ bool const time_interpolation_during_regridding_)
+ : h(h_),
+ time_interpolation_during_regridding
+ (time_interpolation_during_regridding_),
+ timelevels(0)
+{
+ reffacts.resize(1, 1);
+ allthi = allth.insert(allth.end(), this);
+ gh_handle = h.add(this);
+}
+
th::th (gh& h_, int const timelevels_, vector<int> const& reffacts_,
bool const time_interpolation_during_regridding_)
- : h(h_), timelevels(timelevels_), reffacts(reffacts_),
- time_interpolation_during_regridding (time_interpolation_during_regridding_)
+ : h(h_),
+ time_interpolation_during_regridding
+ (time_interpolation_during_regridding_),
+ timelevels(timelevels_), reffacts(reffacts_)
{
assert (reffacts.size() >= 1);
assert (reffacts.front() == 1);
diff --git a/Carpet/CarpetLib/src/th.hh b/Carpet/CarpetLib/src/th.hh
index 45ca03915..d925aeab4 100644
--- a/Carpet/CarpetLib/src/th.hh
+++ b/Carpet/CarpetLib/src/th.hh
@@ -37,20 +37,22 @@ public: // should be readonly
gh& h; // hierarchy
gh::th_handle gh_handle;
+ bool const time_interpolation_during_regridding;
+
int timelevels; // const
private:
vector<int> reffacts; // const
- bool const time_interpolation_during_regridding;
-
vector<vector<vector<CCTK_REAL> > > times; // current times [ml][rl][tl]
vector<vector<CCTK_REAL> > deltas; // time steps [ml][rl]
public:
// Constructors
+ th (gh& h, bool time_interpolation_during_regridding);
+
th (gh& h, int timelevels, vector<int> const& reffacts,
bool time_interpolation_during_regridding);