From 4ab603cc49f9deae56190f033fc057e9fa9c43d0 Mon Sep 17 00:00:00 2001 From: schnetter <> Date: Tue, 12 Jun 2001 12:56:00 +0000 Subject: Introduced abstraction classes that have no parameter. This Introduced abstraction classes that have no parameter. This will make it easier to adapte the driver to support multiple dimensions at once. darcs-hash:20010612125655-07bb3-1cba35eb867eca1234b3a40bd7a5641b64776c50.gz --- Carpet/CarpetLib/src/th.hh | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'Carpet/CarpetLib/src/th.hh') diff --git a/Carpet/CarpetLib/src/th.hh b/Carpet/CarpetLib/src/th.hh index 7abb657a5..444b0d1f0 100644 --- a/Carpet/CarpetLib/src/th.hh +++ b/Carpet/CarpetLib/src/th.hh @@ -6,7 +6,7 @@ copyright : (C) 2000 by Erik Schnetter email : schnetter@astro.psu.edu - $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/th.hh,v 1.3 2001/03/27 22:26:31 eschnett Exp $ + $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/th.hh,v 1.4 2001/06/12 14:57:00 schnetter Exp $ ***************************************************************************/ @@ -28,29 +28,27 @@ #include #include "defs.hh" -#include "gh.hh" +#include "dggh.hh" using namespace std; // Forward declaration -template class th; +class th; // Output -template -ostream& operator<< (ostream& os, const th& t); +ostream& operator<< (ostream& os, const th& t); // The time hierarchy (information about the current time) -template class th { public: // should be readonly // Fields - gh &h; // hierarchy + dimgeneric_gh *h; // hierarchy private: @@ -61,7 +59,7 @@ private: public: // Constructors - th (gh& h, const int basedelta); + th (dimgeneric_gh* h, const int basedelta); // Destructors ~th (); @@ -71,14 +69,14 @@ public: // Time management int get_time (const int rl, const int ml) const { - assert (rl>=0 && rl=0 && ml=0 && rlreflevels()); + assert (ml>=0 && mlmglevels(rl,0)); return times[rl][ml]; } void set_time (const int rl, const int ml, const int t) { - assert (rl>=0 && rl=0 && ml=0 && rlreflevels()); + assert (ml>=0 && mlmglevels(rl,0)); times[rl][ml] = t; } @@ -87,14 +85,14 @@ public: } int get_delta (const int rl, const int ml) const { - assert (rl>=0 && rl=0 && ml=0 && rlreflevels()); + assert (ml>=0 && mlmglevels(rl,0)); return deltas[rl][ml]; } int time (const int tl, const int rl, const int ml) const { - assert (rl>=0 && rl=0 && ml=0 && rlreflevels()); + assert (ml>=0 && mlmglevels(rl,0)); return get_time(rl, ml) + tl * get_delta(rl, ml); } @@ -104,8 +102,7 @@ public: -template -ostream& operator<< (ostream& os, const th& t) { +inline ostream& operator<< (ostream& os, const th& t) { t.output(os); return os; } -- cgit v1.2.3