]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Base the full matrix on the new Table class instead of the now gone vector2d class.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Sep 2002 15:26:56 +0000 (15:26 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Sep 2002 15:26:56 +0000 (15:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@6348 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/full_matrix.templates.h
deal.II/lac/include/lac/precondition_block.templates.h

index 4f812042a52947607e2e9d6c245fffb8a504d5d8..a923107b64be848c914e0f04afcf2d770d06591f 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <base/config.h>
 #include <base/exceptions.h>
-#include <base/vector2d.h>
+#include <base/table.h>
 
 #include <vector>
 
@@ -61,7 +61,7 @@ template<typename number> class Vector;
  * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth, 1993-2001
  */
 template<typename number>
-class FullMatrix : public vector2d<number>
+class FullMatrix : public Table<2,number>
 {
   public:
                                     /**
@@ -753,7 +753,7 @@ template <typename number2>
 inline
 void FullMatrix<number>::fill (const number2* src)
 {
-  vector2d<number>::fill(src);
+  Table<2,number>::fill(src);
 }
 
 
index 40295cbe93fe87d53b8c042cbb0a1bee8311e474..db087fb5b81464b1aca1ce54cd57f98525f99f3d 100644 (file)
 #include <algorithm>
 
 template <typename number>
-FullMatrix<number>::FullMatrix (const unsigned int n) :
-               vector2d<number> (n)
+FullMatrix<number>::FullMatrix (const unsigned int n)
+                :
+                Table<2,number> (n,n)
 {}
 
 
 template <typename number>
 FullMatrix<number>::FullMatrix (const unsigned int m,
                                const unsigned int n) :
-               vector2d<number> (m, n)
+               Table<2,number> (m, n)
 {}
 
 
 template <typename number>
 FullMatrix<number>::FullMatrix (const unsigned int m,
-                               const unsigned int n,
-                               const number* entries) :
-               vector2d<number> (m, n, entries)
-{}
+                                const unsigned int n,
+                                const number* entries)
+                :
+                Table<2,number> (m, n)
+{
+  this->fill (entries);
+}
 
 
 template <typename number>
 FullMatrix<number>::FullMatrix (const FullMatrix &m) :
-               vector2d<number> (m)
+               Table<2,number> (m)
 {}
 
 
@@ -56,7 +60,7 @@ template <typename number>
 FullMatrix<number>&
 FullMatrix<number>::operator = (const FullMatrix<number>& M)
 {
-  vector2d<number>::operator=(M);
+  Table<2,number>::operator=(M);
   return *this;
 }
 
@@ -66,7 +70,7 @@ template <typename number2>
 FullMatrix<number>&
 FullMatrix<number>::operator = (const FullMatrix<number2>& M)
 {
-  vector2d<number>::operator=(M);
+  Table<2,number>::operator=(M);
   return *this;
 }
 
@@ -1561,8 +1565,8 @@ template <typename number>
 unsigned int
 FullMatrix<number>::memory_consumption () const
 {
-  return sizeof(*this) - sizeof (vector2d<number>)
-    + vector2d<number>::memory_consumption();
+  return sizeof(*this) - sizeof (Table<2,number>)
+    + Table<2,number>::memory_consumption();
 };
 
 
index 85311331aa1d7408d4b9d86f3df29a6590e13cc7..ee23a1bed4d632507fcb5c1996ad1d7cdfef6a6b 100644 (file)
@@ -143,7 +143,7 @@ void PreconditionBlock<number,inverse_type>::invert_diagblocks()
       if (store_diagonals)
        var_diagonal.resize(1);
       var_inverse.resize(1);
-      var_inverse[0].reinit(blocksize);
+      var_inverse[0].reinit(blocksize, blocksize);
 
       for (unsigned int row_cell=0; row_cell<blocksize; ++row_cell)
        for (unsigned int column_cell=0; column_cell<blocksize; ++column_cell)

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.