]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
return to old behavior
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2007 19:08:59 +0000 (19:08 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Sep 2007 19:08:59 +0000 (19:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@15231 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/vector_memory.h
deal.II/lac/source/vector_memory.cc

index 852eb042f6c5aab7a5c317d3c795296fde8aa1e4..0210ba93ce5cbe4ce5a56b8c6993f13a7707bf64 100644 (file)
@@ -215,7 +215,7 @@ class PrimitiveVectorMemory : public VectorMemory<VECTOR>
  * earliest possible time and may therefore lead to an increased
  * overall memory consumption.
  * 
- * @author Guido Kanschat, 1999
+ * @author Guido Kanschat, 1999, 2007
  */
 template<class VECTOR = dealii::Vector<double> >
 class GrowingVectorMemory : public VectorMemory<VECTOR>
@@ -227,7 +227,8 @@ class GrowingVectorMemory : public VectorMemory<VECTOR>
                                      * certain number of vectors. The
                                      * default is not to do this.
                                      */
-    GrowingVectorMemory (const unsigned int initial_size = 0);
+    GrowingVectorMemory (const unsigned int initial_size = 0,
+                        const bool log_statistics = true);
 
                                     /**
                                      * Destructor.
@@ -321,9 +322,10 @@ class GrowingVectorMemory : public VectorMemory<VECTOR>
 
 
 template <typename VECTOR>
-GrowingVectorMemory<VECTOR>::GrowingVectorMemory (const unsigned int initial_size)
+GrowingVectorMemory<VECTOR>::GrowingVectorMemory (const unsigned int initial_size,
+                                                 const bool log_statistics)
                :
-               log_statistics(false),
+               log_statistics(log_statistics),
                pool(initial_size)
 {
   Threads::ThreadMutex::ScopedLock lock(mutex);
index d77f5b1198e18d5671c7d1747f2ee4c089c2d982..f47f12a2ac1373e575a88e06da44bf61274ce233 100644 (file)
@@ -21,10 +21,11 @@ DEAL_II_NAMESPACE_OPEN
   
 namespace
 {
-  GrowingVectorMemory<Vector<double> > default_pool_Vector_double;
-  GrowingVectorMemory<Vector<float> > default_pool_Vector_float;
-  GrowingVectorMemory<BlockVector<double> > default_pool_BlockVector_double;
-  GrowingVectorMemory<BlockVector<float> > default_pool_BlockVector_float;
+  GrowingVectorMemory<Vector<double> > default_pool_Vector_double(0, false);
+  GrowingVectorMemory<Vector<float> > default_pool_Vector_float(0, false);
+  GrowingVectorMemory<BlockVector<double> > default_pool_BlockVector_double(0, false);
+  GrowingVectorMemory<BlockVector<float> > default_pool_BlockVector_float(0, false);
+
   
   template<class VECTOR>
   inline

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.