From ba0d2471cc5021331d700042f225399e80f42b0e Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 7 Mar 2018 05:19:12 +0100 Subject: [PATCH] Avoid compiler warnings for Function::Spherical --- source/base/function_spherical.cc | 34 +++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/source/base/function_spherical.cc b/source/base/function_spherical.cc index 449354d4df..fabdd55091 100644 --- a/source/base/function_spherical.cc +++ b/source/base/function_spherical.cc @@ -179,9 +179,22 @@ namespace Functions template Tensor<1,dim> - Spherical::gradient (const Point &p_, - const unsigned int component) const + Spherical::gradient (const Point &/*p_*/, + const unsigned int /*component*/) const + + { + Assert(false, ExcNotImplemented()); + return {}; + } + + + + template <> + Tensor<1,3> + Spherical<3>::gradient (const Point<3> &p_, + const unsigned int component) const { + constexpr int dim = 3; const Point p = p_ - coordinate_system_offset; const std::array sp = GeometricUtilities::Coordinates::to_spherical(p); const std::array sg = sgradient(sp, component); @@ -225,9 +238,22 @@ namespace Functions template SymmetricTensor<2,dim> - Spherical::hessian (const Point &p_, - const unsigned int component) const + Spherical::hessian (const Point &/*p*/, + const unsigned int /*component*/) const + { + Assert(false, ExcNotImplemented()); + return {}; + } + + + + template <> + SymmetricTensor<2,3> + Spherical<3>::hessian (const Point<3> &p_, + const unsigned int component) const + { + constexpr int dim = 3; const Point p = p_ - coordinate_system_offset; const std::array sp = GeometricUtilities::Coordinates::to_spherical(p); const std::array sg = sgradient(sp, component); -- 2.39.5