From 37aff2268df2389b9fb6773431a10cff9d0c89ec Mon Sep 17 00:00:00 2001 From: bangerth Date: Sat, 13 Feb 2010 01:20:33 +0000 Subject: [PATCH] Undo change 20579 since it didn't compile. git-svn-id: https://svn.dealii.org/trunk@20586 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/block_sparse_matrix.h | 11 ++++++++++- .../lac/include/lac/block_sparse_matrix.templates.h | 8 +++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/deal.II/lac/include/lac/block_sparse_matrix.h b/deal.II/lac/include/lac/block_sparse_matrix.h index d30ebee959..205441ecf9 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -403,6 +403,15 @@ class BlockSparseMatrix : public BlockMatrixBase > * of this object. */ unsigned int memory_consumption () const; + + /** @addtogroup Exceptions + * @{ */ + + /** + * Exception + */ + DeclException0 (ExcBlockDimensionMismatch); + //@} private: /** * Pointer to the block sparsity diff --git a/deal.II/lac/include/lac/block_sparse_matrix.templates.h b/deal.II/lac/include/lac/block_sparse_matrix.templates.h index 99cccdb352..078a7c1052 100644 --- a/deal.II/lac/include/lac/block_sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/block_sparse_matrix.templates.h @@ -52,9 +52,11 @@ BlockSparseMatrix & BlockSparseMatrix:: operator = (const BlockSparseMatrix &m) { - AssertDimension (this->row_block_indices, m.row_block_indices); - AssertDimension (this->column_block_indices, m.column_block_indices); - + Assert (this->row_block_indices == m.row_block_indices, + ExcBlockDimensionMismatch()); + Assert (this->column_block_indices == m.column_block_indices, + ExcBlockDimensionMismatch()); + // this operator does not do // anything except than checking // whether the base objects want to -- 2.39.5