From 8d4675ef462d64970a06da24d90a1ab2fe0a5d59 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Fri, 26 Feb 2021 07:51:55 +0100 Subject: [PATCH] Rename further simplex-related files --- include/deal.II/base/polynomials_pyramid.h | 9 ++-- include/deal.II/base/polynomials_wedge.h | 9 ++-- include/deal.II/base/quadrature_lib.h | 4 +- include/deal.II/grid/reference_cell.h | 7 +-- include/deal.II/matrix_free/util.h | 4 +- source/base/polynomials_pyramid.cc | 52 ++++++++++++---------- source/base/polynomials_wedge.cc | 51 +++++++++++---------- source/base/quadrature_lib.cc | 15 ++++--- source/fe/fe_pyramid_p.cc | 2 +- source/fe/fe_wedge_p.cc | 2 +- tests/simplex/q_witherden_vincent_01.cc | 6 +-- 11 files changed, 89 insertions(+), 72 deletions(-) diff --git a/include/deal.II/base/polynomials_pyramid.h b/include/deal.II/base/polynomials_pyramid.h index b75d9ee082..640356ac09 100644 --- a/include/deal.II/base/polynomials_pyramid.h +++ b/include/deal.II/base/polynomials_pyramid.h @@ -34,7 +34,7 @@ DEAL_II_NAMESPACE_OPEN * FE_PyramidP. */ template -class ScalarPyramidPolynomial : public ScalarPolynomialsBase +class ScalarLagrangePolynomialPyramid : public ScalarPolynomialsBase { public: /** @@ -47,7 +47,7 @@ public: * * @note Currently, only linear polynomials (degree=1) are implemented. */ - ScalarPyramidPolynomial(const unsigned int degree); + ScalarLagrangePolynomialPyramid(const unsigned int degree); /** * @copydoc ScalarPolynomialsBase::evaluate() @@ -128,8 +128,9 @@ public: template template Tensor -ScalarPyramidPolynomial::compute_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_derivative( + const unsigned int i, + const Point & p) const { Tensor der; diff --git a/include/deal.II/base/polynomials_wedge.h b/include/deal.II/base/polynomials_wedge.h index 296c806163..5f9afefcb2 100644 --- a/include/deal.II/base/polynomials_wedge.h +++ b/include/deal.II/base/polynomials_wedge.h @@ -34,7 +34,7 @@ DEAL_II_NAMESPACE_OPEN * re-numerated to better match the definition of FiniteElement. */ template -class ScalarWedgePolynomial : public ScalarPolynomialsBase +class ScalarLagrangePolynomialWedge : public ScalarPolynomialsBase { public: /** @@ -48,7 +48,7 @@ public: * @note Currently, only linear (degree=1) and quadratic polynomials * (degree=2) are implemented. */ - ScalarWedgePolynomial(const unsigned int degree); + ScalarLagrangePolynomialWedge(const unsigned int degree); /** * @copydoc ScalarPolynomialsBase::evaluate() @@ -145,8 +145,9 @@ private: template template Tensor -ScalarWedgePolynomial::compute_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_derivative( + const unsigned int i, + const Point & p) const { Tensor der; diff --git a/include/deal.II/base/quadrature_lib.h b/include/deal.II/base/quadrature_lib.h index a82e7373af..388d037177 100644 --- a/include/deal.II/base/quadrature_lib.h +++ b/include/deal.II/base/quadrature_lib.h @@ -840,14 +840,14 @@ public: * @ingroup simplex */ template -class QWitherdenVincent : public QSimplex +class QWitherdenVincentSimplex : public QSimplex { public: /** * Constructor taking the number of quadrature points in 1D direction * @p n_points_1D. */ - explicit QWitherdenVincent(const unsigned int n_points_1D); + explicit QWitherdenVincentSimplex(const unsigned int n_points_1D); }; /** diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 28a856e6fd..7cb9898978 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -1539,8 +1539,9 @@ ReferenceCell::d_linear_shape_function(const Point & xi, } } - if (*this == ReferenceCells::Wedge) // see also - // ScalarWedgePolynomial::compute_value + if (*this == + ReferenceCells::Wedge) // see also + // ScalarLagrangePolynomialWedge::compute_value { return ReferenceCell(ReferenceCells::Triangle) .d_linear_shape_function<2>(Point<2>(xi[std::min(0, dim - 1)], @@ -1553,7 +1554,7 @@ ReferenceCell::d_linear_shape_function(const Point & xi, if (*this == ReferenceCells::Pyramid) // see also - // ScalarPyramidPolynomial::compute_value + // ScalarLagrangePolynomialPyramid::compute_value { const double Q14 = 0.25; double ration; diff --git a/include/deal.II/matrix_free/util.h b/include/deal.II/matrix_free/util.h index c1f6dce66a..164b759e27 100644 --- a/include/deal.II/matrix_free/util.h +++ b/include/deal.II/matrix_free/util.h @@ -69,9 +69,9 @@ namespace internal } for (unsigned int i = 1; i <= 5; ++i) - if (quad == QWitherdenVincent(i)) + if (quad == QWitherdenVincentSimplex(i)) { - QWitherdenVincent tri(i); + QWitherdenVincentSimplex tri(i); if (dim == 2) return {ReferenceCells::Triangle, diff --git a/source/base/polynomials_pyramid.cc b/source/base/polynomials_pyramid.cc index dbab75b527..e9b2bb9d0a 100644 --- a/source/base/polynomials_pyramid.cc +++ b/source/base/polynomials_pyramid.cc @@ -40,7 +40,8 @@ namespace template -ScalarPyramidPolynomial::ScalarPyramidPolynomial(const unsigned int degree) +ScalarLagrangePolynomialPyramid::ScalarLagrangePolynomialPyramid( + const unsigned int degree) : ScalarPolynomialsBase(degree, compute_n_polynomials_pyramid(dim, degree)) {} @@ -48,8 +49,8 @@ ScalarPyramidPolynomial::ScalarPyramidPolynomial(const unsigned int degree) template double -ScalarPyramidPolynomial::compute_value(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_value(const unsigned int i, + const Point & p) const { AssertDimension(dim, 3); AssertIndexRange(this->degree(), 2); @@ -86,8 +87,8 @@ ScalarPyramidPolynomial::compute_value(const unsigned int i, template Tensor<1, dim> -ScalarPyramidPolynomial::compute_grad(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_grad(const unsigned int i, + const Point & p) const { AssertDimension(dim, 3); AssertIndexRange(this->degree(), 4); @@ -163,8 +164,9 @@ ScalarPyramidPolynomial::compute_grad(const unsigned int i, template Tensor<2, dim> -ScalarPyramidPolynomial::compute_grad_grad(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_grad_grad( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -177,7 +179,7 @@ ScalarPyramidPolynomial::compute_grad_grad(const unsigned int i, template void -ScalarPyramidPolynomial::evaluate( +ScalarLagrangePolynomialPyramid::evaluate( const Point & unit_point, std::vector & values, std::vector> &grads, @@ -203,8 +205,9 @@ ScalarPyramidPolynomial::evaluate( template Tensor<1, dim> -ScalarPyramidPolynomial::compute_1st_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_1st_derivative( + const unsigned int i, + const Point & p) const { return compute_grad(i, p); } @@ -213,8 +216,9 @@ ScalarPyramidPolynomial::compute_1st_derivative(const unsigned int i, template Tensor<2, dim> -ScalarPyramidPolynomial::compute_2nd_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_2nd_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -228,8 +232,9 @@ ScalarPyramidPolynomial::compute_2nd_derivative(const unsigned int i, template Tensor<3, dim> -ScalarPyramidPolynomial::compute_3rd_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_3rd_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -243,8 +248,9 @@ ScalarPyramidPolynomial::compute_3rd_derivative(const unsigned int i, template Tensor<4, dim> -ScalarPyramidPolynomial::compute_4th_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialPyramid::compute_4th_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -258,24 +264,24 @@ ScalarPyramidPolynomial::compute_4th_derivative(const unsigned int i, template std::string -ScalarPyramidPolynomial::name() const +ScalarLagrangePolynomialPyramid::name() const { - return "ScalarPyramidPolynomial"; + return "ScalarLagrangePolynomialPyramid"; } template std::unique_ptr> -ScalarPyramidPolynomial::clone() const +ScalarLagrangePolynomialPyramid::clone() const { - return std::make_unique>(*this); + return std::make_unique>(*this); } -template class ScalarPyramidPolynomial<1>; -template class ScalarPyramidPolynomial<2>; -template class ScalarPyramidPolynomial<3>; +template class ScalarLagrangePolynomialPyramid<1>; +template class ScalarLagrangePolynomialPyramid<2>; +template class ScalarLagrangePolynomialPyramid<3>; DEAL_II_NAMESPACE_CLOSE diff --git a/source/base/polynomials_wedge.cc b/source/base/polynomials_wedge.cc index 6517e62443..2db03b7167 100644 --- a/source/base/polynomials_wedge.cc +++ b/source/base/polynomials_wedge.cc @@ -42,7 +42,8 @@ namespace template -ScalarWedgePolynomial::ScalarWedgePolynomial(const unsigned int degree) +ScalarLagrangePolynomialWedge::ScalarLagrangePolynomialWedge( + const unsigned int degree) : ScalarPolynomialsBase(degree, compute_n_polynomials_wedge(dim, degree)) , poly_tri(BarycentricPolynomials<2>::get_fe_p_basis(degree)) , poly_line(BarycentricPolynomials<1>::get_fe_p_basis(degree)) @@ -88,8 +89,8 @@ namespace template double -ScalarWedgePolynomial::compute_value(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_value(const unsigned int i, + const Point & p) const { const auto pair = this->degree() == 1 ? wedge_table_1[i] : wedge_table_2[i]; @@ -106,8 +107,8 @@ ScalarWedgePolynomial::compute_value(const unsigned int i, template Tensor<1, dim> -ScalarWedgePolynomial::compute_grad(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_grad(const unsigned int i, + const Point & p) const { const auto pair = this->degree() == 1 ? wedge_table_1[i] : wedge_table_2[i]; @@ -131,8 +132,8 @@ ScalarWedgePolynomial::compute_grad(const unsigned int i, template Tensor<2, dim> -ScalarWedgePolynomial::compute_grad_grad(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_grad_grad(const unsigned int i, + const Point &p) const { (void)i; (void)p; @@ -145,7 +146,7 @@ ScalarWedgePolynomial::compute_grad_grad(const unsigned int i, template void -ScalarWedgePolynomial::evaluate( +ScalarLagrangePolynomialWedge::evaluate( const Point & unit_point, std::vector & values, std::vector> &grads, @@ -171,8 +172,9 @@ ScalarWedgePolynomial::evaluate( template Tensor<1, dim> -ScalarWedgePolynomial::compute_1st_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_1st_derivative( + const unsigned int i, + const Point & p) const { return compute_grad(i, p); } @@ -181,8 +183,9 @@ ScalarWedgePolynomial::compute_1st_derivative(const unsigned int i, template Tensor<2, dim> -ScalarWedgePolynomial::compute_2nd_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_2nd_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -196,8 +199,9 @@ ScalarWedgePolynomial::compute_2nd_derivative(const unsigned int i, template Tensor<3, dim> -ScalarWedgePolynomial::compute_3rd_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_3rd_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -211,8 +215,9 @@ ScalarWedgePolynomial::compute_3rd_derivative(const unsigned int i, template Tensor<4, dim> -ScalarWedgePolynomial::compute_4th_derivative(const unsigned int i, - const Point & p) const +ScalarLagrangePolynomialWedge::compute_4th_derivative( + const unsigned int i, + const Point & p) const { (void)i; (void)p; @@ -226,24 +231,24 @@ ScalarWedgePolynomial::compute_4th_derivative(const unsigned int i, template std::string -ScalarWedgePolynomial::name() const +ScalarLagrangePolynomialWedge::name() const { - return "ScalarWedgePolynomial"; + return "ScalarLagrangePolynomialWedge"; } template std::unique_ptr> -ScalarWedgePolynomial::clone() const +ScalarLagrangePolynomialWedge::clone() const { - return std::make_unique>(*this); + return std::make_unique>(*this); } -template class ScalarWedgePolynomial<1>; -template class ScalarWedgePolynomial<2>; -template class ScalarWedgePolynomial<3>; +template class ScalarLagrangePolynomialWedge<1>; +template class ScalarLagrangePolynomialWedge<2>; +template class ScalarLagrangePolynomialWedge<3>; DEAL_II_NAMESPACE_CLOSE diff --git a/source/base/quadrature_lib.cc b/source/base/quadrature_lib.cc index d2a21598e6..e228aa3d0a 100644 --- a/source/base/quadrature_lib.cc +++ b/source/base/quadrature_lib.cc @@ -1406,7 +1406,8 @@ QGaussSimplex::QGaussSimplex(const unsigned int n_points_1D) } else if (n_points_1D == 4) { - Quadrature::operator=(QWitherdenVincent(n_points_1D)); + Quadrature::operator=( + QWitherdenVincentSimplex(n_points_1D)); } } else if (dim == 3) @@ -1464,7 +1465,8 @@ QGaussSimplex::QGaussSimplex(const unsigned int n_points_1D) } else if (n_points_1D == 4) { - Quadrature::operator=(QWitherdenVincent(n_points_1D)); + Quadrature::operator=( + QWitherdenVincentSimplex(n_points_1D)); } } @@ -1503,7 +1505,8 @@ namespace template -QWitherdenVincent::QWitherdenVincent(const unsigned int n_points_1D) +QWitherdenVincentSimplex::QWitherdenVincentSimplex( + const unsigned int n_points_1D) : QSimplex(Quadrature()) { Assert(1 <= dim && dim <= 3, ExcNotImplemented()); @@ -1845,8 +1848,8 @@ template class QGaussPyramid<1>; template class QGaussPyramid<2>; template class QGaussPyramid<3>; -template class QWitherdenVincent<1>; -template class QWitherdenVincent<2>; -template class QWitherdenVincent<3>; +template class QWitherdenVincentSimplex<1>; +template class QWitherdenVincentSimplex<2>; +template class QWitherdenVincentSimplex<3>; DEAL_II_NAMESPACE_CLOSE diff --git a/source/fe/fe_pyramid_p.cc b/source/fe/fe_pyramid_p.cc index 97e450c0f0..6c06c03230 100644 --- a/source/fe/fe_pyramid_p.cc +++ b/source/fe/fe_pyramid_p.cc @@ -78,7 +78,7 @@ FE_Pyramid::FE_Pyramid( const internal::GenericDoFsPerObject & dpos, const typename FiniteElementData::Conformity conformity) : dealii::FE_Poly( - ScalarPyramidPolynomial(degree), + ScalarLagrangePolynomialPyramid(degree), FiniteElementData(dpos, ReferenceCells::Pyramid, 1, diff --git a/source/fe/fe_wedge_p.cc b/source/fe/fe_wedge_p.cc index 4f4d4cf995..6e6f2db3a2 100644 --- a/source/fe/fe_wedge_p.cc +++ b/source/fe/fe_wedge_p.cc @@ -86,7 +86,7 @@ FE_Wedge::FE_Wedge( const internal::GenericDoFsPerObject & dpos, const typename FiniteElementData::Conformity conformity) : dealii::FE_Poly( - ScalarWedgePolynomial(degree), + ScalarLagrangePolynomialWedge(degree), FiniteElementData(dpos, ReferenceCells::Wedge, 1, diff --git a/tests/simplex/q_witherden_vincent_01.cc b/tests/simplex/q_witherden_vincent_01.cc index d060b3fb98..3a82f4ba43 100644 --- a/tests/simplex/q_witherden_vincent_01.cc +++ b/tests/simplex/q_witherden_vincent_01.cc @@ -23,7 +23,7 @@ void print(const unsigned int n_points_1D) { deallog << "n_points_1D = " << n_points_1D << std::endl; - const QWitherdenVincent quad(n_points_1D); + const QWitherdenVincentSimplex quad(n_points_1D); deallog << "quad size = " << quad.size() << std::endl; for (unsigned int q = 0; q < quad.size(); ++q) @@ -52,8 +52,8 @@ check_accuracy_1D(const unsigned int n_points_1D) // component monomial_powers[dim - 1] += accuracy - sum; - const Functions::Monomial func(monomial_powers); - const QWitherdenVincent quad(n_points_1D); + const Functions::Monomial func(monomial_powers); + const QWitherdenVincentSimplex quad(n_points_1D); deallog << "Monomial powers = " << monomial_powers << std::endl; double integrand = 0.0; -- 2.39.5