diff options
author | schnetter <> | 2003-03-18 16:30:00 +0000 |
---|---|---|
committer | schnetter <> | 2003-03-18 16:30:00 +0000 |
commit | d961f760bcd487bb10289f3b8b5c18a8efc069fa (patch) | |
tree | e1b2f8c90d916d94197cb830406509588bfa95c0 /Carpet/CarpetLib/src/defs.cc | |
parent | 1a0df29dc7aef45da90b2f8735fccff1b2901e3d (diff) |
Add normalize routine to normalise bboxsets. This isn't perfect yet,
Add normalize routine to normalise bboxsets. This isn't perfect yet,
i.e. it still misses some cases.
Fix bug in calculating the regions that should be restricted to:
exclude all regions used as source for boundary prolongations, even if
these prolongations go to a different processor.
darcs-hash:20030318163025-07bb3-1cfed59a57c2db71d3dae5528e93a570ccb13101.gz
Diffstat (limited to 'Carpet/CarpetLib/src/defs.cc')
-rw-r--r-- | Carpet/CarpetLib/src/defs.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/defs.cc b/Carpet/CarpetLib/src/defs.cc index 3309fb31c..19c79ae7d 100644 --- a/Carpet/CarpetLib/src/defs.cc +++ b/Carpet/CarpetLib/src/defs.cc @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/defs.cc,v 1.14 2003/02/27 22:23:19 shawley Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/defs.cc,v 1.15 2003/03/18 17:30:25 schnetter Exp $ #include <assert.h> #include <ctype.h> @@ -6,6 +6,7 @@ #include <iostream> #include <list> #include <set> +#include <stack> #include <vector> #include "defs.hh" @@ -71,6 +72,18 @@ ostream& output (ostream& os, const set<T>& s) { return os; } +// Stack output +template<class T> +ostream& output (ostream& os, const stack<T>& s) { + stack<T> s2 (s); + list<T> l; + while (! s2.empty()) { + l.insert (l.begin(), s2.top()); + s2.pop(); + } + return output (os, l); +} + // Vector output template<class T> ostream& output (ostream& os, const vector<T>& v) { @@ -96,6 +109,7 @@ template istream& input (istream& os, vector<vector<vect<vect<bool,2>,3> > >& v) template ostream& output (ostream& os, const list<bbox<int,3> >& l); template ostream& output (ostream& os, const set<bbox<int,3> >& s); template ostream& output (ostream& os, const set<bboxset<int,3> >& s); +template ostream& output (ostream& os, const stack<bbox<int,3> >& s); template ostream& output (ostream& os, const vector<int>& v); template ostream& output (ostream& os, const vector<bbox<int,3> >& v); template ostream& output (ostream& os, const vector<list<bbox<int,3> > >& v); |