From d465715f23bf393c1188295d3d7fc786d911b5f3 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 18 May 2012 14:04:25 +0000 Subject: [PATCH] Initial dummy implementation of higher derivatives. git-svn-id: https://svn.dealii.org/branches/branch_higher_derivatives@25519 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/include/deal.II/fe/fe.h | 22 +++++++++++++++++ deal.II/include/deal.II/fe/fe_update_flags.h | 9 ++++++- deal.II/source/fe/fe.cc | 26 ++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/deal.II/include/deal.II/fe/fe.h b/deal.II/include/deal.II/fe/fe.h index c49c12cd81..cd32d2eca1 100644 --- a/deal.II/include/deal.II/fe/fe.h +++ b/deal.II/include/deal.II/fe/fe.h @@ -16,6 +16,8 @@ #include #include +#include + DEAL_II_NAMESPACE_OPEN @@ -625,6 +627,26 @@ class FiniteElement : public Subscriptor, const Point &p, const unsigned int component) const; + /** + * + * @param i + * @param p + * @param nth_derivative + * @return ...say that the any-type can only store Tensor + */ + virtual + boost::any + shape_nth_derivative (const unsigned int i, + const Point &p, + const unsigned int nth_derivative) const; + + virtual + boost::any + shape_nth_derivative_component (const unsigned int i, + const Point &p, + const unsigned int component, + const unsigned int nth_derivative) const; + /** * Check for non-zero values on a * face in order to optimize out diff --git a/deal.II/include/deal.II/fe/fe_update_flags.h b/deal.II/include/deal.II/fe/fe_update_flags.h index 8b520b2edf..4537cbd495 100644 --- a/deal.II/include/deal.II/fe/fe_update_flags.h +++ b/deal.II/include/deal.II/fe/fe_update_flags.h @@ -263,9 +263,16 @@ enum UpdateFlags * needed for Piola transform * of Hdiv elements. */ - update_piola = update_volume_elements | update_contravariant_transformation + update_piola = update_volume_elements | update_contravariant_transformation, + + update_3rd_derivatives = 0x80000, + update_4th_derivatives = 0x100000, + update_5th_derivatives = 0x200000, + update_6th_derivatives = 0x400000 }; +UpdateFlags update_nth_derivatives (const unsigned int nth_derivative); + /** * Output operator which outputs update flags as a set of or'd text values. diff --git a/deal.II/source/fe/fe.cc b/deal.II/source/fe/fe.cc index 4915211f5a..bf8dea94cd 100644 --- a/deal.II/source/fe/fe.cc +++ b/deal.II/source/fe/fe.cc @@ -303,6 +303,32 @@ FiniteElement::shape_hessian_component (const unsigned int, } + +template +boost::any +FiniteElement::shape_nth_derivative (const unsigned int, + const Point &, + const unsigned int) const +{ + AssertThrow(false, ExcUnitShapeValuesDoNotExist()); + return boost::any (); +} + + + +template +boost::any +FiniteElement::shape_nth_derivative_component(const unsigned int, + const Point &, + const unsigned int, + const unsigned int) const +{ + AssertThrow(false, ExcUnitShapeValuesDoNotExist()); + return boost::any (); +} + + + template void FiniteElement::reinit_restriction_and_prolongation_matrices ( -- 2.39.5