diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-09-03 16:19:15 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:42:31 +0000 |
commit | 11c4d98017cbb86d08e15fd1b549180184b58a26 (patch) | |
tree | 2546a154c6f7bc0bec87de7316125ae7d1453569 /Carpet/CarpetLib/src/th.hh | |
parent | f520477b1c14e02f1495cfa8d3e09f4e21ab34d0 (diff) |
Import Carpet
Ignore-this: 309b4dd613f4af2b84aa5d6743fdb6b3
Diffstat (limited to 'Carpet/CarpetLib/src/th.hh')
-rw-r--r-- | Carpet/CarpetLib/src/th.hh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/th.hh b/Carpet/CarpetLib/src/th.hh index 34e9af999..f1a7b72b7 100644 --- a/Carpet/CarpetLib/src/th.hh +++ b/Carpet/CarpetLib/src/th.hh @@ -25,10 +25,14 @@ ostream& operator<< (ostream& os, const th& t); // The time hierarchy (information about the current time) class th { + static list<th*> allth; + list<th*>::iterator allthi; + public: // should be readonly // Fields gh& h; // hierarchy + gh::th_handle gh_handle; private: @@ -48,9 +52,10 @@ public: // Modifiers void regrid (); + void regrid_free (); // Time management - CCTK_REAL get_time (const int rl, const int ml) const + CCTK_REAL get_time (const int rl, const int ml) const CCTK_ATTRIBUTE_PURE { assert (rl>=0 and rl<h.reflevels()); assert (ml>=0 and ml<h.mglevels()); @@ -69,7 +74,7 @@ public: set_time(rl,ml, get_time(rl,ml) + get_delta(rl,ml)); } - CCTK_REAL get_delta (const int rl, const int ml) const + CCTK_REAL get_delta (const int rl, const int ml) const CCTK_ATTRIBUTE_PURE { assert (rl>=0 and rl<h.reflevels()); assert (ml>=0 and ml<h.mglevels()); @@ -83,7 +88,7 @@ public: deltas.AT(ml).AT(rl) = dt; } - CCTK_REAL time (const int tl, const int rl, const int ml) const + CCTK_REAL time (const int tl, const int rl, const int ml) const CCTK_ATTRIBUTE_PURE { assert (rl>=0 and rl<h.reflevels()); assert (ml>=0 and ml<h.mglevels()); @@ -91,12 +96,14 @@ public: } // Output - size_t memory () const; + size_t memory () const CCTK_ATTRIBUTE_PURE; + static size_t allmemory () CCTK_ATTRIBUTE_PURE; void output (ostream& os) const; }; +inline size_t memoryof (th const & t) CCTK_ATTRIBUTE_PURE; inline size_t memoryof (th const & t) { return t.memory (); |