From dbd3b3b2bfd338f383ebac261f314f29f463840c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Tue, 8 Jun 2021 17:22:47 +0200 Subject: [PATCH] FEInterfaceValues: Make interface consistent with FEValues --- include/deal.II/fe/fe_interface_values.h | 179 +++++++++++++++++++++-- 1 file changed, 170 insertions(+), 9 deletions(-) diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index e464910fb3..d304ba360a 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -652,6 +652,17 @@ public: * $\jump{u}=u_{\text{cell0}}$. */ double + jump_shape_value(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the jump_shape_value() function instead. + */ + DEAL_II_DEPRECATED + double jump(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -666,6 +677,17 @@ public: * $\average{u}=u_{\text{cell0}}$. */ double + average_shape_value(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the average_shape_value() function instead. + */ + DEAL_II_DEPRECATED + double average(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -680,6 +702,17 @@ public: * $\average{\nabla u}=\nabla u_{\text{cell0}}$. */ Tensor<1, spacedim> + average_shape_gradient(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the average_shape_gradient() function instead. + */ + DEAL_II_DEPRECATED + Tensor<1, spacedim> average_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -695,6 +728,17 @@ public: * $\average{\nabla^2 u}=\nabla^2 u_{\text{cell0}}$. */ Tensor<2, spacedim> + average_shape_hessian(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the average_shape_hessian() function instead. + */ + DEAL_II_DEPRECATED + Tensor<2, spacedim> average_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -709,6 +753,17 @@ public: * $\jump{\nabla u}=\nabla u_{\text{cell0}}$. */ Tensor<1, spacedim> + jump_shape_gradient(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the jump_shape_gradient() function instead. + */ + DEAL_II_DEPRECATED + Tensor<1, spacedim> jump_gradient(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -724,6 +779,17 @@ public: * $\jump{\nabla^2 u} = \nabla^2 u_{\text{cell0}}$. */ Tensor<2, spacedim> + jump_shape_hessian(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the jump_shape_hessian() function instead. + */ + DEAL_II_DEPRECATED + Tensor<2, spacedim> jump_hessian(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -738,6 +804,17 @@ public: * $\jump{\nabla^3 u} = \nabla^3 u_{\text{cell0}}$. */ Tensor<3, spacedim> + jump_shape_3rd_derivative(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component = 0) const; + + /** + * The same as above. + * + * @deprecated Use the jump_shape_3rd_derivative() function instead. + */ + DEAL_II_DEPRECATED + Tensor<3, spacedim> jump_3rd_derivative(const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component = 0) const; @@ -1176,9 +1253,10 @@ FEInterfaceValues::shape_value( template double -FEInterfaceValues::jump(const unsigned int interface_dof_index, - const unsigned int q_point, - const unsigned int component) const +FEInterfaceValues::jump_shape_value( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const { const auto dof_pair = dofmap[interface_dof_index]; @@ -1199,7 +1277,18 @@ FEInterfaceValues::jump(const unsigned int interface_dof_index, template double -FEInterfaceValues::average( +FEInterfaceValues::jump(const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return jump_shape_value(interface_dof_index, q_point, component); +} + + + +template +double +FEInterfaceValues::average_shape_value( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1227,9 +1316,21 @@ FEInterfaceValues::average( +template +double +FEInterfaceValues::average( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return average_shape_value(interface_dof_index, q_point, component); +} + + + template Tensor<1, spacedim> -FEInterfaceValues::average_gradient( +FEInterfaceValues::average_shape_gradient( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1257,9 +1358,21 @@ FEInterfaceValues::average_gradient( +template +Tensor<1, spacedim> +FEInterfaceValues::average_gradient( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return average_shape_gradient(interface_dof_index, q_point, component); +} + + + template Tensor<2, spacedim> -FEInterfaceValues::average_hessian( +FEInterfaceValues::average_shape_hessian( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1287,9 +1400,21 @@ FEInterfaceValues::average_hessian( +template +Tensor<2, spacedim> +FEInterfaceValues::average_hessian( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return average_shape_hessian(interface_dof_index, q_point, component); +} + + + template Tensor<1, spacedim> -FEInterfaceValues::jump_gradient( +FEInterfaceValues::jump_shape_gradient( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1317,9 +1442,21 @@ FEInterfaceValues::jump_gradient( +template +Tensor<1, spacedim> +FEInterfaceValues::jump_gradient( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return jump_shape_gradient(interface_dof_index, q_point, component); +} + + + template Tensor<2, spacedim> -FEInterfaceValues::jump_hessian( +FEInterfaceValues::jump_shape_hessian( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1347,9 +1484,21 @@ FEInterfaceValues::jump_hessian( +template +Tensor<2, spacedim> +FEInterfaceValues::jump_hessian( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return jump_shape_hessian(interface_dof_index, q_point, component); +} + + + template Tensor<3, spacedim> -FEInterfaceValues::jump_3rd_derivative( +FEInterfaceValues::jump_shape_3rd_derivative( const unsigned int interface_dof_index, const unsigned int q_point, const unsigned int component) const @@ -1377,6 +1526,18 @@ FEInterfaceValues::jump_3rd_derivative( +template +Tensor<3, spacedim> +FEInterfaceValues::jump_3rd_derivative( + const unsigned int interface_dof_index, + const unsigned int q_point, + const unsigned int component) const +{ + return jump_shape_3rd_derivative(interface_dof_index, q_point, component); +} + + + /*------------ Inline functions: FEInterfaceValues------------*/ template inline const FEInterfaceViews::Scalar -- 2.39.5