From a97cd49bac3fb7fbdcae10d6050ae94668ede90c Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 5 Dec 2020 12:29:50 +0100 Subject: [PATCH] Add assert to extract_vtk_patch_info to prevent write_higher_order_cells with non hypercube cells --- source/base/data_out_base.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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) -- 2.39.5