]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move a few functions inline again and into the header file since otherwise one can...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Sep 2008 15:24:08 +0000 (15:24 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Sep 2008 15:24:08 +0000 (15:24 +0000)
git-svn-id: https://svn.dealii.org/trunk@16819 0785d39b-7218-0410-832d-ea1e28bc413d

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

index a5ad1bd49c03a9dad127ba9f5f2e41c93ca3ded9..5f44ee8e23bf9a084df8c9ec4014d7f6d731f2d2 100644 (file)
@@ -351,6 +351,59 @@ class GrowingVectorMemory : public VectorMemory<VECTOR>
 /* --------------------- 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>
 inline
 GrowingVectorMemory<VECTOR>::GrowingVectorMemory (const unsigned int initial_size,
index 6c9019a378c6dba10b965d806ac23d50910e07e8..ff1f563ed852b2a33fc833b6f5a23b886299e136 100644 (file)
 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;
 

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.