From: Daniel Arndt Date: Wed, 7 Mar 2018 04:19:12 +0000 (+0100) Subject: Avoid compiler warnings for Function::Spherical X-Git-Tag: v9.0.0-rc1~358^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6004%2Fhead;p=dealii.git Avoid compiler warnings for Function::Spherical --- 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);