]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid compiler warnings for Function::Spherical 6004/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 7 Mar 2018 04:19:12 +0000 (05:19 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Wed, 7 Mar 2018 04:19:12 +0000 (05:19 +0100)
source/base/function_spherical.cc

index 449354d4df067fe00a147265c6a1d49cc6c00c48..fabdd5509122fb3a66ce7560995b1150ec3f7347 100644 (file)
@@ -179,9 +179,22 @@ namespace Functions
 
   template <int dim>
   Tensor<1,dim>
-  Spherical<dim>::gradient (const Point<dim>   &p_,
-                            const unsigned int component) const
+  Spherical<dim>::gradient (const Point<dim>   &/*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<dim> p = p_ - coordinate_system_offset;
     const std::array<double, dim> sp = GeometricUtilities::Coordinates::to_spherical(p);
     const std::array<double, dim> sg = sgradient(sp, component);
@@ -225,9 +238,22 @@ namespace Functions
 
   template <int dim>
   SymmetricTensor<2,dim>
-  Spherical<dim>::hessian (const Point<dim> &p_,
-                           const unsigned int component) const
+  Spherical<dim>::hessian (const Point<dim> &/*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<dim> p = p_ - coordinate_system_offset;
     const std::array<double, dim> sp = GeometricUtilities::Coordinates::to_spherical(p);
     const std::array<double, dim> sg = sgradient(sp, component);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.