diff options
author | schnetter <> | 2003-01-03 14:49:00 +0000 |
---|---|---|
committer | schnetter <> | 2003-01-03 14:49:00 +0000 |
commit | d5cb73a42d61d3565e6ef52bac69e7ab84a7a821 (patch) | |
tree | e6ca1fea7027d660f952c5611d8caa6941723f0f /Carpet/CarpetLib/src/th.cc | |
parent | 58469c24e957c469d88961e2fe3029f9e4891f3a (diff) |
Removed the "dimgeneric_*" data types from CarpetLib. They were never
Removed the "dimgeneric_*" data types from CarpetLib. They were never
really used anyway.
Changed "th" into "th<D>".
Renamed "generic_*" to "g*".
Propagated these changes to all other places.
darcs-hash:20030103144936-07bb3-c4d74d2d94a56a898f9bb735666eefc01e2610e2.gz
Diffstat (limited to 'Carpet/CarpetLib/src/th.cc')
-rw-r--r-- | Carpet/CarpetLib/src/th.cc | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/Carpet/CarpetLib/src/th.cc b/Carpet/CarpetLib/src/th.cc index b9a42c4c4..f03bbc7c8 100644 --- a/Carpet/CarpetLib/src/th.cc +++ b/Carpet/CarpetLib/src/th.cc @@ -1,23 +1,4 @@ -/*************************************************************************** - th.cc - Time Hierarchy - information about time levels - ------------------- - begin : Sun Jun 11 2000 - copyright : (C) 2000 by Erik Schnetter - email : schnetter@astro.psu.edu - - $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/th.cc,v 1.9 2002/09/25 19:54:08 schnetter Exp $ - - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/th.cc,v 1.10 2003/01/03 15:49:36 schnetter Exp $ #include <assert.h> #include <math.h> @@ -27,7 +8,7 @@ #include "cctk.h" #include "defs.hh" -#include "dggh.hh" +#include "gh.hh" #include "th.hh" @@ -36,18 +17,21 @@ using namespace std; // Constructors -th::th (dimgeneric_gh* h, const CCTK_REAL basedelta) +template<int D> +th<D>::th (gh<D>* h, const CCTK_REAL basedelta) : h(h), delta(basedelta) { h->add(this); } // Destructors -th::~th () { +template<int D> +th<D>::~th () { h->remove(this); } // Modifiers -void th::recompose () { +template<int D> +void th<D>::recompose () { times.resize(h->reflevels()); deltas.resize(h->reflevels()); for (int rl=0; rl<h->reflevels(); ++rl) { @@ -78,8 +62,9 @@ void th::recompose () { // Output -void th::output (ostream& os) const { - os << "th:" +template<int D> +void th<D>::output (ostream& os) const { + os << "th<" << D << ">:" << "times={"; for (int rl=0; rl<h->reflevels(); ++rl) { for (int ml=0; ml<h->mglevels(rl,0); ++ml) { @@ -90,3 +75,7 @@ void th::output (ostream& os) const { } os << "}"; } + + + +template class th<3>; |