From: Wolfgang Bangerth Date: Thu, 14 Jul 2022 21:10:58 +0000 (-0600) Subject: Add some assertions about hypercube reference cells. X-Git-Tag: v9.5.0-rc1~1086^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1819f5b2a7cd5dc3aa8656a5559be4d4e4484bb;p=dealii.git Add some assertions about hypercube reference cells. --- 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); }