Intrepid2
Intrepid2_HGRAD_WEDGE_C2_FEMDef.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Intrepid2 Package
4 //
5 // Copyright 2007 NTESS and the Intrepid2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
16 #ifndef __INTREPID2_HGRAD_WEDGE_C2_FEM_DEF_HPP__
17 #define __INTREPID2_HGRAD_WEDGE_C2_FEM_DEF_HPP__
18 
19 namespace Intrepid2 {
20 
21  // -------------------------------------------------------------------------------------
22  namespace Impl {
23 
24  template<bool serendipity>
25  template<EOperator opType>
26  template<typename OutputViewType,
27  typename inputViewType>
28  KOKKOS_INLINE_FUNCTION
29  void
30  Basis_HGRAD_WEDGE_DEG2_FEM<serendipity>::Serial<opType>::
31  getValues( OutputViewType output,
32  const inputViewType input ) {
33  typedef typename inputViewType::value_type value_type;
34  switch (opType) {
35  case OPERATOR_VALUE: {
36  const value_type x = input(0);
37  const value_type y = input(1);
38  const value_type z = input(2);
39  const value_type w = 1.0 - x - y;
40 
41  // output is a rank-1 array with dimensions (basisCardinality_)
42  if constexpr (!serendipity) {
43  output.access(0) = -(w*(-1. + 2.*x + 2.*y)*(-1. + z)*z)/2.;
44  output.access(1) = (x*(-1. + 2.*x)*(-1. + z)*z)/2.;
45  output.access(2) = (y*(-1. + 2.*y)*(-1. + z)*z)/2.;
46  output.access(3) = -(w*(-1. + 2.*x + 2.*y)*z*(1. + z))/2.;
47  output.access(4) = (x*(-1. + 2.*x)*z*(1. + z))/2.;
48  output.access(5) = (y*(-1. + 2.*y)*z*(1. + z))/2.;
49 
50  output.access(6) = 2.*x*w*(-1. + z)*z;
51  output.access(7) = 2.*x*y*(-1. + z)*z;
52  output.access(8) = 2.*y*w*(-1. + z)*z;
53  output.access(9) = (w*(-1. + 2.*x + 2.*y)*(-1. + z)*(1. + z));
54  output.access(10) = -(x*(-1. + 2.*x)*(-1. + z)*(1. + z));
55  output.access(11) = -(y*(-1. + 2.*y)*(-1. + z)*(1. + z));
56  output.access(12) = 2.*x*w*z*(1. + z);
57  output.access(13) = 2.*x*y*z*(1. + z);
58  output.access(14) = 2.*y*w*z*(1. + z);
59 
60  output.access(15) = -4.*x*w*(-1. + z)*(1. + z);
61  output.access(16) = -4.*x*y*(-1. + z)*(1. + z);
62  output.access(17) = -4.*y*w*(-1. + z)*(1. + z);
63  } else {
64  output.access(0) = 0.5 * w *(2.0*w - 2.0 - z)*(1.0 - z);
65  output.access(1) = 0.5 * x *(2.0*x - 2.0 - z)*(1.0 - z);
66  output.access(2) = 0.5 * y *(2.0*y - 2.0 - z)*(1.0 - z);
67  output.access(3) = 0.5 * w *(2.0*w - 2.0 + z)*(1.0 + z);
68  output.access(4) = 0.5 * x *(2.0*x - 2.0 + z)*(1.0 + z);
69  output.access(5) = 0.5 * y *(2.0*y - 2.0 + z)*(1.0 + z);
70 
71  output.access(6) = 2.0 * w * x * (1.0 - z);
72  output.access(7) = 2.0 * x * y * (1.0 - z);
73  output.access(8) = 2.0 * y * w * (1.0 - z);
74  output.access(9) = w * (1.0 - z*z);
75  output.access(10) = x * (1.0 - z*z);
76  output.access(11) = y * (1.0 - z*z);
77  output.access(12) = 2.0 * w * x * (1.0 + z);
78  output.access(13) = 2.0 * x * y * (1.0 + z);
79  output.access(14) = 2.0 * y * w * (1.0 + z);
80  }
81  break;
82  }
83  case OPERATOR_GRAD: {
84  const value_type x = input(0);
85  const value_type y = input(1);
86  const value_type z = input(2);
87 
88  if constexpr (!serendipity) {
89  output.access(0, 0) = ((-3 + 4*x + 4*y)*(-1 + z)*z)/2.;
90  output.access(0, 1) = ((-3 + 4*x + 4*y)*(-1 + z)*z)/2.;
91  output.access(0, 2) = ((-1 + x + y)*(-1 + 2*x + 2*y)*(-1 + 2*z))/2.;
92 
93  output.access(1, 0) = ((-1 + 4*x)*(-1 + z)*z)/2.;
94  output.access(1, 1) = 0.;
95  output.access(1, 2) = (x*(-1 + 2*x)*(-1 + 2*z))/2.;
96 
97  output.access(2, 0) = 0.;
98  output.access(2, 1) = ((-1 + 4*y)*(-1 + z)*z)/2.;
99  output.access(2, 2) = (y*(-1 + 2*y)*(-1 + 2*z))/2.;
100 
101  output.access(3, 0) = ((-3 + 4*x + 4*y)*z*(1 + z))/2.;
102  output.access(3, 1) = ((-3 + 4*x + 4*y)*z*(1 + z))/2.;
103  output.access(3, 2) = ((-1 + x + y)*(-1 + 2*x + 2*y)*(1 + 2*z))/2.;
104 
105  output.access(4, 0) = ((-1 + 4*x)*z*(1 + z))/2.;
106  output.access(4, 1) = 0.;
107  output.access(4, 2) = (x*(-1 + 2*x)*(1 + 2*z))/2.;
108 
109  output.access(5, 0) = 0.;
110  output.access(5, 1) = ((-1 + 4*y)*z*(1 + z))/2.;
111  output.access(5, 2) = (y*(-1 + 2*y)*(1 + 2*z))/2.;
112 
113  output.access(6, 0) = -2*(-1 + 2*x + y)*(-1 + z)*z;
114  output.access(6, 1) = -2*x*(-1 + z)*z;
115  output.access(6, 2) = 2*x*(-1 + x + y)*(1 - 2*z);
116 
117  output.access(7, 0) = 2*y*(-1 + z)*z;
118  output.access(7, 1) = 2*x*(-1 + z)*z;
119  output.access(7, 2) = 2*x*y*(-1 + 2*z);
120 
121  output.access(8, 0) = -2*y*(-1 + z)*z;
122  output.access(8, 1) = -2*(-1 + x + 2*y)*(-1 + z)*z;
123  output.access(8, 2) = 2*y*(-1 + x + y)*(1 - 2*z);
124 
125  output.access(9, 0) = -(-3 + 4*x + 4*y)*(-1 + z*z);
126  output.access(9, 1) = -(-3 + 4*x + 4*y)*(-1 + z*z);
127  output.access(9, 2) = -2*(1 + 2*x*x - 3*y + 2*y*y + x*(-3 + 4*y))*z;
128 
129  output.access(10, 0) = -(-1 + 4*x)*(-1 + z*z);
130  output.access(10, 1) = 0;
131  output.access(10, 2) = 2*(1 - 2*x)*x*z;
132 
133  output.access(11, 0) = 0;
134  output.access(11, 1) = -(-1 + 4*y)*(-1 + z*z);
135  output.access(11, 2) = 2*(1 - 2*y)*y*z;
136 
137  output.access(12, 0) = -2*(-1 + 2*x + y)*z*(1 + z);
138  output.access(12, 1) = -2*x*z*(1 + z);
139  output.access(12, 2) = -2*x*(-1 + x + y)*(1 + 2*z);
140 
141  output.access(13, 0) = 2*y*z*(1 + z);
142  output.access(13, 1) = 2*x*z*(1 + z);
143  output.access(13, 2) = 2*x*y*(1 + 2*z);
144 
145  output.access(14, 0) = -2*y*z*(1 + z);
146  output.access(14, 1) = -2*(-1 + x + 2*y)*z*(1 + z);
147  output.access(14, 2) = -2*y*(-1 + x + y)*(1 + 2*z);
148 
149 
150  output.access(15, 0) = 4*(-1 + 2*x + y)*(-1 + z*z);
151  output.access(15, 1) = 4*x*(-1 + z)*(1 + z);
152  output.access(15, 2) = 8*x*(-1 + x + y)*z;
153 
154  output.access(16, 0) = -4*y*(-1 + z)*(1 + z);
155  output.access(16, 1) = -4*x*(-1 + z)*(1 + z);
156  output.access(16, 2) = -8*x*y*z;
157 
158  output.access(17, 0) = 4*y*(-1 + z)*(1 + z);
159  output.access(17, 1) = 4*(-1 + x + 2*y)*(-1 + z*z);
160  output.access(17, 2) = 8*y*(-1 + x + y)*z;
161  } else {
162  const value_type w = 1.0 - x - y;
163 
164  output.access(0, 0) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z);
165  output.access(0, 1) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z);
166  output.access(0, 2) = -0.5*w*(2.0*w - 1.0 - 2.0*z);
167 
168  output.access(1, 0) = (2.0*x - 1.0 - 0.5*z)*(1.0 - z);
169  output.access(1, 1) = 0.0;
170  output.access(1, 2) = -0.5*x*(2.0*x - 1.0 - 2.0*z);
171 
172  output.access(2, 0) = 0.0;
173  output.access(2, 1) = (2.0*y - 1.0 - 0.5*z)*(1.0 - z);
174  output.access(2, 2) = -0.5*y*(2.0*y - 1.0 - 2.0*z);
175 
176  output.access(3, 0) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z);
177  output.access(3, 1) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z);
178  output.access(3, 2) = 0.5*w*(2.0*w - 1.0 + 2.0*z);
179 
180  output.access(4, 0) = (2.0*x - 1.0 + 0.5*z)*(1.0 + z);
181  output.access(4, 1) = 0.0;
182  output.access(4, 2) = 0.5*x*(2.0*x - 1.0 + 2.0*z);
183 
184  output.access(5, 0) = 0.0;
185  output.access(5, 1) = (2.0*y - 1.0 + 0.5*z)*(1.0 + z);
186  output.access(5, 2) = 0.5*y*(2.0*y - 1.0 + 2.0*z);
187 
188  output.access(6, 0) = 2.0*(w - x)*(1.0 - z);
189  output.access(6, 1) = -2.0*x*(1.0 - z);
190  output.access(6, 2) = -2.0*x*w;
191 
192  output.access(7, 0) = 2.0*y*(1.0 - z);
193  output.access(7, 1) = 2.0*x*(1.0 - z);
194  output.access(7, 2) = -2.0*x*y;
195 
196  output.access(8, 0) = -2.0*y*(1.0 - z);
197  output.access(8, 1) = 2.0*(w - y)*(1.0 - z);
198  output.access(8, 2) = -2.0*w*y;
199 
200  output.access(9, 0) = -(1.0 - z*z);
201  output.access(9, 1) = -(1.0 - z*z);
202  output.access(9, 2) = -2.0*z*w;
203 
204  output.access(10,0) = (1.0 - z*z);
205  output.access(10,1) = 0.0;
206  output.access(10,2) = -2.0*z*x;
207 
208  output.access(11,0) = 0.0;
209  output.access(11,1) = (1.0 - z*z);
210  output.access(11,2) = -2.0*z*y;
211 
212  output.access(12,0) = 2.0*(w - x)*(1.0 + z);
213  output.access(12,1) = -2.0*x*(1.0 + z);
214  output.access(12,2) = 2.0*x*w;
215 
216  output.access(13,0) = 2.0*y*(1.0 + z);
217  output.access(13,1) = 2.0*x*(1.0 + z);
218  output.access(13,2) = 2.0*x*y;
219 
220  output.access(14,0) = -2.0*y*(1.0 + z);
221  output.access(14,1) = 2.0*(w - y)*(1.0 + z);
222  output.access(14,2) = 2.0*w*y;
223  }
224  break;
225  }
226  case OPERATOR_D2: {
227  const value_type x = input(0);
228  const value_type y = input(1);
229  const value_type z = input(2);
230 
231  if constexpr (!serendipity) {
232  output.access(0, 0) = 2.*(-1. + z)*z;
233  output.access(0, 1) = 2.*(-1. + z)*z;
234  output.access(0, 2) = ((-3. + 4.*x + 4.*y)*(-1. + 2.*z))/2.;
235  output.access(0, 3) = 2.*(-1. + z)*z;
236  output.access(0, 4) = ((-3. + 4.*x + 4.*y)*(-1. + 2.*z))/2.;
237  output.access(0, 5) = (-1. + x + y)*(-1. + 2.*x + 2.*y);
238 
239  output.access(1, 0) = 2.*(-1. + z)*z;
240  output.access(1, 1) = 0.;
241  output.access(1, 2) = ((-1. + 4.*x)*(-1. + 2.*z))/2.;
242  output.access(1, 3) = 0.;
243  output.access(1, 4) = 0.;
244  output.access(1, 5) = x*(-1. + 2.*x);
245 
246  output.access(2, 0) = 0.;
247  output.access(2, 1) = 0.;
248  output.access(2, 2) = 0.;
249  output.access(2, 3) = 2.*(-1. + z)*z;
250  output.access(2, 4) = ((-1. + 4.*y)*(-1. + 2.*z))/2.;
251  output.access(2, 5) = y*(-1. + 2.*y);
252 
253  output.access(3, 0) = 2.*z*(1. + z);
254  output.access(3, 1) = 2.*z*(1. + z);
255  output.access(3, 2) = ((-3. + 4.*x + 4.*y)*(1. + 2.*z))/2.;
256  output.access(3, 3) = 2.*z*(1. + z);
257  output.access(3, 4) = ((-3. + 4.*x + 4.*y)*(1. + 2.*z))/2.;
258  output.access(3, 5) = (-1. + x + y)*(-1. + 2.*x + 2.*y);
259 
260  output.access(4, 0) = 2.*z*(1. + z);
261  output.access(4, 1) = 0.;
262  output.access(4, 2) = ((-1. + 4.*x)*(1. + 2.*z))/2.;
263  output.access(4, 3) = 0.;
264  output.access(4, 4) = 0.;
265  output.access(4, 5) = x*(-1. + 2.*x);
266 
267  output.access(5, 0) = 0.;
268  output.access(5, 1) = 0.;
269  output.access(5, 2) = 0.;
270  output.access(5, 3) = 2.*z*(1. + z);
271  output.access(5, 4) = ((-1. + 4.*y)*(1. + 2.*z))/2.;
272  output.access(5, 5) = y*(-1. + 2.*y);
273 
274  output.access(6, 0) = -4.*(-1. + z)*z;
275  output.access(6, 1) = -2.*(-1. + z)*z;
276  output.access(6, 2) = -2.*(-1. + 2.*x + y)*(-1. + 2.*z);
277  output.access(6, 3) = 0.;
278  output.access(6, 4) = x*(2. - 4.*z);
279  output.access(6, 5) = -4.*x*(-1. + x + y);
280 
281  output.access(7, 0) = 0.;
282  output.access(7, 1) = 2.*(-1. + z)*z;
283  output.access(7, 2) = 2.*y*(-1. + 2.*z);
284  output.access(7, 3) = 0.;
285  output.access(7, 4) = 2.*x*(-1. + 2.*z);
286  output.access(7, 5) = 4.*x*y;
287 
288  output.access(8, 0) = 0.;
289  output.access(8, 1) = -2.*(-1. + z)*z;
290  output.access(8, 2) = y*(2. - 4.*z);
291  output.access(8, 3) = -4.*(-1. + z)*z;
292  output.access(8, 4) = -2.*(-1. + x + 2.*y)*(-1. + 2.*z);
293  output.access(8, 5) = -4.*y*(-1. + x + y);
294 
295  output.access(9, 0) = 4. - 4.*z*z;
296  output.access(9, 1) = 4. - 4.*z*z;
297  output.access(9, 2) = -2.*(-3. + 4.*x + 4.*y)*z;
298  output.access(9, 3) = 4. - 4.*z*z;
299  output.access(9, 4) = -2.*(-3. + 4.*x + 4.*y)*z;
300  output.access(9, 5) = -2.*(-1. + x + y)*(-1. + 2.*x + 2.*y);
301 
302  output.access(10, 0) = 4. - 4.*z*z;
303  output.access(10, 1) = 0.;
304  output.access(10, 2) = (2. - 8.*x)*z;
305  output.access(10, 3) = 0.;
306  output.access(10, 4) = 0.;
307  output.access(10, 5) = -2.*x*(-1. + 2.*x);
308 
309  output.access(11, 0) = 0.;
310  output.access(11, 1) = 0.;
311  output.access(11, 2) = 0.;
312  output.access(11, 3) = 4. - 4.*z*z;
313  output.access(11, 4) = (2. - 8.*y)*z;
314  output.access(11, 5) = -2.*y*(-1. + 2.*y);
315 
316  output.access(12, 0) = -4.*z*(1. + z);
317  output.access(12, 1) = -2.*z*(1. + z);
318  output.access(12, 2) = -2.*(-1. + 2.*x + y)*(1. + 2.*z);
319  output.access(12, 3) = 0.;
320  output.access(12, 4) = -2.*(x + 2.*x*z);
321  output.access(12, 5) = -4.*x*(-1. + x + y);
322 
323  output.access(13, 0) = 0.;
324  output.access(13, 1) = 2.*z*(1. + z);
325  output.access(13, 2) = 2.*(y + 2.*y*z);
326  output.access(13, 3) = 0.;
327  output.access(13, 4) = 2.*(x + 2.*x*z);
328  output.access(13, 5) = 4.*x*y;
329 
330  output.access(14, 0) = 0.;
331  output.access(14, 1) = -2.*z*(1. + z);
332  output.access(14, 2) = -2.*(y + 2.*y*z);
333  output.access(14, 3) = -4.*z*(1. + z);
334  output.access(14, 4) = -2.*(-1. + x + 2.*y)*(1. + 2.*z);
335  output.access(14, 5) = -4.*y*(-1. + x + y);
336 
337  output.access(15, 0) = 8.*(-1. + z*z);
338  output.access(15, 1) = 4.*(-1. + z*z);
339  output.access(15, 2) = 8.*(-1. + 2.*x + y)*z;
340  output.access(15, 3) = 0.;
341  output.access(15, 4) = 8.*x*z;
342  output.access(15, 5) = 8.*x*(-1. + x + y);
343 
344  output.access(16, 0) = 0.;
345  output.access(16, 1) = 4. - 4.*z*z;
346  output.access(16, 2) = -8.*y*z;
347  output.access(16, 3) = 0.;
348  output.access(16, 4) = -8.*x*z;
349  output.access(16, 5) = -8.*x*y;
350 
351  output.access(17, 0) = 0.;
352  output.access(17, 1) = 4.*(-1. + z*z);
353  output.access(17, 2) = 8.*y*z;
354  output.access(17, 3) = 8.*(-1. + z*z);
355  output.access(17, 4) = 8.*(-1. + x + 2.*y)*z;
356  output.access(17, 5) = 8.*y*(-1. + x + y);
357 
358  } else { //serendipity element
359 
360  const value_type w = 1.0 - x - y;
361  output.access(0, 0) = 2.0*(1.0 - z);
362  output.access(0, 1) = 2.0*(1.0 - z);
363  output.access(0, 2) = 2.0*w - 0.5 - z;
364  output.access(0, 3) = 2.0*(1.0-z);
365  output.access(0, 4) = 2.0*w -0.5 - z;
366  output.access(0, 5) = w;
367 
368  output.access(1, 0) = 2.0*(1.0 - z);
369  output.access(1, 1) = 0.;
370  output.access(1, 2) = -2.0*x + 0.5 + z;
371  output.access(1, 3) = 0.;
372  output.access(1, 4) = 0.;
373  output.access(1, 5) = x;
374 
375  output.access(2, 0) = 0.;
376  output.access(2, 1) = 0.;
377  output.access(2, 2) = 0.;
378  output.access(2, 3) = 2.0*(1.0 - z);
379  output.access(2, 4) = -2.0*y + 0.5 + z;
380  output.access(2, 5) = y;
381 
382  output.access(3, 0) = 2.0*(1.0 + z);
383  output.access(3, 1) = 2.0*(1.0 + z);
384  output.access(3, 2) = -2.0*w + 0.5 - z;
385  output.access(3, 3) = 2.0*(1.0 + z);
386  output.access(3, 4) = -2.0*w + 0.5 - z;
387  output.access(3, 5) = w;
388 
389  output.access(4, 0) = 2.0*(1.0 + z);
390  output.access(4, 1) = 0.;
391  output.access(4, 2) = 2.0*x - 0.5 + z;
392  output.access(4, 3) = 0.;
393  output.access(4, 4) = 0.;
394  output.access(4, 5) = x;
395 
396  output.access(5, 0) = 0.;
397  output.access(5, 1) = 0.;
398  output.access(5, 2) = 0.;
399  output.access(5, 3) = 2.0*(1.0 + z);
400  output.access(5, 4) = 2.0*y - 0.5 + z;
401  output.access(5, 5) = y;
402 
403  output.access(6, 0) = -4.0*(1.0 - z);
404  output.access(6, 1) = -2.0*(1.0 - z);
405  output.access(6, 2) = -2.0*(w - x);
406  output.access(6, 3) = 0.;
407  output.access(6, 4) = 2.0*x;
408  output.access(6, 5) = 0.;
409 
410  output.access(7, 0) = 0.;
411  output.access(7, 1) = 2.0*(1.0 - z);
412  output.access(7, 2) = -2.0*y;
413  output.access(7, 3) = 0.;
414  output.access(7, 4) = -2.0*x;
415  output.access(7, 5) = 0.;
416 
417  output.access(8, 0) = 0.;
418  output.access(8, 1) = -2.0*(1.0 - z);
419  output.access(8, 2) = 2.0*y;
420  output.access(8, 3) = -4.0*(1.0 - z);
421  output.access(8, 4) = -2.0*(w - y);
422  output.access(8, 5) = 0.;
423 
424  output.access(9, 0) = 0.;
425  output.access(9, 1) = 0.;
426  output.access(9, 2) = 2.0*z;
427  output.access(9, 3) = 0.;
428  output.access(9, 4) = 2.0*z;
429  output.access(9, 5) = -2.0*w;
430 
431  output.access(10,0) = 0.;
432  output.access(10,1) = 0.;
433  output.access(10,2) = -2.0*z;
434  output.access(10,3) = 0.;
435  output.access(10,4) = 0.;
436  output.access(10,5) = -2.0*x;
437 
438  output.access(11,0) = 0.;
439  output.access(11,1) = 0.;
440  output.access(11,2) = 0.;
441  output.access(11,3) = 0.;
442  output.access(11,4) = -2.0*z;
443  output.access(11,5) = -2.0*y;
444 
445  output.access(12,0) = -4.0*(1.0 + z);
446  output.access(12,1) = -2.0*(1.0 + z);
447  output.access(12,2) = 2.0*(w - x);
448  output.access(12,3) = 0.;
449  output.access(12,4) = -2.0*x;
450  output.access(12,5) = 0.;
451 
452  output.access(13,0) = 0.;
453  output.access(13,1) = 2.0*(1.0 + z);
454  output.access(13,2) = 2.0*y;
455  output.access(13,3) = 0.;
456  output.access(13,4) = 2.0*x;
457  output.access(13,5) = 0.;
458 
459  output.access(14,0) = 0.;
460  output.access(14,1) = -2.0*(1.0 + z);
461  output.access(14,2) = -2.0*y;
462  output.access(14,3) = -4.0*(1.0 + z);
463  output.access(14,4) = 2.0*(w - y);
464  output.access(14,5) = 0.;
465  }
466  break;
467  }
468  case OPERATOR_D3: {
469  if constexpr (!serendipity) {
470  const value_type x = input(0);
471  const value_type y = input(1);
472  const value_type z = input(2);
473 
474  output.access(0, 0) = 0.;
475  output.access(0, 1) = 0.;
476  output.access(0, 2) = -2. + 4.*z;
477  output.access(0, 3) = 0.;
478  output.access(0, 4) = -2. + 4.*z;
479  output.access(0, 5) = -3. + 4.*x + 4.*y;
480  output.access(0, 6) = 0.;
481  output.access(0, 7) = -2. + 4.*z;
482  output.access(0, 8) = -3. + 4.*x + 4.*y;
483  output.access(0, 9) = 0.;
484 
485  output.access(1, 0) = 0.;
486  output.access(1, 1) = 0.;
487  output.access(1, 2) = -2. + 4.*z;
488  output.access(1, 3) = 0.;
489  output.access(1, 4) = 0.;
490  output.access(1, 5) = -1 + 4.*x;
491  output.access(1, 6) = 0.;
492  output.access(1, 7) = 0.;
493  output.access(1, 8) = 0.;
494  output.access(1, 9) = 0.;
495 
496  output.access(2, 0) = 0.;
497  output.access(2, 1) = 0.;
498  output.access(2, 2) = 0.;
499  output.access(2, 3) = 0.;
500  output.access(2, 4) = 0.;
501  output.access(2, 5) = 0.;
502  output.access(2, 6) = 0.;
503  output.access(2, 7) = -2. + 4.*z;
504  output.access(2, 8) = -1 + 4.*y;
505  output.access(2, 9) = 0.;
506 
507  output.access(3, 0) = 0.;
508  output.access(3, 1) = 0.;
509  output.access(3, 2) = 2. + 4.*z;
510  output.access(3, 3) = 0.;
511  output.access(3, 4) = 2. + 4.*z;
512  output.access(3, 5) = -3. + 4.*x + 4.*y;
513  output.access(3, 6) = 0.;
514  output.access(3, 7) = 2. + 4.*z;
515  output.access(3, 8) = -3. + 4.*x + 4.*y;
516  output.access(3, 9) = 0.;
517 
518  output.access(4, 0) = 0.;
519  output.access(4, 1) = 0.;
520  output.access(4, 2) = 2. + 4.*z;
521  output.access(4, 3) = 0.;
522  output.access(4, 4) = 0.;
523  output.access(4, 5) = -1 + 4.*x;
524  output.access(4, 6) = 0.;
525  output.access(4, 7) = 0.;
526  output.access(4, 8) = 0.;
527  output.access(4, 9) = 0.;
528 
529  output.access(5, 0) = 0.;
530  output.access(5, 1) = 0.;
531  output.access(5, 2) = 0.;
532  output.access(5, 3) = 0.;
533  output.access(5, 4) = 0.;
534  output.access(5, 5) = 0.;
535  output.access(5, 6) = 0.;
536  output.access(5, 7) = 2. + 4.*z;
537  output.access(5, 8) = -1 + 4.*y;
538  output.access(5, 9) = 0.;
539 
540  output.access(6, 0) = 0.;
541  output.access(6, 1) = 0.;
542  output.access(6, 2) = 4. - 8.*z;
543  output.access(6, 3) = 0.;
544  output.access(6, 4) = 2. - 4.*z;
545  output.access(6, 5) = -4.*(-1 + 2*x + y);
546  output.access(6, 6) = 0.;
547  output.access(6, 7) = 0.;
548  output.access(6, 8) = -4.*x;
549  output.access(6, 9) = 0.;
550 
551  output.access(7, 0) = 0.;
552  output.access(7, 1) = 0.;
553  output.access(7, 2) = 0.;
554  output.access(7, 3) = 0.;
555  output.access(7, 4) = -2. + 4.*z;
556  output.access(7, 5) = 4.*y;
557  output.access(7, 6) = 0.;
558  output.access(7, 7) = 0.;
559  output.access(7, 8) = 4.*x;
560  output.access(7, 9) = 0.;
561 
562  output.access(8, 0) = 0.;
563  output.access(8, 1) = 0.;
564  output.access(8, 2) = 0.;
565  output.access(8, 3) = 0.;
566  output.access(8, 4) = 2. - 4.*z;
567  output.access(8, 5) = -4.*y;
568  output.access(8, 6) = 0.;
569  output.access(8, 7) = 4. - 8.*z;
570  output.access(8, 8) = -4.*(-1 + x + 2*y);
571  output.access(8, 9) = 0.;
572 
573  output.access(9, 0) = 0.;
574  output.access(9, 1) = 0.;
575  output.access(9, 2) = -8.*z;
576  output.access(9, 3) = 0.;
577  output.access(9, 4) = -8.*z;
578  output.access(9, 5) = 6. - 8.*x - 8.*y;
579  output.access(9, 6) = 0.;
580  output.access(9, 7) = -8.*z;
581  output.access(9, 8) = 6. - 8.*x - 8.*y;
582  output.access(9, 9) = 0.;
583 
584  output.access(10, 0) = 0.;
585  output.access(10, 1) = 0.;
586  output.access(10, 2) = -8.*z;
587  output.access(10, 3) = 0.;
588  output.access(10, 4) = 0.;
589  output.access(10, 5) = 2. - 8.*x;
590  output.access(10, 6) = 0.;
591  output.access(10, 7) = 0.;
592  output.access(10, 8) = 0.;
593  output.access(10, 9) = 0.;
594 
595  output.access(11, 0) = 0.;
596  output.access(11, 1) = 0.;
597  output.access(11, 2) = 0.;
598  output.access(11, 3) = 0.;
599  output.access(11, 4) = 0.;
600  output.access(11, 5) = 0.;
601  output.access(11, 6) = 0.;
602  output.access(11, 7) = -8.*z;
603  output.access(11, 8) = 2. - 8.*y;
604  output.access(11, 9) = 0.;
605 
606  output.access(12, 0) = 0.;
607  output.access(12, 1) = 0.;
608  output.access(12, 2) = -4. - 8.*z;
609  output.access(12, 3) = 0.;
610  output.access(12, 4) = -2. - 4.*z;
611  output.access(12, 5) = -4.*(-1 + 2*x + y);
612  output.access(12, 6) = 0.;
613  output.access(12, 7) = 0.;
614  output.access(12, 8) = -4.*x;
615  output.access(12, 9) = 0.;
616 
617  output.access(13, 0) = 0.;
618  output.access(13, 1) = 0.;
619  output.access(13, 2) = 0.;
620  output.access(13, 3) = 0.;
621  output.access(13, 4) = 2. + 4.*z;
622  output.access(13, 5) = 4.*y;
623  output.access(13, 6) = 0.;
624  output.access(13, 7) = 0.;
625  output.access(13, 8) = 4.*x;
626  output.access(13, 9) = 0.;
627 
628  output.access(14, 0) = 0.;
629  output.access(14, 1) = 0.;
630  output.access(14, 2) = 0.;
631  output.access(14, 3) = 0.;
632  output.access(14, 4) = -2. - 4.*z;
633  output.access(14, 5) = -4.*y;
634  output.access(14, 6) = 0.;
635  output.access(14, 7) = -4. - 8.*z;
636  output.access(14, 8) = -4.*(-1 + x + 2*y);
637  output.access(14, 9) = 0.;
638 
639  output.access(15, 0) = 0.;
640  output.access(15, 1) = 0.;
641  output.access(15, 2) = 16.*z;
642  output.access(15, 3) = 0.;
643  output.access(15, 4) = 8.*z;
644  output.access(15, 5) = 8.*(-1 + 2*x + y);
645  output.access(15, 6) = 0.;
646  output.access(15, 7) = 0.;
647  output.access(15, 8) = 8.*x;
648  output.access(15, 9) = 0.;
649 
650  output.access(16, 0) = 0.;
651  output.access(16, 1) = 0.;
652  output.access(16, 2) = 0.;
653  output.access(16, 3) = 0.;
654  output.access(16, 4) = -8.*z;
655  output.access(16, 5) = -8.*y;
656  output.access(16, 6) = 0.;
657  output.access(16, 7) = 0.;
658  output.access(16, 8) = -8.*x;
659  output.access(16, 9) = 0.;
660 
661  output.access(17, 0) = 0.;
662  output.access(17, 1) = 0.;
663  output.access(17, 2) = 0.;
664  output.access(17, 3) = 0.;
665  output.access(17, 4) = 8.*z;
666  output.access(17, 5) = 8.*y;
667  output.access(17, 6) = 0.;
668  output.access(17, 7) = 16.*z;
669  output.access(17, 8) = 8.*(-1 + x + 2*y);
670  output.access(17, 9) = 0.;
671 
672  } else { //serendipity
673 
674  output.access(0, 0) = 0.0;
675  output.access(0, 1) = 0.0;
676  output.access(0, 2) = -2.0;
677  output.access(0, 3) = 0.0;
678  output.access(0, 4) = -2.0;
679  output.access(0, 5) = -1.0;
680  output.access(0, 6) = 0.0;
681  output.access(0, 7) = -2.0;
682  output.access(0, 8) = -1.0;
683  output.access(0, 9) = 0.0;
684 
685  output.access(1, 0) = 0.0;
686  output.access(1, 1) = 0.0;
687  output.access(1, 2) = -2.0;
688  output.access(1, 3) = 0.0;
689  output.access(1, 4) = 0.0;
690  output.access(1, 5) = -1.0;
691  output.access(1, 6) = 0.0;
692  output.access(1, 7) = 0.0;
693  output.access(1, 8) = 0.0;
694  output.access(1, 9) = 0.0;
695 
696  output.access(2, 0) = 0.0;
697  output.access(2, 1) = 0.0;
698  output.access(2, 2) = 0.0;
699  output.access(2, 3) = 0.0;
700  output.access(2, 4) = 0.0;
701  output.access(2, 5) = 0.0;
702  output.access(2, 6) = 0.0;
703  output.access(2, 7) = -2.0;
704  output.access(2, 8) = -1.0;
705  output.access(2, 9) = 0.0;
706 
707  output.access(3, 0) = 0.0;
708  output.access(3, 1) = 0.0;
709  output.access(3, 2) = 2.0;
710  output.access(3, 3) = 0.0;
711  output.access(3, 4) = 2.0;
712  output.access(3, 5) = -1.0;
713  output.access(3, 6) = 0.0;
714  output.access(3, 7) = 2.0;
715  output.access(3, 8) = -1.0;
716  output.access(3, 9) = 0.0;
717 
718  output.access(4, 0) = 0.0;
719  output.access(4, 1) = 0.0;
720  output.access(4, 2) = 2.0;
721  output.access(4, 3) = 0.0;
722  output.access(4, 4) = 0.0;
723  output.access(4, 5) = 1.0;
724  output.access(4, 6) = 0.0;
725  output.access(4, 7) = 0.0;
726  output.access(4, 8) = 0.0;
727  output.access(4, 9) = 0.0;
728 
729  output.access(5, 0) = 0.0;
730  output.access(5, 1) = 0.0;
731  output.access(5, 2) = 0.0;
732  output.access(5, 3) = 0.0;
733  output.access(5, 4) = 0.0;
734  output.access(5, 5) = 0.0;
735  output.access(5, 6) = 0.0;
736  output.access(5, 7) = 2.0;
737  output.access(5, 8) = 1.0;
738  output.access(5, 9) = 0.0;
739 
740  output.access(6, 0) = 0.0;
741  output.access(6, 1) = 0.0;
742  output.access(6, 2) = 4.0;
743  output.access(6, 3) = 0.0;
744  output.access(6, 4) = 2.0;
745  output.access(6, 5) = 0.0;
746  output.access(6, 6) = 0.0;
747  output.access(6, 7) = 0.0;
748  output.access(6, 8) = 0.0;
749  output.access(6, 9) = 0.0;
750 
751  output.access(7, 0) = 0.0;
752  output.access(7, 1) = 0.0;
753  output.access(7, 2) = 0.0;
754  output.access(7, 3) = 0.0;
755  output.access(7, 4) = -2.0;
756  output.access(7, 5) = 0.0;
757  output.access(7, 6) = 0.0;
758  output.access(7, 7) = 0.0;
759  output.access(7, 8) = 0.0;
760  output.access(7, 9) = 0.0;
761 
762  output.access(8, 0) = 0.0;
763  output.access(8, 1) = 0.0;
764  output.access(8, 2) = 0.0;
765  output.access(8, 3) = 0.0;
766  output.access(8, 4) = 2.0;
767  output.access(8, 5) = 0.0;
768  output.access(8, 6) = 0.0;
769  output.access(8, 7) = 4.0;
770  output.access(8, 8) = 0.0;
771  output.access(8, 9) = 0.0;
772 
773  output.access(9, 0) = 0.0;
774  output.access(9, 1) = 0.0;
775  output.access(9, 2) = 0.0;
776  output.access(9, 3) = 0.0;
777  output.access(9, 4) = 0.0;
778  output.access(9, 5) = 2.0;
779  output.access(9, 6) = 0.0;
780  output.access(9, 7) = 0.0;
781  output.access(9, 8) = 2.0;
782  output.access(9, 9) = 0.0;
783 
784  output.access(10,0) = 0.0;
785  output.access(10,1) = 0.0;
786  output.access(10,2) = 0.0;
787  output.access(10,3) = 0.0;
788  output.access(10,4) = 0.0;
789  output.access(10,5) = -2.0;
790  output.access(10,6) = 0.0;
791  output.access(10,7) = 0.0;
792  output.access(10,8) = 0.0;
793  output.access(10,9) = 0.0;
794 
795  output.access(11,0) = 0.0;
796  output.access(11,1) = 0.0;
797  output.access(11,2) = 0.0;
798  output.access(11,3) = 0.0;
799  output.access(11,4) = 0.0;
800  output.access(11,5) = 0.0;
801  output.access(11,6) = 0.0;
802  output.access(11,7) = 0.0;
803  output.access(11,8) = -2.0;
804  output.access(11,9) = 0.0;
805 
806  output.access(12,0) = 0.0;
807  output.access(12,1) = 0.0;
808  output.access(12,2) = -4.0;
809  output.access(12,3) = 0.0;
810  output.access(12,4) = -2.0;
811  output.access(12,5) = 0.0;
812  output.access(12,6) = 0.0;
813  output.access(12,7) = 0.0;
814  output.access(12,8) = 0.0;
815  output.access(12,9) = 0.0;
816 
817  output.access(13,0) = 0.0;
818  output.access(13,1) = 0.0;
819  output.access(13,2) = 0.0;
820  output.access(13,3) = 0.0;
821  output.access(13,4) = 2.0;
822  output.access(13,5) = 0.0;
823  output.access(13,6) = 0.0;
824  output.access(13,7) = 0.0;
825  output.access(13,8) = 0.0;
826  output.access(13,9) = 0.0;
827 
828  output.access(14,0) = 0.0;
829  output.access(14,1) = 0.0;
830  output.access(14,2) = 0.0;
831  output.access(14,3) = 0.0;
832  output.access(14,4) = -2.0;
833  output.access(14,5) = 0.0;
834  output.access(14,6) = 0.0;
835  output.access(14,7) = -4.0;
836  output.access(14,8) = 0.0;
837  output.access(14,9) = 0.0;
838  }
839  break;
840  }
841  case OPERATOR_D4: {
842  const ordinal_type jend = output.extent(1);
843  const ordinal_type iend = output.extent(0);
844 
845  for (ordinal_type j=0;j<jend;++j)
846  for (ordinal_type i=0;i<iend;++i)
847  output.access(i, j) = 0.0;
848 
849  if constexpr (!serendipity) {
850 
851  output.access(0, 5) = 4.;
852  output.access(0, 8) = 4.;
853  output.access(0,12) = 4.;
854 
855  output.access(1, 5) = 4.;
856 
857  output.access(2,12) = 4.;
858 
859  output.access(3, 5) = 4.;
860  output.access(3, 8) = 4.;
861  output.access(3,12) = 4.;
862 
863  output.access(4, 5) = 4.0;
864 
865  output.access(5,12) = 4.0;
866 
867  output.access(6, 5) =-8.;
868  output.access(6, 8) =-4.;
869 
870  output.access(7, 8) = 4.;
871 
872  output.access(8, 8) =-4.;
873  output.access(8,12) =-8.;
874 
875  output.access(9, 5) =-8.;
876  output.access(9, 8) =-8.;
877  output.access(9,12) =-8.;
878 
879  output.access(10, 5) =-8.;
880 
881  output.access(11,12) =-8.;
882 
883  output.access(12, 5) =-8.;
884  output.access(12, 8) =-4.;
885 
886  output.access(13, 8) = 4.;
887 
888  output.access(14, 8) =-4;
889  output.access(14,12) =-8.;
890 
891  output.access(15, 5) =16.;
892  output.access(15, 8) = 8.;
893 
894  output.access(16, 8) =-8.;
895 
896  output.access(17, 8) = 8.;
897  output.access(17,12) =16.;
898  }
899  break;
900  }
901  case OPERATOR_MAX : {
902  const ordinal_type jend = output.extent(1);
903  const ordinal_type iend = output.extent(0);
904 
905  for (ordinal_type j=0;j<jend;++j)
906  for (ordinal_type i=0;i<iend;++i)
907  output.access(i, j) = 0.0;
908  break;
909  }
910 
911  default: {
912  INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
913  opType != OPERATOR_GRAD &&
914  opType != OPERATOR_D2 &&
915  opType != OPERATOR_D3 &&
916  opType != OPERATOR_D4 &&
917  opType != OPERATOR_MAX,
918  ">>> ERROR: (Intrepid2::Basis_HGRAD_WEDGE_DEG2_FEM::Serial::getValues) operator is not supported");
919  }
920  }
921  }
922 
923  template<bool serendipity>
924  template<typename DT,
925  typename outputValueValueType, class ...outputValueProperties,
926  typename inputPointValueType, class ...inputPointProperties>
927  void
928  Basis_HGRAD_WEDGE_DEG2_FEM<serendipity>::
929  getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
930  const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
931  const EOperator operatorType ) {
932  typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
933  typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
934  typedef typename ExecSpace<typename inputPointViewType::execution_space,typename DT::execution_space>::ExecSpaceType ExecSpaceType;
935 
936  // Number of evaluation points = dim 0 of inputPoints
937  const auto loopSize = inputPoints.extent(0);
938  Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
939 
940  switch (operatorType) {
941 
942  case OPERATOR_VALUE: {
943  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_VALUE> FunctorType;
944  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
945  break;
946  }
947  case OPERATOR_GRAD:
948  case OPERATOR_D1: {
949  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_GRAD> FunctorType;
950  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
951  break;
952  }
953  case OPERATOR_CURL: {
954  INTREPID2_TEST_FOR_EXCEPTION( operatorType == OPERATOR_CURL, std::invalid_argument,
955  ">>> ERROR (Basis_HGRAD_WEDGE_DEG2_FEM): CURL is invalid operator for rank-0 (scalar) functions in 3D");
956  break;
957  }
958  case OPERATOR_DIV: {
959  INTREPID2_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
960  ">>> ERROR (Basis_HGRAD_WEDGE_DEG2_FEM): DIV is invalid operator for rank-0 (scalar) functions in 3D");
961  break;
962  }
963  case OPERATOR_D2: {
964  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D2> FunctorType;
965  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
966  break;
967  }
968  case OPERATOR_D3: {
969  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D3> FunctorType;
970  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
971  break;
972  }
973  case OPERATOR_D4: {
974  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D4> FunctorType;
975  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
976  break;
977  }
978  case OPERATOR_D5:
979  case OPERATOR_D6:
980  case OPERATOR_D7:
981  case OPERATOR_D8:
982  case OPERATOR_D9:
983  case OPERATOR_D10: {
984  typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_MAX> FunctorType;
985  Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
986  break;
987  }
988  default: {
989  INTREPID2_TEST_FOR_EXCEPTION( !( Intrepid2::isValidOperator(operatorType) ), std::invalid_argument,
990  ">>> ERROR (Basis_HGRAD_WEDGE_DEG2_FEM): Invalid operator type");
991  }
992  }
993  }
994 
995  }
996 
997  // -------------------------------------------------------------------------------------
998 
999  template<bool serendipity, typename DT, typename OT, typename PT>
1002  const ordinal_type spaceDim = 3;
1003  this->basisCardinality_ = serendipity ? 15 : 18;
1004  this->basisDegree_ = 2;
1005  this->basisCellTopologyKey_ = shards::Wedge<6>::key;
1006  this->basisType_ = BASIS_FEM_DEFAULT;
1007  this->basisCoordinates_ = COORDINATES_CARTESIAN;
1008  this->functionSpace_ = FUNCTION_SPACE_HGRAD;
1009 
1010  // initialize tags
1011  {
1012  // Basis-dependent intializations
1013  const ordinal_type tagSize = 4; // size of DoF tag
1014  const ordinal_type posScDim = 0; // position in the tag, counting from 0, of the subcell dim
1015  const ordinal_type posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal
1016  const ordinal_type posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell
1017 
1018  // An array with local DoF tags assigned to basis functions, in the order of their local enumeration
1019  ordinal_type tags[72] = { 0, 0, 0, 1,
1020  0, 1, 0, 1,
1021  0, 2, 0, 1,
1022  0, 3, 0, 1,
1023  0, 4, 0, 1,
1024  0, 5, 0, 1,
1025  1, 0, 0, 1,
1026  1, 1, 0, 1,
1027  1, 2, 0, 1,
1028  1, 6, 0, 1,
1029  1, 7, 0, 1,
1030  1, 8, 0, 1,
1031  1, 3, 0, 1,
1032  1, 4, 0, 1,
1033  1, 5, 0, 1,
1034  // following entries not used for serendipity elements
1035  2, 0, 0, 1,
1036  2, 1, 0, 1,
1037  2, 2, 0, 1
1038  };
1039 
1040  // host tags
1041  OrdinalTypeArray1DHost tagView(&tags[0], serendipity ? 60 : 72);
1042 
1043  // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays:
1044  this->setOrdinalTagData(this->tagToOrdinal_,
1045  this->ordinalToTag_,
1046  tagView,
1047  this->basisCardinality_,
1048  tagSize,
1049  posScDim,
1050  posScOrd,
1051  posDfOrd);
1052  }
1053 
1054  // dofCoords on host and create its mirror view to device
1055  Kokkos::DynRankView<typename ScalarViewType::value_type,typename DT::execution_space::array_layout,Kokkos::HostSpace>
1056  dofCoords("dofCoordsHost", this->basisCardinality_,spaceDim);
1057 
1058  dofCoords(0,0) = 0.0; dofCoords(0,1) = 0.0; dofCoords(0,2) = -1.0;
1059  dofCoords(1,0) = 1.0; dofCoords(1,1) = 0.0; dofCoords(1,2) = -1.0;
1060  dofCoords(2,0) = 0.0; dofCoords(2,1) = 1.0; dofCoords(2,2) = -1.0;
1061  dofCoords(3,0) = 0.0; dofCoords(3,1) = 0.0; dofCoords(3,2) = 1.0;
1062  dofCoords(4,0) = 1.0; dofCoords(4,1) = 0.0; dofCoords(4,2) = 1.0;
1063  dofCoords(5,0) = 0.0; dofCoords(5,1) = 1.0; dofCoords(5,2) = 1.0;
1064 
1065  dofCoords(6,0) = 0.5; dofCoords(6,1) = 0.0; dofCoords(6,2) = -1.0;
1066  dofCoords(7,0) = 0.5; dofCoords(7,1) = 0.5; dofCoords(7,2) = -1.0;
1067  dofCoords(8,0) = 0.0; dofCoords(8,1) = 0.5; dofCoords(8,2) = -1.0;
1068  dofCoords(9,0) = 0.0; dofCoords(9,1) = 0.0; dofCoords(9,2) = 0.0;
1069  dofCoords(10,0)= 1.0; dofCoords(10,1)= 0.0; dofCoords(10,2)= 0.0;
1070  dofCoords(11,0)= 0.0; dofCoords(11,1)= 1.0; dofCoords(11,2)= 0.0;
1071 
1072  dofCoords(12,0)= 0.5; dofCoords(12,1)= 0.0; dofCoords(12,2)= 1.0;
1073  dofCoords(13,0)= 0.5; dofCoords(13,1)= 0.5; dofCoords(13,2)= 1.0;
1074  dofCoords(14,0)= 0.0; dofCoords(14,1)= 0.5; dofCoords(14,2)= 1.0;
1075 
1076  if constexpr (!serendipity) {
1077  dofCoords(15,0)= 0.5; dofCoords(15,1)= 0.0; dofCoords(15,2)= 0.0;
1078  dofCoords(16,0)= 0.5; dofCoords(16,1)= 0.5; dofCoords(16,2)= 0.0;
1079  dofCoords(17,0)= 0.0; dofCoords(17,1)= 0.5; dofCoords(17,2)= 0.0;
1080  }
1081 
1082  this->dofCoords_ = Kokkos::create_mirror_view(typename DT::memory_space(), dofCoords);
1083  Kokkos::deep_copy(this->dofCoords_, dofCoords);
1084  }
1085 
1086  template<bool serendipity, typename DT, typename OT, typename PT>
1087  void
1089  ordinal_type& perTeamSpaceSize,
1090  ordinal_type& perThreadSpaceSize,
1091  const PointViewType inputPoints,
1092  const EOperator operatorType) const {
1093  perTeamSpaceSize = 0;
1094  perThreadSpaceSize = 0;
1095  }
1096 
1097  template<bool serendipity, typename DT, typename OT, typename PT>
1098  KOKKOS_INLINE_FUNCTION
1099  void
1100  Basis_HGRAD_WEDGE_DEG2_FEM<serendipity,DT,OT,PT>::getValues(
1101  OutputViewType outputValues,
1102  const PointViewType inputPoints,
1103  const EOperator operatorType,
1104  const typename Kokkos::TeamPolicy<typename DT::execution_space>::member_type& team_member,
1105  const typename DT::execution_space::scratch_memory_space & scratchStorage,
1106  const ordinal_type subcellDim,
1107  const ordinal_type subcellOrdinal) const {
1108 
1109  INTREPID2_TEST_FOR_ABORT( !((subcellDim <= 0) && (subcellOrdinal == -1)),
1110  ">>> ERROR: (Intrepid2::Basis_HGRAD_WEDGE_DEG2_FEM::getValues), The capability of selecting subsets of basis functions has not been implemented yet.");
1111 
1112  (void) scratchStorage; //avoid unused variable warning
1113 
1114  const int numPoints = inputPoints.extent(0);
1115 
1116  switch(operatorType) {
1117  case OPERATOR_VALUE:
1118  Kokkos::parallel_for (Kokkos::TeamThreadRange (team_member, numPoints), [=] (ordinal_type& pt) {
1119  auto output = Kokkos::subview( outputValues, Kokkos::ALL(), pt, Kokkos::ALL() );
1120  const auto input = Kokkos::subview( inputPoints, pt, Kokkos::ALL() );
1121  using SerialValue = typename Impl::Basis_HGRAD_WEDGE_DEG2_FEM<serendipity>::template Serial<OPERATOR_VALUE>;
1122  SerialValue::getValues( output, input);
1123  });
1124  break;
1125  case OPERATOR_GRAD:
1126  Kokkos::parallel_for (Kokkos::TeamThreadRange (team_member, numPoints), [=] (ordinal_type& pt) {
1127  auto output = Kokkos::subview( outputValues, Kokkos::ALL(), pt, Kokkos::ALL() );
1128  const auto input = Kokkos::subview( inputPoints, pt, Kokkos::ALL() );
1129  using SerialGrad = typename Impl::Basis_HGRAD_WEDGE_DEG2_FEM<serendipity>::template Serial<OPERATOR_GRAD>;
1130  SerialGrad::getValues( output, input);
1131  });
1132  break;
1133  default: {}
1134  }
1135  }
1136 
1137 }// namespace Intrepid2
1138 #endif
Implementation of the default H(grad)-compatible FEM basis of degree 2 on Wedge cell.