]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a couple of assertions.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Mar 2012 11:08:59 +0000 (11:08 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Mar 2012 11:08:59 +0000 (11:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@25338 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_accessor.templates.h

index 21eded523eac60ef7849e655ae66dbfbee3fd09d..96ea4ce7173290c92aef9d7855fca1d04e0056f6 100644 (file)
@@ -3176,6 +3176,8 @@ get_dof_indices (std::vector<unsigned int> &dof_indices) const
 {
   Assert (this->is_artificial() == false,
          ExcMessage ("Can't ask for DoF indices on artificial cells."));
+  AssertDimension (dof_indices.size(), this->get_fe().dofs_per_cell);
+
   internal::DoFCellAccessor::Implementation::get_dof_indices (*this, dof_indices);
 }
 
@@ -3189,6 +3191,8 @@ DoFCellAccessor<DH>::get_dof_values (const InputVector &values,
 {
   Assert (this->is_artificial() == false,
          ExcMessage ("Can't ask for DoF indices on artificial cells."));
+  AssertDimension (local_values.size(), this->get_fe().dofs_per_cell);
+
   internal::DoFCellAccessor::Implementation
     ::get_dof_values (*this, values, local_values.begin(), local_values.end());
 }

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.