]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an exception apparently forgotten.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 27 Jan 2008 03:48:48 +0000 (03:48 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 27 Jan 2008 03:48:48 +0000 (03:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@15690 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/derivative_approximation.cc

index e284dcf7a046c2d5fa8925198f9c751d2b0a7263..b69e68ab8342e5afae3f5680e8aefa8838255e0a 100644 (file)
@@ -78,7 +78,7 @@ get_projected_derivative (const FEValues<dim>  &fe_values,
        (1, Vector<double>(fe_values.get_fe().n_components()));
       fe_values.get_function_values (solution, values);
       return values[0](component);
-    };
+    }
 }
 
 
@@ -627,6 +627,8 @@ approximate_derivative (const Mapping<dim>    &mapping,
   Assert (derivative_norm.size() == dof_handler.get_tria().n_active_cells(),
          ExcInvalidVectorLength (derivative_norm.size(),
                                  dof_handler.get_tria().n_active_cells()));
+  Assert (component < dof_handler.get_fe().n_components(),
+         ExcIndexRange (component, 0, dof_handler.get_fe().n_components()));
 
   const unsigned int n_threads = multithread_info.n_default_threads;
   std::vector<IndexInterval> index_intervals

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.