From: Wolfgang Bangerth Date: Fri, 22 Jan 2021 03:46:53 +0000 (-0700) Subject: Simplify code. X-Git-Tag: v9.3.0-rc1~548^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4004fa5395e318970139c4ae949e68eb4e5dab22;p=dealii.git Simplify code. --- diff --git a/source/grid/reference_cell.cc b/source/grid/reference_cell.cc index b4db7849e1..a5caf7fd59 100644 --- a/source/grid/reference_cell.cc +++ b/source/grid/reference_cell.cc @@ -96,6 +96,8 @@ namespace ReferenceCell void Type::make_triangulation(Triangulation &tria) const { + AssertDimension(dim, this->get_dimension()); + if (this->is_hyper_cube()) { GridGenerator::hyper_cube(tria, 0, 1); @@ -172,9 +174,9 @@ namespace ReferenceCell { AssertDimension(dim, get_dimension()); - if (*this == Type::get_hypercube()) + if (is_hyper_cube()) return std::make_unique>(degree); - else if (*this == Type::Tri || *this == Type::Tet) + else if (is_simplex()) return std::make_unique>( Simplex::FE_P(degree)); else if (*this == Type::Pyramid) @@ -199,11 +201,11 @@ namespace ReferenceCell { AssertDimension(dim, get_dimension()); - if (*this == Type::get_hypercube()) + if (is_hyper_cube()) { return StaticMappingQ1::mapping; } - else if (*this == Type::Tri || *this == Type::Tet) + else if (is_simplex()) { static const MappingFE mapping( Simplex::FE_P(1));