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 :
30 88992 : LIBMESH_DEFAULT_VECTORIZED_FE(1,L2_LAGRANGE_GLL)
31 :
32 :
33 : template <>
34 0 : Real FE<1,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, 1>
40 0 : (nullptr, order, i, p, nullptr, 0);
41 : }
42 :
43 :
44 : template <>
45 87708 : Real FE<1,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 7309 : libmesh_assert(elem);
52 :
53 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
54 102326 : (elem, order + add_p_level*elem->p_level(), i, p, nullptr, 0);
55 : }
56 :
57 :
58 : template <>
59 0 : Real FE<1,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, 1>
68 0 : (elem, fet.order + add_p_level*elem->p_level(), i, p, nullptr, 0);
69 : }
70 :
71 :
72 : template <>
73 0 : Real FE<1,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, 1);
80 :
81 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
82 0 : (nullptr, order, i, p, &j, 1);
83 : }
84 :
85 :
86 : template <>
87 35064 : Real FE<1,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 2922 : libmesh_assert(elem);
95 2922 : libmesh_assert_less (j, 1);
96 :
97 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
98 40908 : (elem, order + add_p_level*elem->p_level(), i, p, &j, 1);
99 : }
100 :
101 :
102 : template <>
103 0 : Real FE<1,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, 1);
112 :
113 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
114 0 : (elem, fet.order + add_p_level*elem->p_level(), i, p, &j, 1);
115 : }
116 :
117 :
118 : #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
119 :
120 : template <>
121 0 : Real FE<1,L2_LAGRANGE_GLL>::shape_second_deriv(const ElemType,
122 : const Order order,
123 : const unsigned int i,
124 : const unsigned int j,
125 : const Point & p)
126 : {
127 0 : libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<1>());
128 :
129 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
130 0 : (nullptr, order, i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
131 : }
132 :
133 :
134 : template <>
135 35064 : Real FE<1,L2_LAGRANGE_GLL>::shape_second_deriv(const Elem * elem,
136 : const Order order,
137 : const unsigned int i,
138 : const unsigned int j,
139 : const Point & p,
140 : const bool add_p_level)
141 : {
142 2922 : libmesh_assert(elem);
143 2922 : libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<1>());
144 :
145 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
146 40908 : (elem, order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
147 : }
148 :
149 :
150 : template <>
151 0 : Real FE<1,L2_LAGRANGE_GLL>::shape_second_deriv(const FEType fet,
152 : const Elem * elem,
153 : const unsigned int i,
154 : const unsigned int j,
155 : const Point & p,
156 : const bool add_p_level)
157 : {
158 0 : libmesh_assert(elem);
159 0 : libmesh_assert_less (j, fe_lagrange_gll_n_second_derivs<1>());
160 :
161 : return fe_lagrange_gll_tensor_product<L2_LAGRANGE_GLL, 1>
162 0 : (elem, fet.order + add_p_level*elem->p_level(), i, p, fe_lagrange_gll_second_deriv_pairs[j], 2);
163 : }
164 :
165 :
166 : #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
167 :
168 : } // namespace libMesh
|