LCOV - code coverage report
Current view: top level - src/fe - fe_lagrange_gll_shape_3D.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4573 (924896) with base 3f0912 Lines: 24 60 40.0 %
Date: 2026-11-18 21:52:26 Functions: 14 26 53.8 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // The libMesh Finite Element Library.
       2             : // Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
       3             : 
       4             : // This library is free software; you can redistribute it and/or
       5             : // modify it under the terms of the GNU Lesser General Public
       6             : // License as published by the Free Software Foundation; either
       7             : // version 2.1 of the License, or (at your option) any later version.
       8             : 
       9             : // This library is distributed in the hope that it will be useful,
      10             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12             : // Lesser General Public License for more details.
      13             : 
      14             : // You should have received a copy of the GNU Lesser General Public
      15             : // License along with this library; if not, write to the Free Software
      16             : // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      17             : 
      18             : 
      19             : 
      20             : // Local includes
      21             : #include "libmesh/fe.h"
      22             : #include "libmesh/elem.h"
      23             : #include "libmesh/fe_lagrange_gll_shape.h"
      24             : 
      25             : 
      26             : namespace libMesh
      27             : {
      28             : 
      29    39722608 : LIBMESH_DEFAULT_VECTORIZED_FE(3,L2_LAGRANGE_GLL)
      30    13691405 : LIBMESH_DEFAULT_VECTORIZED_FE(3,LAGRANGE_GLL)
      31             : 
      32             : 
      33             : template <>
      34           0 : Real FE<3,L2_LAGRANGE_GLL>::shape(const ElemType,
      35             :                                   const Order order,
      36             :                                   const unsigned int i,
      37             :                                   const Point & p)
      38             : {
      39             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
      40           0 :     (nullptr, order, i, p, nullptr, 0);
      41             : }
      42             : 
      43             : 
      44             : template <>
      45    15351748 : Real FE<3,L2_LAGRANGE_GLL>::shape(const Elem * elem,
      46             :                                   const Order order,
      47             :                                   const unsigned int i,
      48             :                                   const Point & p,
      49             :                                   const bool add_p_level)
      50             : {
      51     3837937 :   libmesh_assert(elem);
      52             : 
      53             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
      54    23027622 :     (elem, order + add_p_level*elem->p_level(), i, p, nullptr, 0);
      55             : }
      56             : 
      57             : 
      58             : template <>
      59           0 : Real FE<3,L2_LAGRANGE_GLL>::shape(const FEType fet,
      60             :                                   const Elem * elem,
      61             :                                   const unsigned int i,
      62             :                                   const Point & p,
      63             :                                   const bool add_p_level)
      64             : {
      65           0 :   libmesh_assert(elem);
      66             : 
      67             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
      68           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, nullptr, 0);
      69             : }
      70             : 
      71             : 
      72             : template <>
      73           0 : Real FE<3,L2_LAGRANGE_GLL>::shape_deriv(const ElemType,
      74             :                                         const Order order,
      75             :                                         const unsigned int i,
      76             :                                         const unsigned int j,
      77             :                                         const Point & p)
      78             : {
      79           0 :   libmesh_assert_less (j, 3);
      80             : 
      81             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
      82           0 :     (nullptr, order, i, p, &j, 1);
      83             : }
      84             : 
      85             : 
      86             : template <>
      87    31681368 : Real FE<3,L2_LAGRANGE_GLL>::shape_deriv(const Elem * elem,
      88             :                                         const Order order,
      89             :                                         const unsigned int i,
      90             :                                         const unsigned int j,
      91             :                                         const Point & p,
      92             :                                         const bool add_p_level)
      93             : {
      94     7920342 :   libmesh_assert(elem);
      95     7920342 :   libmesh_assert_less (j, 3);
      96             : 
      97             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
      98    47522052 :     (elem, order + add_p_level*elem->p_level(), i, p, &j, 1);
      99             : }
     100             : 
     101             : 
     102             : template <>
     103           0 : Real FE<3,L2_LAGRANGE_GLL>::shape_deriv(const FEType fet,
     104             :                                         const Elem * elem,
     105             :                                         const unsigned int i,
     106             :                                         const unsigned int j,
     107             :                                         const Point & p,
     108             :                                         const bool add_p_level)
     109             : {
     110           0 :   libmesh_assert(elem);
     111           0 :   libmesh_assert_less (j, 3);
     112             : 
     113             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
     114           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, &j, 1);
     115             : }
     116             : 
     117             : 
     118             : template <>
     119           0 : Real FE<3,LAGRANGE_GLL>::shape(const ElemType,
     120             :                                const Order,
     121             :                                const unsigned int,
     122             :                                const Point &)
     123             : {
     124           0 :   libmesh_error_msg("The LAGRANGE_GLL shape functions depend on the orientation of the "
     125             :                     "entity that owns each degree of freedom. Pass an Elem.");
     126             :   return 0.;
     127             : }
     128             : 
     129             : 
     130             : template <>
     131    20151068 : Real FE<3,LAGRANGE_GLL>::shape(const Elem * elem,
     132             :                                const Order order,
     133             :                                const unsigned int i,
     134             :                                const Point & p,
     135             :                                const bool add_p_level)
     136             : {
     137     5071500 :   libmesh_assert(elem);
     138             : 
     139             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     140    30294068 :     (elem, order + add_p_level*elem->p_level(), i, p, nullptr, 0);
     141             : }
     142             : 
     143             : 
     144             : template <>
     145           0 : Real FE<3,LAGRANGE_GLL>::shape(const FEType fet,
     146             :                                const Elem * elem,
     147             :                                const unsigned int i,
     148             :                                const Point & p,
     149             :                                const bool add_p_level)
     150             : {
     151           0 :   libmesh_assert(elem);
     152             : 
     153             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     154           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, nullptr, 0);
     155             : }
     156             : 
     157             : 
     158             : template <>
     159           0 : Real FE<3,LAGRANGE_GLL>::shape_deriv(const ElemType,
     160             :                                      const Order,
     161             :                                      const unsigned int,
     162             :                                      const unsigned int,
     163             :                                      const Point &)
     164             : {
     165           0 :   libmesh_error_msg("The LAGRANGE_GLL shape functions depend on the orientation of the "
     166             :                     "entity that owns each degree of freedom. Pass an Elem.");
     167             :   return 0.;
     168             : }
     169             : 
     170             : 
     171             : template <>
     172    10560456 : Real FE<3,LAGRANGE_GLL>::shape_deriv(const Elem * elem,
     173             :                                      const Order order,
     174             :                                      const unsigned int i,
     175             :                                      const unsigned int j,
     176             :                                      const Point & p,
     177             :                                      const bool add_p_level)
     178             : {
     179     2640114 :   libmesh_assert(elem);
     180     2640114 :   libmesh_assert_less (j, 3);
     181             : 
     182             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     183    15840684 :     (elem, order + add_p_level*elem->p_level(), i, p, &j, 1);
     184             : }
     185             : 
     186             : 
     187             : template <>
     188           0 : Real FE<3,LAGRANGE_GLL>::shape_deriv(const FEType fet,
     189             :                                      const Elem * elem,
     190             :                                      const unsigned int i,
     191             :                                      const unsigned int j,
     192             :                                      const Point & p,
     193             :                                      const bool add_p_level)
     194             : {
     195           0 :   libmesh_assert(elem);
     196           0 :   libmesh_assert_less (j, 3);
     197             : 
     198             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     199           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, &j, 1);
     200             : }
     201             : 
     202             : 
     203             : #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
     204             : 
     205             : template <>
     206           0 : Real FE<3,L2_LAGRANGE_GLL>::shape_second_deriv(const ElemType,
     207             :                                                const Order order,
     208             :                                                const unsigned int i,
     209             :                                                const unsigned int j,
     210             :                                                const Point & p)
     211             : {
     212           0 :   libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
     213             : 
     214             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
     215           0 :     (nullptr, order, i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
     216             : }
     217             : 
     218             : 
     219             : template <>
     220    63362736 : Real FE<3,L2_LAGRANGE_GLL>::shape_second_deriv(const Elem * elem,
     221             :                                                const Order order,
     222             :                                                const unsigned int i,
     223             :                                                const unsigned int j,
     224             :                                                const Point & p,
     225             :                                                const bool add_p_level)
     226             : {
     227    15840684 :   libmesh_assert(elem);
     228    15840684 :   libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
     229             : 
     230             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
     231    95044104 :     (elem, order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
     232             : }
     233             : 
     234             : 
     235             : template <>
     236           0 : Real FE<3,L2_LAGRANGE_GLL>::shape_second_deriv(const FEType fet,
     237             :                                                const Elem * elem,
     238             :                                                const unsigned int i,
     239             :                                                const unsigned int j,
     240             :                                                const Point & p,
     241             :                                                const bool add_p_level)
     242             : {
     243           0 :   libmesh_assert(elem);
     244           0 :   libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
     245             : 
     246             :   return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 3>
     247           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
     248             : }
     249             : 
     250             : 
     251             : template <>
     252           0 : Real FE<3,LAGRANGE_GLL>::shape_second_deriv(const ElemType,
     253             :                                             const Order,
     254             :                                             const unsigned int,
     255             :                                             const unsigned int,
     256             :                                             const Point &)
     257             : {
     258           0 :   libmesh_error_msg("The LAGRANGE_GLL shape functions depend on the orientation of the "
     259             :                     "entity that owns each degree of freedom. Pass an Elem.");
     260             :   return 0.;
     261             : }
     262             : 
     263             : 
     264             : template <>
     265    21120912 : Real FE<3,LAGRANGE_GLL>::shape_second_deriv(const Elem * elem,
     266             :                                             const Order order,
     267             :                                             const unsigned int i,
     268             :                                             const unsigned int j,
     269             :                                             const Point & p,
     270             :                                             const bool add_p_level)
     271             : {
     272     5280228 :   libmesh_assert(elem);
     273     5280228 :   libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
     274             : 
     275             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     276    31681368 :     (elem, order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
     277             : }
     278             : 
     279             : 
     280             : template <>
     281           0 : Real FE<3,LAGRANGE_GLL>::shape_second_deriv(const FEType fet,
     282             :                                             const Elem * elem,
     283             :                                             const unsigned int i,
     284             :                                             const unsigned int j,
     285             :                                             const Point & p,
     286             :                                             const bool add_p_level)
     287             : {
     288           0 :   libmesh_assert(elem);
     289           0 :   libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<3>());
     290             : 
     291             :   return fe_lagrange_gll_tensor_product<LAGRANGE_GLL, 3>
     292           0 :     (elem, fet.order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
     293             : }
     294             : 
     295             : 
     296             : #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
     297             : 
     298             : } // namespace libMesh

Generated by: LCOV version 1.14