diff options
author | Erik Schnetter <schnetter@aei.mpg.de> | 2005-03-21 02:08:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@aei.mpg.de> | 2005-03-21 02:08:00 +0000 |
commit | 66a6c39b2267cdc4c17031fed70b8ba46202f119 (patch) | |
tree | 627e956c78312f1b73324e374f3a43a570458f4c /Carpet | |
parent | b21552942961740994d7254b69af3aba4fdd12c2 (diff) |
CarpetLib: Do not check invariant of bboxset class
Checking the invariant of the bboxset class is probably O(N^3) in the
number of bboxes, possibly worse. It is a very slow operation when
there are many components in a simulation, especially with AMR, and
possibly also when running on many processors.
darcs-hash:20050321020814-891bb-c5eb1cde6f3ac064e39a362b19bd20e15d03bc24.gz
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/bboxset.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/bboxset.cc b/Carpet/CarpetLib/src/bboxset.cc index 9a338ee94..76f2a2083 100644 --- a/Carpet/CarpetLib/src/bboxset.cc +++ b/Carpet/CarpetLib/src/bboxset.cc @@ -39,6 +39,8 @@ bboxset<T,D>::bboxset (const bset& bs_): bs(bs_) { // Invariant template<class T, int D> bool bboxset<T,D>::invariant () const { +// This is very slow when there are many bboxes +#if 0 for (const_iterator bi=begin(); bi!=end(); ++bi) { if ((*bi).empty()) return false; if (! (*bi).is_aligned_with(*bs.begin())) return false; @@ -47,6 +49,7 @@ bool bboxset<T,D>::invariant () const { if (! ((*bi2) & (*bi)).empty()) return false; } } +#endif return true; } |