]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check the component of a constant function.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 20:17:01 +0000 (20:17 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 20:17:01 +0000 (20:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@11010 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function.cc

index 611fc3945c61be9b36830396a27ad4217d02dc7a..0a171bc3317ba251c777895aa7df72e0fd3bbf84 100644 (file)
@@ -339,8 +339,10 @@ ConstantFunction<dim>::~ConstantFunction () {}
 
 template <int dim>
 double ConstantFunction<dim>::value (const Point<dim> &,
-                                    const unsigned int) const
+                                    const unsigned int component) const
 {
+  Assert (component < this->n_components,
+         ExcIndexRange (component, 0, this->n_components));
   return function_value;
 }
 

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.