From 27a1d1e9fba422b3b6db5da5866f53cfed1d7d0b Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 Sep 2002 15:26:56 +0000 Subject: [PATCH] Base the full matrix on the new Table class instead of the now gone vector2d class. git-svn-id: https://svn.dealii.org/trunk@6348 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/full_matrix.h | 6 ++-- .../lac/include/lac/full_matrix.templates.h | 28 +++++++++++-------- .../lac/precondition_block.templates.h | 2 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/deal.II/lac/include/lac/full_matrix.h b/deal.II/lac/include/lac/full_matrix.h index 4f812042a5..a923107b64 100644 --- a/deal.II/lac/include/lac/full_matrix.h +++ b/deal.II/lac/include/lac/full_matrix.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include @@ -61,7 +61,7 @@ template class Vector; * @author Guido Kanschat, Franz-Theo Suttmeier, Wolfgang Bangerth, 1993-2001 */ template -class FullMatrix : public vector2d +class FullMatrix : public Table<2,number> { public: /** @@ -753,7 +753,7 @@ template inline void FullMatrix::fill (const number2* src) { - vector2d::fill(src); + Table<2,number>::fill(src); } diff --git a/deal.II/lac/include/lac/full_matrix.templates.h b/deal.II/lac/include/lac/full_matrix.templates.h index 40295cbe93..db087fb5b8 100644 --- a/deal.II/lac/include/lac/full_matrix.templates.h +++ b/deal.II/lac/include/lac/full_matrix.templates.h @@ -26,29 +26,33 @@ #include template -FullMatrix::FullMatrix (const unsigned int n) : - vector2d (n) +FullMatrix::FullMatrix (const unsigned int n) + : + Table<2,number> (n,n) {} template FullMatrix::FullMatrix (const unsigned int m, const unsigned int n) : - vector2d (m, n) + Table<2,number> (m, n) {} template FullMatrix::FullMatrix (const unsigned int m, - const unsigned int n, - const number* entries) : - vector2d (m, n, entries) -{} + const unsigned int n, + const number* entries) + : + Table<2,number> (m, n) +{ + this->fill (entries); +} template FullMatrix::FullMatrix (const FullMatrix &m) : - vector2d (m) + Table<2,number> (m) {} @@ -56,7 +60,7 @@ template FullMatrix& FullMatrix::operator = (const FullMatrix& M) { - vector2d::operator=(M); + Table<2,number>::operator=(M); return *this; } @@ -66,7 +70,7 @@ template FullMatrix& FullMatrix::operator = (const FullMatrix& M) { - vector2d::operator=(M); + Table<2,number>::operator=(M); return *this; } @@ -1561,8 +1565,8 @@ template unsigned int FullMatrix::memory_consumption () const { - return sizeof(*this) - sizeof (vector2d) - + vector2d::memory_consumption(); + return sizeof(*this) - sizeof (Table<2,number>) + + Table<2,number>::memory_consumption(); }; diff --git a/deal.II/lac/include/lac/precondition_block.templates.h b/deal.II/lac/include/lac/precondition_block.templates.h index 85311331aa..ee23a1bed4 100644 --- a/deal.II/lac/include/lac/precondition_block.templates.h +++ b/deal.II/lac/include/lac/precondition_block.templates.h @@ -143,7 +143,7 @@ void PreconditionBlock::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