]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix: Include missing assertions in <code
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 20 Jul 2000 11:29:34 +0000 (11:29 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 20 Jul 2000 11:29:34 +0000 (11:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@3183 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/fe_values.cc
deal.II/deal.II/source/numerics/data_out.cc

index f467218a9c9f0f1b5394cca51ea7744a21b45b7f..6e2c5ff305c2a68e2517eba39846c7bcd5ee2304 100644 (file)
@@ -85,6 +85,7 @@ void FEValuesBase<dim>::get_function_values (const InputVector &fe_function,
          ExcIndexRange (selected_dataset, 0, shape_values.size()));
   Assert (values.size() == n_quadrature_points,
          ExcWrongVectorSize(values.size(), n_quadrature_points));
+  Assert (update_flags & update_values, ExcAccessToUninitializedField());
 
                                   // get function values of dofs
                                   // on this cell
@@ -119,6 +120,7 @@ void FEValuesBase<dim>::get_function_values (const InputVector       &fe_functio
   for (unsigned i=0;i<values.size();++i)
     Assert (values[i].size() == fe->n_components(),
            ExcWrongNoOfComponents());
+  Assert (update_flags & update_values, ExcAccessToUninitializedField());
 
                                   // get function values of dofs
                                   // on this cell
@@ -167,6 +169,7 @@ void FEValuesBase<dim>::get_function_grads (const InputVector      &fe_function,
          ExcWrongNoOfComponents());
   Assert (gradients.size() == n_quadrature_points,
          ExcWrongVectorSize(gradients.size(), n_quadrature_points));
+  Assert (update_flags & update_gradients, ExcAccessToUninitializedField());
 
                                   // get function values of dofs
                                   // on this cell
@@ -204,6 +207,7 @@ void FEValuesBase<dim>::get_function_grads (const InputVector               &fe_
   for (unsigned i=0;i<gradients.size();++i)
     Assert (gradients[i].size() == fe->n_components(),
            ExcWrongVectorSize(gradients[i].size(), fe->n_components()));
+  Assert (update_flags & update_gradients, ExcAccessToUninitializedField());
 
                                   // get function values of dofs
                                   // on this cell
@@ -256,6 +260,7 @@ void FEValuesBase<dim>::get_function_2nd_derivatives (const InputVector      &fe
          ExcWrongNoOfComponents());
   Assert (second_derivatives.size() == n_quadrature_points,
          ExcWrongVectorSize(second_derivatives.size(), n_quadrature_points));
+  Assert (update_flags & update_second_derivatives, ExcAccessToUninitializedField());
 
                                   // get function values of dofs
                                   // on this cell
index d9940c5076bb88d01ccdc95beece87c51e20dd4f..7cb4d6fe3c143cfd24cc8b66ccf6c92bc460cef3 100644 (file)
@@ -211,7 +211,7 @@ void DataOut<dim>::build_some_patches (Data data)
   
   FEValues<dim> fe_patch_values(dofs->get_fe(),
                                patch_points,
-                               update_default);
+                               update_values);
 
   const unsigned int n_q_points = patch_points.n_quadrature_points;
   

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.