From c1819f5b2a7cd5dc3aa8656a5559be4d4e4484bb Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 14 Jul 2022 15:10:58 -0600 Subject: [PATCH] Add some assertions about hypercube reference cells. --- source/grid/tria_accessor.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/grid/tria_accessor.cc b/source/grid/tria_accessor.cc index 2b0b436f6f..9a49dceb44 100644 --- a/source/grid/tria_accessor.cc +++ b/source/grid/tria_accessor.cc @@ -2003,6 +2003,9 @@ template <> bool CellAccessor<2>::point_inside(const Point<2> &p) const { + Assert(this->reference_cell() == ReferenceCells::Quadrilateral, + ExcNotImplemented()); + // we check whether the point is // inside the cell by making sure // that it on the inner side of @@ -2065,6 +2068,9 @@ template <> bool CellAccessor<3>::point_inside(const Point<3> &p) const { + Assert(this->reference_cell() == ReferenceCells::Hexahedron, + ExcNotImplemented()); + // original implementation by Joerg // Weimar @@ -2125,6 +2131,8 @@ template bool CellAccessor::point_inside_codim(const Point &p) const { + Assert(this->reference_cell().is_hyper_cube(), ExcNotImplemented()); + const TriaRawIterator> cell_iterator(*this); const Point p_unit = StaticMappingQ1::mapping.transform_real_to_unit_cell( @@ -2155,6 +2163,8 @@ template <> bool CellAccessor<2, 3>::point_inside(const Point<3> &p) const { + Assert(this->reference_cell() == ReferenceCells::Quadrilateral, + ExcNotImplemented()); return point_inside_codim<2, 3>(p); } -- 2.39.5