LCOV - code coverage report
Current view: top level - src/fe - fe_lagrange_shape_1D.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 29 50 58.0 %
Date: 2025-08-19 19:27:09 Functions: 17 26 65.4 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // The libMesh Finite Element Library.
       2             : // Copyright (C) 2002-2025 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             : // Local includes
      20             : #include "libmesh/fe.h"
      21             : #include "libmesh/elem.h"
      22             : #include "libmesh/fe_lagrange_shape_1D.h"
      23             : 
      24             : 
      25             : namespace libMesh
      26             : {
      27             : 
      28             : 
      29      980603 : LIBMESH_DEFAULT_VECTORIZED_FE(1,LAGRANGE)
      30       15312 : LIBMESH_DEFAULT_VECTORIZED_FE(1,L2_LAGRANGE)
      31             : 
      32             : 
      33             : template <>
      34           0 : Real FE<1,LAGRANGE>::shape(const ElemType,
      35             :                            const Order order,
      36             :                            const unsigned int i,
      37             :                            const Point & p)
      38             : {
      39           0 :   return fe_lagrange_1D_shape(order, i, p(0));
      40             : }
      41             : 
      42             : template <>
      43           0 : Real FE<1,L2_LAGRANGE>::shape(const ElemType,
      44             :                               const Order order,
      45             :                               const unsigned int i,
      46             :                               const Point & p)
      47             : {
      48           0 :   return fe_lagrange_1D_shape(order, i, p(0));
      49             : }
      50             : 
      51             : 
      52             : template <>
      53     1108981 : Real FE<1,LAGRANGE>::shape(const Elem * elem,
      54             :                            const Order order,
      55             :                            const unsigned int i,
      56             :                            const Point & p,
      57             :                            const bool add_p_level)
      58             : {
      59      234371 :   libmesh_assert(elem);
      60             : 
      61     1578285 :   return fe_lagrange_1D_shape(order + add_p_level*elem->p_level(), i, p(0));
      62             : }
      63             : 
      64             : 
      65             : 
      66             : template <>
      67    77153575 : Real FE<1,LAGRANGE>::shape(const FEType fet,
      68             :                            const Elem * elem,
      69             :                            const unsigned int i,
      70             :                            const Point & p,
      71             :                            const bool add_p_level)
      72             : {
      73     7092154 :   libmesh_assert(elem);
      74    90897647 :   return fe_lagrange_1D_shape(fet.order + add_p_level*elem->p_level(), i, p(0));
      75             : }
      76             : 
      77             : template <>
      78        8232 : Real FE<1,L2_LAGRANGE>::shape(const Elem * elem,
      79             :                               const Order order,
      80             :                               const unsigned int i,
      81             :                               const Point & p,
      82             :                               const bool add_p_level)
      83             : {
      84         686 :   libmesh_assert(elem);
      85             : 
      86        9604 :   return fe_lagrange_1D_shape(order + add_p_level*elem->p_level(), i, p(0));
      87             : }
      88             : 
      89             : template <>
      90           0 : Real FE<1,L2_LAGRANGE>::shape(const FEType fet,
      91             :                               const Elem * elem,
      92             :                               const unsigned int i,
      93             :                               const Point & p,
      94             :                               const bool add_p_level)
      95             : {
      96           0 :   libmesh_assert(elem);
      97           0 :   return fe_lagrange_1D_shape(fet.order + add_p_level*elem->p_level(), i, p(0));
      98             : }
      99             : 
     100             : 
     101             : 
     102             : template <>
     103           0 : Real FE<1,LAGRANGE>::shape_deriv(const ElemType,
     104             :                                  const Order order,
     105             :                                  const unsigned int i,
     106             :                                  const unsigned int j,
     107             :                                  const Point & p)
     108             : {
     109           0 :   return fe_lagrange_1D_shape_deriv(order, i, j, p(0));
     110             : }
     111             : 
     112             : 
     113             : 
     114             : template <>
     115           0 : Real FE<1,L2_LAGRANGE>::shape_deriv(const ElemType,
     116             :                                     const Order order,
     117             :                                     const unsigned int i,
     118             :                                     const unsigned int j,
     119             :                                     const Point & p)
     120             : {
     121           0 :   return fe_lagrange_1D_shape_deriv(order, i, j, p(0));
     122             : }
     123             : 
     124             : 
     125             : 
     126             : template <>
     127      629527 : Real FE<1,LAGRANGE>::shape_deriv(const Elem * elem,
     128             :                                  const Order order,
     129             :                                  const unsigned int i,
     130             :                                  const unsigned int j,
     131             :                                  const Point & p,
     132             :                                  const bool add_p_level)
     133             : {
     134       50463 :   libmesh_assert(elem);
     135             : 
     136      731077 :   return fe_lagrange_1D_shape_deriv(order + add_p_level*elem->p_level(), i, j, p(0));
     137             : }
     138             : 
     139             : 
     140             : 
     141             : template <>
     142        5592 : Real FE<1,L2_LAGRANGE>::shape_deriv(const Elem * elem,
     143             :                                     const Order order,
     144             :                                     const unsigned int i,
     145             :                                     const unsigned int j,
     146             :                                     const Point & p,
     147             :                                     const bool add_p_level)
     148             : {
     149         466 :   libmesh_assert(elem);
     150             : 
     151        6524 :   return fe_lagrange_1D_shape_deriv(order + add_p_level*elem->p_level(), i, j, p(0));
     152             : }
     153             : 
     154             : 
     155             : template <>
     156   346872294 : Real FE<1,LAGRANGE>::shape_deriv(const FEType fet,
     157             :                                  const Elem * elem,
     158             :                                  const unsigned int i,
     159             :                                  const unsigned int j,
     160             :                                  const Point & p,
     161             :                                  const bool add_p_level)
     162             : {
     163    27514221 :   libmesh_assert(elem);
     164   401755760 :   return fe_lagrange_1D_shape_deriv(fet.order + add_p_level*elem->p_level(), i, j, p(0));
     165             : }
     166             : 
     167             : 
     168             : template <>
     169           0 : Real FE<1,L2_LAGRANGE>::shape_deriv(const FEType fet,
     170             :                                     const Elem * elem,
     171             :                                     const unsigned int i,
     172             :                                     const unsigned int j,
     173             :                                     const Point & p,
     174             :                                     const bool add_p_level)
     175             : {
     176           0 :   libmesh_assert(elem);
     177           0 :   return fe_lagrange_1D_shape_deriv(fet.order + add_p_level*elem->p_level(), i, j, p(0));
     178             : }
     179             : 
     180             : 
     181             : #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
     182             : 
     183             : template <>
     184           0 : Real FE<1,LAGRANGE>::shape_second_deriv(const ElemType,
     185             :                                         const Order order,
     186             :                                         const unsigned int i,
     187             :                                         const unsigned int j,
     188             :                                         const Point & p)
     189             : {
     190           0 :   return fe_lagrange_1D_shape_second_deriv(order, i, j, p(0));
     191             : }
     192             : 
     193             : 
     194             : 
     195             : template <>
     196           0 : Real FE<1,L2_LAGRANGE>::shape_second_deriv(const ElemType,
     197             :                                            const Order order,
     198             :                                            const unsigned int i,
     199             :                                            const unsigned int j,
     200             :                                            const Point & p)
     201             : {
     202           0 :   return fe_lagrange_1D_shape_second_deriv(order, i, j, p(0));
     203             : }
     204             : 
     205             : 
     206             : 
     207             : template <>
     208        4030 : Real FE<1,LAGRANGE>::shape_second_deriv(const Elem * elem,
     209             :                                         const Order order,
     210             :                                         const unsigned int i,
     211             :                                         const unsigned int j,
     212             :                                         const Point & p,
     213             :                                         const bool add_p_level)
     214             : {
     215         321 :   libmesh_assert(elem);
     216             : 
     217        4672 :   return fe_lagrange_1D_shape_second_deriv(order + add_p_level*elem->p_level(), i, j, p(0));
     218             : }
     219             : 
     220             : 
     221             : 
     222             : template <>
     223        5592 : Real FE<1,L2_LAGRANGE>::shape_second_deriv(const Elem * elem,
     224             :                                            const Order order,
     225             :                                            const unsigned int i,
     226             :                                            const unsigned int j,
     227             :                                            const Point & p,
     228             :                                            const bool add_p_level)
     229             : {
     230         466 :   libmesh_assert(elem);
     231             : 
     232        6524 :   return fe_lagrange_1D_shape_second_deriv(order + add_p_level*elem->p_level(), i, j, p(0));
     233             : }
     234             : 
     235             : 
     236             : template <>
     237     1569338 : Real FE<1,LAGRANGE>::shape_second_deriv(const FEType fet,
     238             :                                         const Elem * elem,
     239             :                                         const unsigned int i,
     240             :                                         const unsigned int j,
     241             :                                         const Point & p,
     242             :                                         const bool add_p_level)
     243             : {
     244       94641 :   libmesh_assert(elem);
     245     1757102 :   return fe_lagrange_1D_shape_second_deriv(fet.order + add_p_level*elem->p_level(), i, j, p(0));
     246             : }
     247             : 
     248             : 
     249             : template <>
     250           0 : Real FE<1,L2_LAGRANGE>::shape_second_deriv(const FEType fet,
     251             :                                            const Elem * elem,
     252             :                                            const unsigned int i,
     253             :                                            const unsigned int j,
     254             :                                            const Point & p,
     255             :                                            const bool add_p_level)
     256             : {
     257           0 :   libmesh_assert(elem);
     258           0 :   return fe_lagrange_1D_shape_second_deriv(fet.order + add_p_level*elem->p_level(), i, j, p(0));
     259             : }
     260             : 
     261             : #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
     262             : 
     263             : } // namespace libMesh
     264             : 

Generated by: LCOV version 1.14