From 5ccea6ccdfebe638b1f352a47adff79f042e4f50 Mon Sep 17 00:00:00 2001 From: Simon Sticko Date: Wed, 25 May 2022 09:32:12 +0200 Subject: [PATCH] Assert reference cell is hypercube in Discrete*QuadratureGenerator --- source/non_matching/quadrature_generator.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/non_matching/quadrature_generator.cc b/source/non_matching/quadrature_generator.cc index f69033abf3..9a530fa7f2 100644 --- a/source/non_matching/quadrature_generator.cc +++ b/source/non_matching/quadrature_generator.cc @@ -1278,6 +1278,10 @@ namespace NonMatching ExcCellNotSet, "The set_active_cell function has to be called before calling this function."); + DeclExceptionMsg( + ExcReferenceCellNotHypercube, + "The reference cell of the incoming cell must be a hypercube."); + /** * This class evaluates a function defined by a solution vector and a @@ -1891,6 +1895,10 @@ namespace NonMatching DiscreteQuadratureGenerator::generate( const typename Triangulation::active_cell_iterator &cell) { + Assert(cell->reference_cell().is_hyper_cube(), + internal::DiscreteQuadratureGeneratorImplementation:: + ExcReferenceCellNotHypercube()); + reference_space_level_set->set_active_cell(cell); const BoundingBox unit_box = create_unit_bounding_box(); QuadratureGenerator::generate(*reference_space_level_set, unit_box); @@ -1921,6 +1929,10 @@ namespace NonMatching const typename Triangulation::active_cell_iterator &cell, const unsigned int face_index) { + Assert(cell->reference_cell().is_hyper_cube(), + internal::DiscreteQuadratureGeneratorImplementation:: + ExcReferenceCellNotHypercube()); + reference_space_level_set->set_active_cell(cell); const BoundingBox unit_box = create_unit_bounding_box(); FaceQuadratureGenerator::generate(*reference_space_level_set, -- 2.39.5