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 :
23 :
24 : namespace libMesh
25 : {
26 :
27 :
28 6168 : LIBMESH_DEFAULT_VECTORIZED_FE(0,LAGRANGE)
29 0 : LIBMESH_DEFAULT_VECTORIZED_FE(0,L2_LAGRANGE)
30 :
31 :
32 : template <>
33 0 : Real FE<0,L2_LAGRANGE>::shape(const ElemType,
34 : const Order,
35 : const unsigned int libmesh_dbg_var(i),
36 : const Point &)
37 : {
38 0 : libmesh_assert_less (i, 1);
39 0 : return 1.;
40 : }
41 :
42 :
43 : template <>
44 0 : Real FE<0,LAGRANGE>::shape(const ElemType,
45 : const Order,
46 : const unsigned int libmesh_dbg_var(i),
47 : const Point &)
48 : {
49 0 : libmesh_assert_less (i, 1);
50 0 : return 1.;
51 : }
52 :
53 :
54 :
55 : template <>
56 0 : Real FE<0,L2_LAGRANGE>::shape(const Elem *,
57 : const Order,
58 : const unsigned int libmesh_dbg_var(i),
59 : const Point &,
60 : const bool)
61 : {
62 0 : libmesh_assert_less (i, 1);
63 0 : return 1.;
64 : }
65 :
66 :
67 : template <>
68 3100 : Real FE<0,LAGRANGE>::shape(const Elem *,
69 : const Order,
70 : const unsigned int libmesh_dbg_var(i),
71 : const Point &,
72 : const bool)
73 : {
74 265 : libmesh_assert_less (i, 1);
75 3100 : return 1.;
76 : }
77 :
78 :
79 :
80 : template <>
81 0 : Real FE<0,L2_LAGRANGE>::shape(const FEType,
82 : const Elem *,
83 : const unsigned int libmesh_dbg_var(i),
84 : const Point &,
85 : const bool)
86 : {
87 0 : libmesh_assert_less (i, 1);
88 0 : return 1.;
89 : }
90 :
91 :
92 : template <>
93 70428 : Real FE<0,LAGRANGE>::shape(const FEType,
94 : const Elem *,
95 : const unsigned int libmesh_dbg_var(i),
96 : const Point &,
97 : const bool)
98 : {
99 5847 : libmesh_assert_less (i, 1);
100 70428 : return 1.;
101 : }
102 :
103 :
104 : template <>
105 0 : Real FE<0,L2_LAGRANGE>::shape_deriv(const ElemType,
106 : const Order,
107 : const unsigned int,
108 : const unsigned int,
109 : const Point &)
110 : {
111 0 : libmesh_error_msg("No spatial derivatives in 0D!");
112 : return 0.;
113 : }
114 :
115 :
116 :
117 : template <>
118 0 : Real FE<0,L2_LAGRANGE>::shape_deriv(const Elem *,
119 : const Order,
120 : const unsigned int,
121 : const unsigned int,
122 : const Point &,
123 : const bool)
124 : {
125 0 : libmesh_error_msg("No spatial derivatives in 0D!");
126 : return 0.;
127 : }
128 :
129 :
130 :
131 : template <>
132 0 : Real FE<0,LAGRANGE>::shape_deriv(const ElemType,
133 : const Order,
134 : const unsigned int,
135 : const unsigned int,
136 : const Point &)
137 : {
138 0 : libmesh_error_msg("No spatial derivatives in 0D!");
139 : return 0.;
140 : }
141 :
142 :
143 :
144 : template <>
145 0 : Real FE<0,LAGRANGE>::shape_deriv(const Elem *,
146 : const Order,
147 : const unsigned int,
148 : const unsigned int,
149 : const Point &,
150 : const bool)
151 : {
152 0 : libmesh_error_msg("No spatial derivatives in 0D!");
153 : return 0.;
154 : }
155 :
156 :
157 :
158 : template <>
159 0 : Real FE<0,L2_LAGRANGE>::shape_deriv(const FEType,
160 : const Elem *,
161 : const unsigned int,
162 : const unsigned int,
163 : const Point &,
164 : const bool)
165 : {
166 0 : libmesh_error_msg("No spatial derivatives in 0D!");
167 : return 0.;
168 : }
169 :
170 :
171 : template <>
172 0 : Real FE<0,LAGRANGE>::shape_deriv(const FEType,
173 : const Elem *,
174 : const unsigned int,
175 : const unsigned int,
176 : const Point &,
177 : const bool)
178 : {
179 0 : libmesh_error_msg("No spatial derivatives in 0D!");
180 : return 0.;
181 : }
182 :
183 :
184 :
185 : #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
186 :
187 : template <>
188 0 : Real FE<0,L2_LAGRANGE>::shape_second_deriv(const ElemType,
189 : const Order,
190 : const unsigned int,
191 : const unsigned int,
192 : const Point &)
193 : {
194 0 : libmesh_error_msg("No spatial derivatives in 0D!");
195 : return 0.;
196 : }
197 :
198 :
199 :
200 : template <>
201 0 : Real FE<0,L2_LAGRANGE>::shape_second_deriv(const Elem *,
202 : const Order,
203 : const unsigned int,
204 : const unsigned int,
205 : const Point &,
206 : const bool)
207 : {
208 0 : libmesh_error_msg("No spatial derivatives in 0D!");
209 : return 0.;
210 : }
211 :
212 : template <>
213 0 : Real FE<0,LAGRANGE>::shape_second_deriv(const ElemType,
214 : const Order,
215 : const unsigned int,
216 : const unsigned int,
217 : const Point &)
218 : {
219 0 : libmesh_error_msg("No spatial derivatives in 0D!");
220 : return 0.;
221 : }
222 :
223 :
224 :
225 : template <>
226 0 : Real FE<0,LAGRANGE>::shape_second_deriv(const Elem *,
227 : const Order,
228 : const unsigned int,
229 : const unsigned int,
230 : const Point &,
231 : const bool)
232 : {
233 0 : libmesh_error_msg("No spatial derivatives in 0D!");
234 : return 0.;
235 : }
236 :
237 :
238 : template <>
239 0 : Real FE<0,L2_LAGRANGE>::shape_second_deriv(const FEType,
240 : const Elem *,
241 : const unsigned int,
242 : const unsigned int,
243 : const Point &,
244 : const bool)
245 : {
246 0 : libmesh_error_msg("No spatial derivatives in 0D!");
247 : return 0.;
248 : }
249 :
250 :
251 : template <>
252 0 : Real FE<0,LAGRANGE>::shape_second_deriv(const FEType,
253 : const Elem *,
254 : const unsigned int,
255 : const unsigned int,
256 : const Point &,
257 : const bool)
258 : {
259 0 : libmesh_error_msg("No spatial derivatives in 0D!");
260 : return 0.;
261 : }
262 :
263 : #endif
264 :
265 :
266 : } // namespace libMesh
|