]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
BlockSparseMatrixEZ in lib
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Mar 2003 10:09:25 +0000 (10:09 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 11 Mar 2003 10:09:25 +0000 (10:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@7310 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/block_sparse_matrix_ez.templates.h
deal.II/lac/source/block_sparse_matrix_ez.cc [new file with mode: 0644]

index efda1927c60109a492e3b6474376086ef9ae41e2..cef984a3bdc965b0ef491f9e3bd0a6e9d84bb1f6 100644 (file)
@@ -58,8 +58,10 @@ BlockSparseMatrixEZ<number> &
 BlockSparseMatrixEZ<number>::
 operator = (const BlockSparseMatrixEZ<number> &m) 
 {
-  Assert (n_block_rows() == m.n_block_rows(), ExcIncompatibleObjects());
-  Assert (n_block_cols() == m.n_block_cols(), ExcIncompatibleObjects());
+  Assert (n_block_rows() == m.n_block_rows(),
+         ExcDimensionMismatch(n_block_rows(), m.n_block_rows()));
+  Assert (n_block_cols() == m.n_block_cols(),
+         ExcDimensionMismatch(n_block_cols(), m.n_block_cols()));
                                   // this operator does not do
                                   // anything except than checking
                                   // whether the base objects want to
@@ -131,14 +133,14 @@ BlockSparseMatrixEZ<number>::collect_sizes ()
                                   // first find out the row sizes
                                   // from the first block column
   for (unsigned int r=0; r<rows; ++r)
-    row_sizes[r] = blocks[r][0].n_rows();
+    row_sizes[r] = blocks[r][0].m();
                                   // then check that the following
                                   // block columns have the same
                                   // sizes
   for (unsigned int c=1; c<columns; ++c)
     for (unsigned int r=0; r<rows; ++r)
-      Assert (row_sizes[r] == blocks[r][c].n_rows(),
-             ExcIncompatibleRowNumbers (r,0,r,c));
+      Assert (row_sizes[r] == blocks[r][c].m(),
+             ExcDimensionMismatch (row_sizes[r], blocks[r][c].m()));
 
                                   // finally initialize the row
                                   // indices with this array
@@ -147,11 +149,11 @@ BlockSparseMatrixEZ<number>::collect_sizes ()
   
                                   // then do the same with the columns
   for (unsigned int c=0; c<columns; ++c)
-    col_sizes[c] = blocks[0][c].n_cols();
+    col_sizes[c] = blocks[0][c].n();
   for (unsigned int r=1; r<rows; ++r)
     for (unsigned int c=0; c<columns; ++c)
-      Assert (col_sizes[c] == blocks[r][c].n_cols(),
-             ExcIncompatibleRowNumbers (0,c,r,c));
+      Assert (col_sizes[c] == blocks[r][c].n(),
+             ExcDimensionMismatch (col_sizes[c], blocks[r][c].n()));
 
                                   // finally initialize the row
                                   // indices with this array
diff --git a/deal.II/lac/source/block_sparse_matrix_ez.cc b/deal.II/lac/source/block_sparse_matrix_ez.cc
new file mode 100644 (file)
index 0000000..59658e9
--- /dev/null
@@ -0,0 +1,18 @@
+//------------------------------------------ ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2000, 2001, 2002 by the deal authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//---------------------------------------------------------------------
+
+#include <lac/block_sparse_matrix_ez.templates.h>
+
+// explicit instantiations
+template class BlockSparseMatrixEZ<double>;
+template class BlockSparseMatrixEZ<float>;

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.