]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add assertion of vector sizes
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Sep 2010 15:45:17 +0000 (15:45 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 29 Sep 2010 15:45:17 +0000 (15:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@22194 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/block_sparsity_pattern.cc

index 54d1a68dc3bb13c60ce383e23e422766e6d7b83d..1d3840245fe6f599f0d8307cf0ddf00e797a34a3 100644 (file)
@@ -334,6 +334,8 @@ BlockSparsityPattern::reinit(
   const BlockIndices& cols,
   const std::vector<std::vector<unsigned int> >& row_lengths)
 {
+  AssertDimension (row_lengths.size(), cols.size());
+  
   this->reinit(rows.size(), cols.size());
   for (unsigned int j=0;j<cols.size();++j)
     for (unsigned int i=0;i<rows.size();++i)

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.