]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
STLport allocates slightly less memory than necessary, but not overly much, as report...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Aug 2007 01:36:39 +0000 (01:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Aug 2007 01:36:39 +0000 (01:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@14903 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria_levels.cc
deal.II/deal.II/source/grid/tria_objects.cc

index f56eaf43bc96e29f735f971d59d20a4a4883e5d0..bd8c62523c422fe99902feea52e60b14b39dd704 100644 (file)
@@ -78,12 +78,12 @@ namespace internal
               coarsen_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
               ExcMemoryWasted ("coarsen_flags",
                                coarsen_flags.size(), coarsen_flags.capacity()));
-      Assert (neighbors.size() ==  neighbors.capacity() ||
-              neighbors.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (neighbors.size() <=
+             neighbors.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("neighbors",
                                neighbors.size(), neighbors.capacity()));
-      Assert (subdomain_ids.size() ==  subdomain_ids.capacity() ||
-              subdomain_ids.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (subdomain_ids.size() <=
+             subdomain_ids.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("subdomain_ids",
                                subdomain_ids.size(), subdomain_ids.capacity()));
       Assert (2*true_dimension*refine_flags.size() == neighbors.size(),
@@ -161,12 +161,12 @@ namespace internal
               coarsen_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
               ExcMemoryWasted ("coarsen_flags",
                                coarsen_flags.size(), coarsen_flags.capacity()));
-      Assert (neighbors.size() ==  neighbors.capacity() ||
-              neighbors.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (neighbors.size() <=
+             neighbors.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("neighbors",
                                neighbors.size(), neighbors.capacity()));
-      Assert (subdomain_ids.size() ==  subdomain_ids.capacity() ||
-              subdomain_ids.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (subdomain_ids.size () <=
+             subdomain_ids.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("subdomain_ids",
                                subdomain_ids.size(), subdomain_ids.capacity()));
       Assert (2*true_dimension*refine_flags.size() == neighbors.size(),
index edc01981d88700ff49a33d2877a4704f5a09eb5e..66455ffd318360dd40b6abbad04f9490d19c5a4a 100644 (file)
@@ -208,12 +208,12 @@ namespace internal
                                        // they may over-allocate by up to
                                        // as many elements as an integer
                                        // has bits
-      Assert (cells.size() == cells.capacity() ||
-              cells.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (cells.size() <=
+             cells.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("lines",
                                cells.size(), cells.capacity()));
-      Assert (children.size() == children.capacity() ||
-              children.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (children.size() <=
+             children.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("children",
                                children.size(), children.capacity()));
       Assert (used.size() <= used.capacity() + sizeof(int)*8 ||
@@ -248,12 +248,12 @@ namespace internal
                                        // they may over-allocate by up to
                                        // as many elements as an integer
                                        // has bits
-      Assert (cells.size() == cells.capacity() ||
-              cells.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (cells.size() <=
+             cells.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("quads",
                                cells.size(), cells.capacity()));
-      Assert (children.size() == children.capacity() ||
-              children.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (children.size() <=
+             children.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("children",
                                children.size(), children.capacity()));
       Assert (used.size() <= used.capacity() + sizeof(int)*8 ||
@@ -287,12 +287,12 @@ namespace internal
                                        // they may over-allocate by up to
                                        // as many elements as an integer
                                        // has bits
-      Assert (cells.size() == cells.capacity() ||
-              cells.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (cells.size() <=
+             cells.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("hexes",
                                cells.size(), cells.capacity()));
-      Assert (children.size() == children.capacity() ||
-              children.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+      Assert (children.size() <=
+             children.capacity() + DEAL_II_MIN_VECTOR_CAPACITY,
               ExcMemoryWasted ("children",
                                children.size(), children.capacity()));
       Assert (used.size() <= used.capacity() + sizeof(int)*8 ||

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.