From: Simon Sticko Date: Wed, 25 May 2022 07:32:12 +0000 (+0200) Subject: Assert reference cell is hypercube in Discrete*QuadratureGenerator X-Git-Tag: v9.4.0-rc1~157^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ccea6ccdfebe638b1f352a47adff79f042e4f50;p=dealii.git Assert reference cell is hypercube in Discrete*QuadratureGenerator --- 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,