]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move the GrowingVectorMemory::Pool functions into the .cc file. This doesn't hurt...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 24 Jan 2008 17:50:19 +0000 (17:50 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 24 Jan 2008 17:50:19 +0000 (17:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@15678 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 0a10028f727352326478d33f358b644efa6eb688..a5ad1bd49c03a9dad127ba9f5f2e41c93ca3ded9 100644 (file)
@@ -350,64 +350,6 @@ class GrowingVectorMemory : public VectorMemory<VECTOR>
 #ifndef DOXYGEN
 /* --------------------- inline functions ---------------------- */
 
-template <typename VECTOR>
-inline
-GrowingVectorMemory<VECTOR>::Pool::Pool()
-               :
-               data(0)
-{}
-
-
-
-template <typename VECTOR>
-inline
-GrowingVectorMemory<VECTOR>::Pool::~Pool()
-{
-                                  // Nothing to do if memory was unused.
-  if (data == 0) return;
-
-                                  // First, delete all remaining
-                                  // vectors. Actually, there should
-                                  // be none, if there is no memory
-                                  // leak
-  unsigned int n=0;
-  for (typename std::vector<entry_type>::iterator i=data->begin();
-       i != data->end();
-       ++i)
-    {
-      if (i->first == true)
-       ++n;
-      delete i->second;
-    }
-  delete data;
-}
-
-
-template <typename VECTOR>
-inline
-void
-GrowingVectorMemory<VECTOR>::Pool::initialize(const unsigned int size)
-{
-  if (data == 0)
-    {
-      data = new std::vector<entry_type>(size);
-      
-      for (typename std::vector<entry_type>::iterator i= data->begin();
-          i != data->end();
-          ++i)
-       {
-         i->first = false;
-         i->second = new VECTOR;
-       }
-    }
-}
-
-
-template <typename VECTOR>
-typename GrowingVectorMemory<VECTOR>::Pool GrowingVectorMemory<VECTOR>::pool;
-template <typename VECTOR>
-Threads::ThreadMutex GrowingVectorMemory<VECTOR>::mutex;
-
 
 template <typename VECTOR>
 inline
index e1a2abf67c1d83d3f69f0467fcc8a31dc7eec06f..4aef81ff40c8c52c7b95051ab6aa24edb2011dc3 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2007 by the deal.II authors
+//    Copyright (C) 2007, 2008 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 
 DEAL_II_NAMESPACE_OPEN
 
+
+template <typename VECTOR>
+GrowingVectorMemory<VECTOR>::Pool::Pool()
+               :
+               data(0)
+{}
+
+
+
+template <typename VECTOR>
+GrowingVectorMemory<VECTOR>::Pool::~Pool()
+{
+                                  // Nothing to do if memory was unused.
+  if (data == 0) return;
+
+                                  // First, delete all remaining
+                                  // vectors. Actually, there should
+                                  // be none, if there is no memory
+                                  // leak
+  unsigned int n=0;
+  for (typename std::vector<entry_type>::iterator i=data->begin();
+       i != data->end();
+       ++i)
+    {
+      if (i->first == true)
+       ++n;
+      delete i->second;
+    }
+  delete data;
+}
+
+
+template <typename VECTOR>
+void
+GrowingVectorMemory<VECTOR>::Pool::initialize(const unsigned int size)
+{
+  if (data == 0)
+    {
+      data = new std::vector<entry_type>(size);
+      
+      for (typename std::vector<entry_type>::iterator i= data->begin();
+          i != data->end();
+          ++i)
+       {
+         i->first = false;
+         i->second = new VECTOR;
+       }
+    }
+}
+
+
+template <typename VECTOR>
+typename GrowingVectorMemory<VECTOR>::Pool GrowingVectorMemory<VECTOR>::pool;
+
+template <typename VECTOR>
+Threads::ThreadMutex GrowingVectorMemory<VECTOR>::mutex;
+
+
+
+
+
 #include "vector_memory.inst"
 
 DEAL_II_NAMESPACE_CLOSE
index 406a44be096baebe3d4d7e5e0c58a5fc3c4e163b..535a739a6c0ff7fc673bda28a94b6ae3a712f59f 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -16,25 +16,19 @@ for (SCALAR : REAL_SCALARS)
   {
     template class VectorMemory<Vector<SCALAR> >;
     template class GrowingVectorMemory<Vector<SCALAR> >;
-//    template GrowingVectorMemory<Vector<SCALAR> >::Pool
-//      GrowingVectorMemory<Vector<SCALAR> >::pool;
 
+    
     template class VectorMemory<BlockVector<SCALAR> >;
     template class GrowingVectorMemory<BlockVector<SCALAR> >;
-//    template GrowingVectorMemory<BlockVector<SCALAR> >::Pool
-//      GrowingVectorMemory<BlockVector<SCALAR> >::pool;
   }
 
+
 for (SCALAR : COMPLEX_SCALARS)
   {
     template class VectorMemory<Vector<SCALAR> >;
     template class GrowingVectorMemory<Vector<SCALAR> >;
-//    template GrowingVectorMemory<Vector<SCALAR> >::Pool
-//      GrowingVectorMemory<Vector<SCALAR> >::pool;
-
+    
     template class VectorMemory<BlockVector<SCALAR> >;
     template class GrowingVectorMemory<BlockVector<SCALAR> >;
-//    template GrowingVectorMemory<BlockVector<SCALAR> >::Pool
-//      GrowingVectorMemory<BlockVector<SCALAR> >::pool;
   }
 

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.