From 7ce1147920c44322dd9985c1fb9e847701d63173 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 18 Mar 1998 14:48:11 +0000 Subject: [PATCH] Perform more bounds checking in dSMatrixStruct git-svn-id: https://svn.dealii.org/trunk@77 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/dsmatrix.h | 8 +++++++- deal.II/lac/source/dsmatrix.cc | 15 +++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/deal.II/lac/include/lac/dsmatrix.h b/deal.II/lac/include/lac/dsmatrix.h index 621f13044b..46b188952e 100644 --- a/deal.II/lac/include/lac/dsmatrix.h +++ b/deal.II/lac/include/lac/dsmatrix.h @@ -96,7 +96,13 @@ public: int, int, << "The given index " << arg1 << " should be less than " << arg2 << "."); - + /** + * Exception + */ + DeclException1 (ExcNotEnoughSpace, + int, + << "Upon entering a new entry to row " << arg1 + << ": there was no free entry any more."); }; diff --git a/deal.II/lac/source/dsmatrix.cc b/deal.II/lac/source/dsmatrix.cc index 38b5107201..d70f3826b3 100644 --- a/deal.II/lac/source/dsmatrix.cc +++ b/deal.II/lac/source/dsmatrix.cc @@ -205,16 +205,23 @@ dSMatrixStruct::add (int i, int j) Assert ((i>=0) && (i=0) && (j