From fde15cd8c4bc0b156a6a9c60668d6fdf1f1543c7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 25 Jul 2019 09:13:36 -0600 Subject: [PATCH] Minor clean-ups. --- include/deal.II/fe/fe_poly_tensor.h | 4 ++-- source/fe/fe_poly_tensor.cc | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) 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]; } -- 2.39.5