]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
strange default values changed
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 May 2003 14:46:11 +0000 (14:46 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 16 May 2003 14:46:11 +0000 (14:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@7653 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/precondition_block.h
deal.II/lac/include/lac/precondition_block.templates.h
deal.II/lac/include/lac/sparse_matrix_ez.h
deal.II/lac/include/lac/sparse_matrix_ez.templates.h
deal.II/lac/source/precondition_block.cc

index d6c7b51e817e4f7c3f3838b06701afbd4ac942ce..949b6ef8c07856908a4b66bbd092479fef262dd5 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  precondition_block.h  ---------------------------
+//----------------------------------------------------------------------
 //    $Id$
 //    Version: $Name$
 //
@@ -9,7 +9,7 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  precondition_block.h  ---------------------------
+//----------------------------------------------------------------------
 #ifndef __deal2__precondition_block_h
 #define __deal2__precondition_block_h
 
@@ -22,7 +22,6 @@
 #include <vector>
 
 template <typename number> class FullMatrix;
-template <typename number> class SparseMatrix;
 template <typename number> class Vector;
 
 
index 4a5a2fbff5a55e14f52af45d1853bf302ff515ac..f339aca3cbf75698daa8cc89acf6a2c6bce9b5ab 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  precondition_block.templates.h  ---------------------------
+//----------------------------------------------------------------------
 //    $Id$
 //    Version: $Name$
 //
@@ -9,7 +9,7 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  precondition_block.templates.h  ---------------------------
+//----------------------------------------------------------------------
 #ifndef __deal2__precondition_block_templates_h
 #define __deal2__precondition_block_templates_h
 
@@ -21,7 +21,6 @@
 #include <lac/precondition_block.h>
 #include <lac/vector.h>
 #include <lac/full_matrix.h>
-#include <lac/sparse_matrix.h>
 
 
 template <class MATRIX, typename inverse_type>
index df5dc91e17044fd93d88e435c3b2a1cc83766044..e7d6ca9d64802014705c4b781ba945a4e7e5369e 100644 (file)
@@ -362,15 +362,11 @@ class SparseMatrixEZ : public Subscriptor
                                      * properly is essential for an
                                      * efficient assembling of the
                                      * matrix.
-                                     *
-                                     * The default values are
-                                     * @p{default_row_length=5},
-                                     * @p{default_increment=4}.
                                      */
     explicit SparseMatrixEZ (const unsigned int n_rows,
                             const unsigned int n_columns,
-                            const unsigned int default_row_length = Entry::invalid,
-                            const unsigned int default_increment = Entry::invalid);
+                            const unsigned int default_row_length = 0,
+                            const unsigned int default_increment = 1);
     
                                     /**
                                      * Destructor. Free all memory, but do not
@@ -398,15 +394,11 @@ class SparseMatrixEZ : public Subscriptor
                                      * properly is essential for an
                                      * efficient assembling of the
                                      * matrix.
-                                     *
-                                     * The default values are
-                                     * @p{default_row_length=5},
-                                     * @p{default_increment=4}.
                                      */
     void reinit (const unsigned int n_rows,
                 const unsigned int n_columns,
-                unsigned int default_row_length = Entry::invalid,
-                unsigned int default_increment = Entry::invalid);
+                unsigned int default_row_length = 0,
+                unsigned int default_increment = 1);
 
                                     /**
                                      * Release all memory and return
index c1a6dbfc99d0c8534bdcf7cd3574feea83ef8449..85df27c60ce473d6c5975eef0af10b56f7f985bc 100644 (file)
@@ -72,20 +72,11 @@ SparseMatrixEZ<number>::reinit(const unsigned int n_rows,
 {
   clear();
 
-                                   // replace (invalid) default values
-                                   // by true defaults; note that
-                                   // these defaults are also
-                                   // documented in the docs of this
-                                   // function as well as in the docs
-                                   // of the constructor!
-  if (default_row_length == Entry::invalid)
-    default_row_length = 5;
-  if (default_increment == Entry::invalid)
-    default_increment = 4;
   increment = default_increment;
   
   n_columns = n_cols;
   row_info.resize(n_rows);
+//TODO:[GK] allow for flexible memory reservation in later version
   data.reserve(default_row_length * n_rows + n_rows * increment);
   data.resize(default_row_length * n_rows);
 
index 6f7fb63607d495e9dc6065e4a6f7b5e65252dcce..3054d23925dbef0d197f421cac00a6f72fd30f72 100644 (file)
@@ -1,4 +1,4 @@
-//----------------------------  precondition_block.cc  ---------------------------
+//----------------------------------------------------------------------
 //    $Id$
 //    Version: $Name$
 //
@@ -9,10 +9,11 @@
 //    to the file deal.II/doc/license.html for the  text  and
 //    further information on this license.
 //
-//----------------------------  precondition_block.cc  ---------------------------
+//----------------------------------------------------------------------
 
 
 #include <lac/precondition_block.templates.h>
+#include <lac/sparse_matrix.h>
 
 
 // explicit instantiations for "float" PreconditionBlock

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.