diff options
author | eschnett <> | 2001-03-01 12:40:00 +0000 |
---|---|---|
committer | eschnett <> | 2001-03-01 12:40:00 +0000 |
commit | ece47455bad491c45b3136362e9239f505de23b9 (patch) | |
tree | 0e121ebd44c2fbb7711943fcd8804e85626daca3 /Carpet/CarpetLib/src/gf.hh | |
parent | 310f0ea48d18866b773136aed11200b6eda6378b (diff) |
Initial revision
darcs-hash:20010301124010-f6438-fca5ed1e25f84efd816aa0d13fc23b58add7195d.gz
Diffstat (limited to 'Carpet/CarpetLib/src/gf.hh')
-rw-r--r-- | Carpet/CarpetLib/src/gf.hh | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/Carpet/CarpetLib/src/gf.hh b/Carpet/CarpetLib/src/gf.hh index 13fc8107e..298c26589 100644 --- a/Carpet/CarpetLib/src/gf.hh +++ b/Carpet/CarpetLib/src/gf.hh @@ -1,11 +1,29 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/gf.hh,v 1.12 2004/03/23 12:40:27 schnetter Exp $ +/*************************************************************************** + gf.hh - Grid Function + data for every element of a data hierarchy + ------------------- + 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/gf.hh,v 1.1 2001/03/01 13:40:10 eschnett 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. * + * * + ***************************************************************************/ #ifndef GF_HH #define GF_HH -#include <assert.h> -#include <math.h> - +#include <cassert> +#include <cmath> #include <iostream> #include <string> @@ -18,13 +36,11 @@ #include "th.hh" #include "vect.hh" -using namespace std; - // A real grid function template<class T,int D> -class gf: public ggf<D> { +class gf: public generic_gf<D> { // Types typedef vect<int,D> ivect; @@ -42,11 +58,7 @@ class gf: public ggf<D> { public: // Constructors - gf (const int varindex, const operator_type transport_operator, - th<D>& t, dh<D>& d, - const int tmin, const int tmax, const int prolongation_order_time, - const int vectorlength, const int vectorindex, - gf* const vectorleader); + gf (const string name, th<D>& t, dh<D>& d, const int tmin, const int tmax); // Destructors virtual ~gf (); @@ -57,14 +69,7 @@ public: protected: - virtual gdata<D>* typed_data (int tl, int rl, int c, int ml) - { - return new data<T,D>(this->varindex, this->transport_operator, - this->vectorlength, this->vectorindex, - this->vectorleader - ? (data<T,D>*)(*this->vectorleader)(tl,rl,c,ml) - : NULL); - } + virtual generic_data<D>* typed_data() { return new data<T,D>; } @@ -79,9 +84,13 @@ public: // Output - virtual ostream& output (ostream& os) const; + virtual ostream& out (ostream& os) const; }; +#if defined(TMPL_IMPLICIT) +# include "gf.cc" +#endif + #endif // GF_HH |