diff options
author | schnetter <> | 2002-03-11 12:17:00 +0000 |
---|---|---|
committer | schnetter <> | 2002-03-11 12:17:00 +0000 |
commit | 4fd01aecd88bd63bf3f6a79a63657915992a42b6 (patch) | |
tree | 5d9cd07f04aab436382fe93f3f1b1fadc75774ed /Carpet/CarpetLib/src/vect.hh | |
parent | 918fcc78c5afd27cdd931a6bfeb36a2cafa6abb0 (diff) |
Added stream input routines for some CarpetLib containers.
Added stream input routines for some CarpetLib containers.
The regridder now has to explicitly say which boundaries are outer,
and which are internal. This will make outer boundaries on fine grid
possible, and is also necessary when there are multiple grid patches.
Started to add support for arbitrariliy many user-specified refinement
regions. Not yet finished.
The Carpet driver can now handle multiple grid patches.
Added example files for multiple grid patches. They use initial data
that does not "fit" the boundary conditions, and they don't use
multiple refinement levels so far.
Removed old and unused example files in CarpetLib.
darcs-hash:20020311121709-07bb3-18594c42bd7a958ee0840d29e158a343208f5711.gz
Diffstat (limited to 'Carpet/CarpetLib/src/vect.hh')
-rw-r--r-- | Carpet/CarpetLib/src/vect.hh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/vect.hh b/Carpet/CarpetLib/src/vect.hh index f53038741..beee9608d 100644 --- a/Carpet/CarpetLib/src/vect.hh +++ b/Carpet/CarpetLib/src/vect.hh @@ -5,7 +5,7 @@ copyright : (C) 2000 by Erik Schnetter email : schnetter@astro.psu.edu - $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.8 2002/01/09 17:45:42 schnetter Exp $ + $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/vect.hh,v 1.9 2002/03/11 13:17:13 schnetter Exp $ ***************************************************************************/ @@ -33,7 +33,9 @@ using namespace std; // Forward definition template<class T, int D> class vect; -// Output +// Input/Output +template<class T,int D> +istream& operator>> (istream& is, vect<T,D>& a); template<class T,int D> ostream& operator<< (ostream& os, const vect<T,D>& a); @@ -444,6 +446,8 @@ public: return r; } + // Input/Output + void input (istream& is); void output (ostream& os) const; }; @@ -598,6 +602,16 @@ inline vect<TT,D> scan1 (TT (* const func)(TT val, T x), TT val, +// Input +template<class T,int D> +inline istream& operator>> (istream& is, vect<T,D>& a) { + a.input(is); + return is; +} + + + +// Output template<class T,int D> inline ostream& operator<< (ostream& os, const vect<T,D>& a) { a.output(os); |