]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add assert to extract_vtk_patch_info to prevent write_higher_order_cells with non... 11322/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 5 Dec 2020 11:29:50 +0000 (12:29 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 5 Dec 2020 11:29:50 +0000 (12:29 +0100)
source/base/data_out_base.cc

index 0d91d13b26fbde9b81635621d407cd3f082ca9f2..ae0db5e50a3457d64a13f89548bb18e2bdd5507d 100644 (file)
@@ -598,11 +598,17 @@ namespace
   {
     std::array<unsigned int, 3> vtk_cell_id{};
 
-    if (write_higher_order_cells &&
-        patch.reference_cell_type == ReferenceCell::get_hypercube(dim))
+    if (write_higher_order_cells)
       {
-        vtk_cell_id[0] = vtk_lagrange_cell_type[dim];
-        vtk_cell_id[1] = 1;
+        if (patch.reference_cell_type == ReferenceCell::get_hypercube(dim))
+          {
+            vtk_cell_id[0] = vtk_lagrange_cell_type[dim];
+            vtk_cell_id[1] = 1;
+          }
+        else
+          {
+            Assert(false, ExcNotImplemented());
+          }
       }
     else if (patch.reference_cell_type == ReferenceCell::Type::Tri &&
              patch.data.n_cols() == 3)

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.