]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
adjusting to new diagonal handling
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Dec 2003 11:41:33 +0000 (11:41 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Dec 2003 11:41:33 +0000 (11:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@8222 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_decomposition.templates.h
deal.II/lac/include/lac/sparse_matrix.h

index 2e6af4b8440202c0eed3e4c3d4400a6f91afc5db..9989f977f31152029fadd6a303c5b344e04daddb 100644 (file)
@@ -151,6 +151,8 @@ SparseLUDecomposition<number>::reinit ()
 template <typename number>
 void SparseLUDecomposition<number>::reinit (const SparsityPattern& sparsity)
 {
+  Assert (sparsity.optimize_diagonal(),
+         typename SparsityPattern::ExcDiagonalNotOptimized());
   decomposed = false;
   if (true)
     {
index 88bff5170241664710060f62db4b51b73fb509c0..fbee8cf871a7eb09734be20c68478bd7135cf496 100644 (file)
@@ -1343,7 +1343,7 @@ inline
 number SparseMatrix<number>::diag_element (const unsigned int i) const
 {
   Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (m() == n(), ExcMatrixNotSquare());
+  Assert (cols->optimize_diagonal(),  ExcMatrixNotSquare());
   Assert (i<m(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each
@@ -1359,7 +1359,7 @@ inline
 number & SparseMatrix<number>::diag_element (const unsigned int i)
 {
   Assert (cols != 0, ExcMatrixNotInitialized());
-  Assert (m() == n(), ExcMatrixNotSquare());
+  Assert (cols->optimize_diagonal(),  ExcMatrixNotSquare());
   Assert (i<m(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each

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.