]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add exception to DataOut::add_data_vector if DataVectorType::type_automatic can not...
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Feb 2014 22:28:57 +0000 (22:28 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 18 Feb 2014 22:28:57 +0000 (22:28 +0000)
git-svn-id: https://svn.dealii.org/trunk@32510 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/numerics/data_out_dof_data.cc

index db456bc6eb430fcaa275dffee5f27bfb1aaa78f8..2693a91a527aa4b43ccb989ae6b02c9f873ddc34 100644 (file)
@@ -740,6 +740,11 @@ add_data_vector (const VECTOR                             &vec,
   DataVectorType actual_type = type;
   if (type == type_automatic)
     {
+      // in the rare case that someone has a DGP(0) attached, we can not decide what she wants here:
+      Assert((dofs == 0) || (triangulation->n_active_cells() != dofs->n_dofs()),
+          ExcMessage("Unable to determine the type of vector automatically because the number of DoFs "
+              "is equal to the number of cells. Please specify DataVectorType."));
+
       if (vec.size() == triangulation->n_active_cells())
         actual_type = type_cell_data;
       else

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.