From: Peter Munch Date: Sat, 5 Dec 2020 11:29:50 +0000 (+0100) Subject: Add assert to extract_vtk_patch_info to prevent write_higher_order_cells with non... X-Git-Tag: v9.3.0-rc1~794^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11322%2Fhead;p=dealii.git Add assert to extract_vtk_patch_info to prevent write_higher_order_cells with non hypercube cells --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 0d91d13b26..ae0db5e50a 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -598,11 +598,17 @@ namespace { std::array 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)