From: Wolfgang Bangerth Date: Thu, 25 Jul 2019 15:13:36 +0000 (-0600) Subject: Minor clean-ups. X-Git-Tag: v9.2.0-rc1~1353^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde15cd8c4bc0b156a6a9c60668d6fdf1f1543c7;p=dealii.git Minor clean-ups. --- diff --git a/include/deal.II/fe/fe_poly_tensor.h b/include/deal.II/fe/fe_poly_tensor.h index 4bb34d4dc8..74718870d4 100644 --- a/include/deal.II/fe/fe_poly_tensor.h +++ b/include/deal.II/fe/fe_poly_tensor.h @@ -221,13 +221,13 @@ protected: * mapping and false when the finite element uses multiple mappings. */ bool - single_mapping() const; + single_mapping_type() const; /** * Returns MappingType @p i for the finite element. */ MappingType - get_mapping_type(unsigned int i) const; + get_mapping_type(const unsigned int i) const; /* NOTE: The following function has its definition inlined into the class declaration because we otherwise run into a compiler error with MS Visual diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index 28bc8e5a52..6e2f842c54 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -196,7 +196,7 @@ FE_PolyTensor::FE_PolyTensor( template bool -FE_PolyTensor::single_mapping() const +FE_PolyTensor::single_mapping_type() const { return mapping_type.size() == 1; } @@ -206,10 +206,11 @@ FE_PolyTensor::single_mapping() const template MappingType FE_PolyTensor::get_mapping_type( - unsigned int i) const + const unsigned int i) const { - if (single_mapping()) + if (single_mapping_type()) return mapping_type[0]; + Assert(i < mapping_type.size(), ExcIndexRange(i, 0, mapping_type.size())); return mapping_type[i]; }