aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2012-11-18 17:41:45 -0500
committerErik Schnetter <schnetter@gmail.com>2012-11-22 09:59:16 -0500
commit338b03b9e9254785aad9e506c66efdd6867cc188 (patch)
tree35e9758c61e8e56486af86529b06499d7b3d89e0
parent22f99d40d514e1b223b034cb9dfb928984451632 (diff)
CarpetLib: Make th::time_interpolation_during_regridding public
-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);