]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
PrimitiveVectorMemory does not require size anymore
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Sep 1998 14:05:48 +0000 (14:05 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 8 Sep 1998 14:05:48 +0000 (14:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@588 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 7b670c2f173c5617a373c129bcdf21477a27d186..35f497cdc8ab4c06c42f0445fdaef2f14ee02bd2 100644 (file)
@@ -40,28 +40,24 @@ class VectorMemory {
 
 /**
  * Simple memory management.  This memory class is just made for
- * tests. It requires the vector to have a constructor with integer
- * parameter indicating the size. It just allocates and deletes
+ * tests. It just allocates and deletes
  * vectors as needed from the global heap, i.e. performs no
  * specially adapted actions to the purpose of this class.
  */
 template<class Vector>
 class PrimitiveVectorMemory : public VectorMemory<Vector> {
-    const unsigned int size;
   public:
                                     /**
                                      * Constructor.
-                                     * #sz# is the length of vectors to
-                                     * be generated by alloc.
                                      */
-    PrimitiveVectorMemory (const unsigned int sz) : size(sz) {};
+    PrimitiveVectorMemory () {};
 
                                     /**
-                                     * Allocate a vector of the given size
+                                     * Allocate a vector
                                      * from the global heap.
                                      */
     virtual Vector* alloc() {
-      return new Vector(size);
+      return new Vector();
     };
     
                                     /**
@@ -78,3 +74,4 @@ class PrimitiveVectorMemory : public VectorMemory<Vector> {
 /* end of #ifndef __vector_memory_H */
 #endif
 /*----------------------------   vector_memory.h     ---------------------------*/
+

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.