]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
assertion in base_element
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 19 Apr 1999 14:33:01 +0000 (14:33 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 19 Apr 1999 14:33:01 +0000 (14:33 +0000)
git-svn-id: https://svn.dealii.org/trunk@1178 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_system.h

index 073ef326b7c883c1b84745ece9467f464d036eda..9cc52ff6e0d287133433411b7962928f5982dabc 100644 (file)
@@ -505,6 +505,8 @@ template<int dim>
 inline unsigned
 FESystem<dim>::element_multiplicity(unsigned index) const
 {
+  Assert (index < base_elements.size(), 
+         ExcIndexRange(index, 0, base_elements.size()));
   return base_elements[index].second;
 }
 
@@ -514,6 +516,8 @@ template <int dim>
 inline const FiniteElement<dim>&
 FESystem<dim>::base_element(unsigned index) const
 {
+  Assert (index < base_elements.size(), 
+         ExcIndexRange(index, 0, base_elements.size()));
   return *base_elements[index].first;
 }
 

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.