]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement Guido's suggestion of a function that does the any_cast so that one
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Aug 2012 13:28:27 +0000 (13:28 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Aug 2012 13:28:27 +0000 (13:28 +0000)
never has to do it oneself.

git-svn-id: https://svn.dealii.org/branches/branch_higher_derivatives@25755 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/fe/fe.h

index 5a8b51b0d9eddf575611258beca4c23e7dc66418..3813fde941e61feeb6e95bcd2756e2d3d35b0506 100644 (file)
@@ -639,9 +639,20 @@ class FiniteElement : public Subscriptor,
      */
     virtual
     boost::any
+    shape_nth_derivative_internal (const unsigned int i,
+                                  const Point<dim> &p,
+                                  const unsigned int nth_derivative) const;
+
+    template <int n>
+    Tensor<n,dim>
     shape_nth_derivative (const unsigned int i,
-                          const Point<dim> &p,
-                          const unsigned int nth_derivative) const;
+                         const Point<dim> &p,
+                         const unsigned int nth_derivative) const
+      {
+       return boost::any_cast<Tensor<n,dim> >
+         (shape_nth_derivative_internal (i, p, nth_derivative));
+      }
+
 
     /**
      * For computing the

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.