49 #ifndef __INTREPID2_HGRAD_WEDGE_C2_FEM_DEF_HPP__
50 #define __INTREPID2_HGRAD_WEDGE_C2_FEM_DEF_HPP__
57 template<EOperator opType>
58 template<
typename OutputViewType,
59 typename inputViewType>
60 KOKKOS_INLINE_FUNCTION
62 Basis_HGRAD_WEDGE_C2_FEM::Serial<opType>::
63 getValues( OutputViewType output,
64 const inputViewType input ) {
66 case OPERATOR_VALUE: {
67 const auto x = input(0);
68 const auto y = input(1);
69 const auto z = input(2);
72 output.access(0) = ((-1. + x + y)*(-1. + 2.*x + 2.*y)*(-1. + z)*z)/2.;
73 output.access(1) = (x*(-1. + 2.*x)*(-1. + z)*z)/2.;
74 output.access(2) = (y*(-1. + 2.*y)*(-1. + z)*z)/2.;
75 output.access(3) = ((-1. + x + y)*(-1. + 2.*x + 2.*y)*z*(1. + z))/2.;
76 output.access(4) = (x*(-1. + 2.*x)*z*(1. + z))/2.;
77 output.access(5) = (y*(-1. + 2.*y)*z*(1. + z))/2.;
79 output.access(6) = -2.*x*(-1. + x + y)*(-1. + z)*z;
80 output.access(7) = 2.*x*y*(-1. + z)*z;
81 output.access(8) = -2.*y*(-1. + x + y)*(-1. + z)*z;
82 output.access(9) = -((-1. + x + y)*(-1. + 2.*x + 2.*y)*(-1. + z)*(1. + z));
83 output.access(10) = -(x*(-1. + 2.*x)*(-1. + z)*(1. + z));
84 output.access(11) = -(y*(-1. + 2.*y)*(-1. + z)*(1. + z));
85 output.access(12) = -2.*x*(-1. + x + y)*z*(1. + z);
86 output.access(13) = 2.*x*y*z*(1. + z);
87 output.access(14) = -2.*y*(-1. + x + y)*z*(1. + z);
88 output.access(15) = 4.*x*(-1. + x + y)*(-1. + z)*(1. + z);
89 output.access(16) = -4.*x*y*(-1. + z)*(1. + z);
90 output.access(17) = 4.*y*(-1. + x + y)*(-1. + z)*(1. + z);
94 const auto x = input(0);
95 const auto y = input(1);
96 const auto z = input(2);
99 output.access(0, 0) = ((-3 + 4*x + 4*y)*(-1 + z)*z)/2.;
100 output.access(0, 1) = ((-3 + 4*x + 4*y)*(-1 + z)*z)/2.;
101 output.access(0, 2) = ((-1 + x + y)*(-1 + 2*x + 2*y)*(-1 + 2*z))/2.;
103 output.access(1, 0) = ((-1 + 4*x)*(-1 + z)*z)/2.;
104 output.access(1, 1) = 0.;
105 output.access(1, 2) = (x*(-1 + 2*x)*(-1 + 2*z))/2.;
107 output.access(2, 0) = 0.;
108 output.access(2, 1) = ((-1 + 4*y)*(-1 + z)*z)/2.;
109 output.access(2, 2) = (y*(-1 + 2*y)*(-1 + 2*z))/2.;
111 output.access(3, 0) = ((-3 + 4*x + 4*y)*z*(1 + z))/2.;
112 output.access(3, 1) = ((-3 + 4*x + 4*y)*z*(1 + z))/2.;
113 output.access(3, 2) = ((-1 + x + y)*(-1 + 2*x + 2*y)*(1 + 2*z))/2.;
115 output.access(4, 0) = ((-1 + 4*x)*z*(1 + z))/2.;
116 output.access(4, 1) = 0.;
117 output.access(4, 2) = (x*(-1 + 2*x)*(1 + 2*z))/2.;
119 output.access(5, 0) = 0.;
120 output.access(5, 1) = ((-1 + 4*y)*z*(1 + z))/2.;
121 output.access(5, 2) = (y*(-1 + 2*y)*(1 + 2*z))/2.;
123 output.access(6, 0) = -2*(-1 + 2*x + y)*(-1 + z)*z;
124 output.access(6, 1) = -2*x*(-1 + z)*z;
125 output.access(6, 2) = 2*x*(-1 + x + y)*(1 - 2*z);
127 output.access(7, 0) = 2*y*(-1 + z)*z;
128 output.access(7, 1) = 2*x*(-1 + z)*z;
129 output.access(7, 2) = 2*x*y*(-1 + 2*z);
131 output.access(8, 0) = -2*y*(-1 + z)*z;
132 output.access(8, 1) = -2*(-1 + x + 2*y)*(-1 + z)*z;
133 output.access(8, 2) = 2*y*(-1 + x + y)*(1 - 2*z);
135 output.access(9, 0) = -(-3 + 4*x + 4*y)*(-1 + z*z);
136 output.access(9, 1) = -(-3 + 4*x + 4*y)*(-1 + z*z);
137 output.access(9, 2) = -2*(1 + 2*x*x - 3*y + 2*y*y + x*(-3 + 4*y))*z;
139 output.access(10, 0) = -(-1 + 4*x)*(-1 + z*z);
140 output.access(10, 1) = 0;
141 output.access(10, 2) = 2*(1 - 2*x)*x*z;
143 output.access(11, 0) = 0;
144 output.access(11, 1) = -(-1 + 4*y)*(-1 + z*z);
145 output.access(11, 2) = 2*(1 - 2*y)*y*z;
147 output.access(12, 0) = -2*(-1 + 2*x + y)*z*(1 + z);
148 output.access(12, 1) = -2*x*z*(1 + z);
149 output.access(12, 2) = -2*x*(-1 + x + y)*(1 + 2*z);
151 output.access(13, 0) = 2*y*z*(1 + z);
152 output.access(13, 1) = 2*x*z*(1 + z);
153 output.access(13, 2) = 2*x*y*(1 + 2*z);
155 output.access(14, 0) = -2*y*z*(1 + z);
156 output.access(14, 1) = -2*(-1 + x + 2*y)*z*(1 + z);
157 output.access(14, 2) = -2*y*(-1 + x + y)*(1 + 2*z);
159 output.access(15, 0) = 4*(-1 + 2*x + y)*(-1 + z*z);
160 output.access(15, 1) = 4*x*(-1 + z)*(1 + z);
161 output.access(15, 2) = 8*x*(-1 + x + y)*z;
163 output.access(16, 0) = -4*y*(-1 + z)*(1 + z);
164 output.access(16, 1) = -4*x*(-1 + z)*(1 + z);
165 output.access(16, 2) = -8*x*y*z;
167 output.access(17, 0) = 4*y*(-1 + z)*(1 + z);
168 output.access(17, 1) = 4*(-1 + x + 2*y)*(-1 + z*z);
169 output.access(17, 2) = 8*y*(-1 + x + y)*z;
173 const auto x = input(0);
174 const auto y = input(1);
175 const auto z = input(2);
177 output.access(0, 0) = 2.*(-1. + z)*z;
178 output.access(0, 1) = 2.*(-1. + z)*z;
179 output.access(0, 2) = ((-3. + 4.*x + 4.*y)*(-1. + 2.*z))/2.;
180 output.access(0, 3) = 2.*(-1. + z)*z;
181 output.access(0, 4) = ((-3. + 4.*x + 4.*y)*(-1. + 2.*z))/2.;
182 output.access(0, 5) = (-1. + x + y)*(-1. + 2.*x + 2.*y);
184 output.access(1, 0) = 2.*(-1. + z)*z;
185 output.access(1, 1) = 0.;
186 output.access(1, 2) = ((-1. + 4.*x)*(-1. + 2.*z))/2.;
187 output.access(1, 3) = 0.;
188 output.access(1, 4) = 0.;
189 output.access(1, 5) = x*(-1. + 2.*x);
191 output.access(2, 0) = 0.;
192 output.access(2, 1) = 0.;
193 output.access(2, 2) = 0.;
194 output.access(2, 3) = 2.*(-1. + z)*z;
195 output.access(2, 4) = ((-1. + 4.*y)*(-1. + 2.*z))/2.;
196 output.access(2, 5) = y*(-1. + 2.*y);
198 output.access(3, 0) = 2.*z*(1. + z);
199 output.access(3, 1) = 2.*z*(1. + z);
200 output.access(3, 2) = ((-3. + 4.*x + 4.*y)*(1. + 2.*z))/2.;
201 output.access(3, 3) = 2.*z*(1. + z);
202 output.access(3, 4) = ((-3. + 4.*x + 4.*y)*(1. + 2.*z))/2.;
203 output.access(3, 5) = (-1. + x + y)*(-1. + 2.*x + 2.*y);
205 output.access(4, 0) = 2.*z*(1. + z);
206 output.access(4, 1) = 0.;
207 output.access(4, 2) = ((-1. + 4.*x)*(1. + 2.*z))/2.;
208 output.access(4, 3) = 0.;
209 output.access(4, 4) = 0.;
210 output.access(4, 5) = x*(-1. + 2.*x);
212 output.access(5, 0) = 0.;
213 output.access(5, 1) = 0.;
214 output.access(5, 2) = 0.;
215 output.access(5, 3) = 2.*z*(1. + z);
216 output.access(5, 4) = ((-1. + 4.*y)*(1. + 2.*z))/2.;
217 output.access(5, 5) = y*(-1. + 2.*y);
219 output.access(6, 0) = -4.*(-1. + z)*z;
220 output.access(6, 1) = -2.*(-1. + z)*z;
221 output.access(6, 2) = -2.*(-1. + 2.*x + y)*(-1. + 2.*z);
222 output.access(6, 3) = 0.;
223 output.access(6, 4) = x*(2. - 4.*z);
224 output.access(6, 5) = -4.*x*(-1. + x + y);
226 output.access(7, 0) = 0.;
227 output.access(7, 1) = 2.*(-1. + z)*z;
228 output.access(7, 2) = 2.*y*(-1. + 2.*z);
229 output.access(7, 3) = 0.;
230 output.access(7, 4) = 2.*x*(-1. + 2.*z);
231 output.access(7, 5) = 4.*x*y;
233 output.access(8, 0) = 0.;
234 output.access(8, 1) = -2.*(-1. + z)*z;
235 output.access(8, 2) = y*(2. - 4.*z);
236 output.access(8, 3) = -4.*(-1. + z)*z;
237 output.access(8, 4) = -2.*(-1. + x + 2.*y)*(-1. + 2.*z);
238 output.access(8, 5) = -4.*y*(-1. + x + y);
240 output.access(9, 0) = 4. - 4.*z*z;
241 output.access(9, 1) = 4. - 4.*z*z;
242 output.access(9, 2) = -2.*(-3. + 4.*x + 4.*y)*z;
243 output.access(9, 3) = 4. - 4.*z*z;
244 output.access(9, 4) = -2.*(-3. + 4.*x + 4.*y)*z;
245 output.access(9, 5) = -2.*(-1. + x + y)*(-1. + 2.*x + 2.*y);
247 output.access(10, 0) = 4. - 4.*z*z;
248 output.access(10, 1) = 0.;
249 output.access(10, 2) = (2. - 8.*x)*z;
250 output.access(10, 3) = 0.;
251 output.access(10, 4) = 0.;
252 output.access(10, 5) = -2.*x*(-1. + 2.*x);
254 output.access(11, 0) = 0.;
255 output.access(11, 1) = 0.;
256 output.access(11, 2) = 0.;
257 output.access(11, 3) = 4. - 4.*z*z;
258 output.access(11, 4) = (2. - 8.*y)*z;
259 output.access(11, 5) = -2.*y*(-1. + 2.*y);
261 output.access(12, 0) = -4.*z*(1. + z);
262 output.access(12, 1) = -2.*z*(1. + z);
263 output.access(12, 2) = -2.*(-1. + 2.*x + y)*(1. + 2.*z);
264 output.access(12, 3) = 0.;
265 output.access(12, 4) = -2.*(x + 2.*x*z);
266 output.access(12, 5) = -4.*x*(-1. + x + y);
268 output.access(13, 0) = 0.;
269 output.access(13, 1) = 2.*z*(1. + z);
270 output.access(13, 2) = 2.*(y + 2.*y*z);
271 output.access(13, 3) = 0.;
272 output.access(13, 4) = 2.*(x + 2.*x*z);
273 output.access(13, 5) = 4.*x*y;
275 output.access(14, 0) = 0.;
276 output.access(14, 1) = -2.*z*(1. + z);
277 output.access(14, 2) = -2.*(y + 2.*y*z);
278 output.access(14, 3) = -4.*z*(1. + z);
279 output.access(14, 4) = -2.*(-1. + x + 2.*y)*(1. + 2.*z);
280 output.access(14, 5) = -4.*y*(-1. + x + y);
282 output.access(15, 0) = 8.*(-1. + z*z);
283 output.access(15, 1) = 4.*(-1. + z*z);
284 output.access(15, 2) = 8.*(-1. + 2.*x + y)*z;
285 output.access(15, 3) = 0.;
286 output.access(15, 4) = 8.*x*z;
287 output.access(15, 5) = 8.*x*(-1. + x + y);
289 output.access(16, 0) = 0.;
290 output.access(16, 1) = 4. - 4.*z*z;
291 output.access(16, 2) = -8.*y*z;
292 output.access(16, 3) = 0.;
293 output.access(16, 4) = -8.*x*z;
294 output.access(16, 5) = -8.*x*y;
297 output.access(17, 0) = 0.;
298 output.access(17, 1) = 4.*(-1. + z*z);
299 output.access(17, 2) = 8.*y*z;
300 output.access(17, 3) = 8.*(-1. + z*z);
301 output.access(17, 4) = 8.*(-1. + x + 2.*y)*z;
302 output.access(17, 5) = 8.*y*(-1. + x + y);
306 const auto x = input(0);
307 const auto y = input(1);
308 const auto z = input(2);
310 output.access(0, 0) = 0.;
311 output.access(0, 1) = 0.;
312 output.access(0, 2) = -2. + 4.*z;
313 output.access(0, 3) = 0.;
314 output.access(0, 4) = -2. + 4.*z;
315 output.access(0, 5) = -3. + 4.*x + 4.*y;
316 output.access(0, 6) = 0.;
317 output.access(0, 7) = -2. + 4.*z;
318 output.access(0, 8) = -3. + 4.*x + 4.*y;
319 output.access(0, 9) = 0.;
321 output.access(1, 0) = 0.;
322 output.access(1, 1) = 0.;
323 output.access(1, 2) = -2. + 4.*z;
324 output.access(1, 3) = 0.;
325 output.access(1, 4) = 0.;
326 output.access(1, 5) = -1 + 4.*x;
327 output.access(1, 6) = 0.;
328 output.access(1, 7) = 0.;
329 output.access(1, 8) = 0.;
330 output.access(1, 9) = 0.;
332 output.access(2, 0) = 0.;
333 output.access(2, 1) = 0.;
334 output.access(2, 2) = 0.;
335 output.access(2, 3) = 0.;
336 output.access(2, 4) = 0.;
337 output.access(2, 5) = 0.;
338 output.access(2, 6) = 0.;
339 output.access(2, 7) = -2. + 4.*z;
340 output.access(2, 8) = -1 + 4.*y;
341 output.access(2, 9) = 0.;
343 output.access(3, 0) = 0.;
344 output.access(3, 1) = 0.;
345 output.access(3, 2) = 2. + 4.*z;
346 output.access(3, 3) = 0.;
347 output.access(3, 4) = 2. + 4.*z;
348 output.access(3, 5) = -3. + 4.*x + 4.*y;
349 output.access(3, 6) = 0.;
350 output.access(3, 7) = 2. + 4.*z;
351 output.access(3, 8) = -3. + 4.*x + 4.*y;
352 output.access(3, 9) = 0.;
354 output.access(4, 0) = 0.;
355 output.access(4, 1) = 0.;
356 output.access(4, 2) = 2. + 4.*z;
357 output.access(4, 3) = 0.;
358 output.access(4, 4) = 0.;
359 output.access(4, 5) = -1 + 4.*x;
360 output.access(4, 6) = 0.;
361 output.access(4, 7) = 0.;
362 output.access(4, 8) = 0.;
363 output.access(4, 9) = 0.;
365 output.access(5, 0) = 0.;
366 output.access(5, 1) = 0.;
367 output.access(5, 2) = 0.;
368 output.access(5, 3) = 0.;
369 output.access(5, 4) = 0.;
370 output.access(5, 5) = 0.;
371 output.access(5, 6) = 0.;
372 output.access(5, 7) = 2. + 4.*z;
373 output.access(5, 8) = -1 + 4.*y;
374 output.access(5, 9) = 0.;
376 output.access(6, 0) = 0.;
377 output.access(6, 1) = 0.;
378 output.access(6, 2) = 4. - 8.*z;
379 output.access(6, 3) = 0.;
380 output.access(6, 4) = 2. - 4.*z;
381 output.access(6, 5) = -4.*(-1 + 2*x + y);
382 output.access(6, 6) = 0.;
383 output.access(6, 7) = 0.;
384 output.access(6, 8) = -4.*x;
385 output.access(6, 9) = 0.;
387 output.access(7, 0) = 0.;
388 output.access(7, 1) = 0.;
389 output.access(7, 2) = 0.;
390 output.access(7, 3) = 0.;
391 output.access(7, 4) = -2. + 4.*z;
392 output.access(7, 5) = 4.*y;
393 output.access(7, 6) = 0.;
394 output.access(7, 7) = 0.;
395 output.access(7, 8) = 4.*x;
396 output.access(7, 9) = 0.;
398 output.access(8, 0) = 0.;
399 output.access(8, 1) = 0.;
400 output.access(8, 2) = 0.;
401 output.access(8, 3) = 0.;
402 output.access(8, 4) = 2. - 4.*z;
403 output.access(8, 5) = -4.*y;
404 output.access(8, 6) = 0.;
405 output.access(8, 7) = 4. - 8.*z;
406 output.access(8, 8) = -4.*(-1 + x + 2*y);
407 output.access(8, 9) = 0.;
409 output.access(9, 0) = 0.;
410 output.access(9, 1) = 0.;
411 output.access(9, 2) = -8.*z;
412 output.access(9, 3) = 0.;
413 output.access(9, 4) = -8.*z;
414 output.access(9, 5) = 6. - 8.*x - 8.*y;
415 output.access(9, 6) = 0.;
416 output.access(9, 7) = -8.*z;
417 output.access(9, 8) = 6. - 8.*x - 8.*y;
418 output.access(9, 9) = 0.;
420 output.access(10, 0) = 0.;
421 output.access(10, 1) = 0.;
422 output.access(10, 2) = -8.*z;
423 output.access(10, 3) = 0.;
424 output.access(10, 4) = 0.;
425 output.access(10, 5) = 2. - 8.*x;
426 output.access(10, 6) = 0.;
427 output.access(10, 7) = 0.;
428 output.access(10, 8) = 0.;
429 output.access(10, 9) = 0.;
431 output.access(11, 0) = 0.;
432 output.access(11, 1) = 0.;
433 output.access(11, 2) = 0.;
434 output.access(11, 3) = 0.;
435 output.access(11, 4) = 0.;
436 output.access(11, 5) = 0.;
437 output.access(11, 6) = 0.;
438 output.access(11, 7) = -8.*z;
439 output.access(11, 8) = 2. - 8.*y;
440 output.access(11, 9) = 0.;
442 output.access(12, 0) = 0.;
443 output.access(12, 1) = 0.;
444 output.access(12, 2) = -4. - 8.*z;
445 output.access(12, 3) = 0.;
446 output.access(12, 4) = -2. - 4.*z;
447 output.access(12, 5) = -4.*(-1 + 2*x + y);
448 output.access(12, 6) = 0.;
449 output.access(12, 7) = 0.;
450 output.access(12, 8) = -4.*x;
451 output.access(12, 9) = 0.;
453 output.access(13, 0) = 0.;
454 output.access(13, 1) = 0.;
455 output.access(13, 2) = 0.;
456 output.access(13, 3) = 0.;
457 output.access(13, 4) = 2. + 4.*z;
458 output.access(13, 5) = 4.*y;
459 output.access(13, 6) = 0.;
460 output.access(13, 7) = 0.;
461 output.access(13, 8) = 4.*x;
462 output.access(13, 9) = 0.;
464 output.access(14, 0) = 0.;
465 output.access(14, 1) = 0.;
466 output.access(14, 2) = 0.;
467 output.access(14, 3) = 0.;
468 output.access(14, 4) = -2. - 4.*z;
469 output.access(14, 5) = -4.*y;
470 output.access(14, 6) = 0.;
471 output.access(14, 7) = -4. - 8.*z;
472 output.access(14, 8) = -4.*(-1 + x + 2*y);
473 output.access(14, 9) = 0.;
475 output.access(15, 0) = 0.;
476 output.access(15, 1) = 0.;
477 output.access(15, 2) = 16.*z;
478 output.access(15, 3) = 0.;
479 output.access(15, 4) = 8.*z;
480 output.access(15, 5) = 8.*(-1 + 2*x + y);
481 output.access(15, 6) = 0.;
482 output.access(15, 7) = 0.;
483 output.access(15, 8) = 8.*x;
484 output.access(15, 9) = 0.;
486 output.access(16, 0) = 0.;
487 output.access(16, 1) = 0.;
488 output.access(16, 2) = 0.;
489 output.access(16, 3) = 0.;
490 output.access(16, 4) = -8.*z;
491 output.access(16, 5) = -8.*y;
492 output.access(16, 6) = 0.;
493 output.access(16, 7) = 0.;
494 output.access(16, 8) = -8.*x;
495 output.access(16, 9) = 0.;
497 output.access(17, 0) = 0.;
498 output.access(17, 1) = 0.;
499 output.access(17, 2) = 0.;
500 output.access(17, 3) = 0.;
501 output.access(17, 4) = 8.*z;
502 output.access(17, 5) = 8.*y;
503 output.access(17, 6) = 0.;
504 output.access(17, 7) = 16.*z;
505 output.access(17, 8) = 8.*(-1 + x + 2*y);
506 output.access(17, 9) = 0.;
510 const ordinal_type jend = output.extent(1);
511 const ordinal_type iend = output.extent(0);
513 for (ordinal_type j=0;j<jend;++j)
514 for (ordinal_type i=0;i<iend;++i)
515 output.access(i, j) = 0.0;
517 output.access(0, 5) = 4.;
518 output.access(0, 8) = 4.;
519 output.access(0,12) = 4.;
521 output.access(1, 5) = 4.;
523 output.access(2,12) = 4.;
525 output.access(3, 5) = 4.;
526 output.access(3, 8) = 4.;
527 output.access(3,12) = 4.;
529 output.access(4, 5) = 4.0;
531 output.access(5,12) = 4.0;
533 output.access(6, 5) =-8.;
534 output.access(6, 8) =-4.;
536 output.access(7, 8) = 4.;
538 output.access(8, 8) =-4.;
539 output.access(8,12) =-8.;
541 output.access(9, 5) =-8.;
542 output.access(9, 8) =-8.;
543 output.access(9,12) =-8.;
545 output.access(10, 5) =-8.;
547 output.access(11,12) =-8.;
549 output.access(12, 5) =-8.;
550 output.access(12, 8) =-4.;
552 output.access(13, 8) = 4.;
554 output.access(14, 8) =-4;
555 output.access(14,12) =-8.;
557 output.access(15, 5) =16.;
558 output.access(15, 8) = 8.;
560 output.access(16, 8) =-8.;
563 output.access(17, 8) = 8.;
564 output.access(17,12) =16.;
567 case OPERATOR_MAX : {
568 const ordinal_type jend = output.extent(1);
569 const ordinal_type iend = output.extent(0);
571 for (ordinal_type j=0;j<jend;++j)
572 for (ordinal_type i=0;i<iend;++i)
573 output.access(i, j) = 0.0;
578 INTREPID2_TEST_FOR_ABORT( opType != OPERATOR_VALUE &&
579 opType != OPERATOR_GRAD &&
580 opType != OPERATOR_D2 &&
581 opType != OPERATOR_D3 &&
582 opType != OPERATOR_D4 &&
583 opType != OPERATOR_MAX,
584 ">>> ERROR: (Intrepid2::Basis_HGRAD_WEDGE_C2_FEM::Serial::getValues) operator is not supported");
590 template<
typename SpT,
591 typename outputValueValueType,
class ...outputValueProperties,
592 typename inputPointValueType,
class ...inputPointProperties>
594 Basis_HGRAD_WEDGE_C2_FEM::
595 getValues( Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValues,
596 const Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPoints,
597 const EOperator operatorType ) {
598 typedef Kokkos::DynRankView<outputValueValueType,outputValueProperties...> outputValueViewType;
599 typedef Kokkos::DynRankView<inputPointValueType, inputPointProperties...> inputPointViewType;
600 typedef typename ExecSpace<typename inputPointViewType::execution_space,SpT>::ExecSpaceType ExecSpaceType;
603 const auto loopSize = inputPoints.extent(0);
604 Kokkos::RangePolicy<ExecSpaceType,Kokkos::Schedule<Kokkos::Static> > policy(0, loopSize);
605 switch (operatorType) {
607 case OPERATOR_VALUE: {
608 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_VALUE> FunctorType;
609 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
614 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_GRAD> FunctorType;
615 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
618 case OPERATOR_CURL: {
619 INTREPID2_TEST_FOR_EXCEPTION( operatorType == OPERATOR_CURL, std::invalid_argument,
620 ">>> ERROR (Basis_HGRAD_WEDGE_C2_FEM): CURL is invalid operator for rank-0 (scalar) functions in 3D");
624 INTREPID2_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
625 ">>> ERROR (Basis_HGRAD_WEDGE_C2_FEM): DIV is invalid operator for rank-0 (scalar) functions in 3D");
629 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D2> FunctorType;
630 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
634 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D3> FunctorType;
635 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
639 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_D4> FunctorType;
640 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
649 typedef Functor<outputValueViewType,inputPointViewType,OPERATOR_MAX> FunctorType;
650 Kokkos::parallel_for( policy, FunctorType(outputValues, inputPoints) );
654 INTREPID2_TEST_FOR_EXCEPTION( !( Intrepid2::isValidOperator(operatorType) ), std::invalid_argument,
655 ">>> ERROR (Basis_HGRAD_WEDGE_C2_FEM): Invalid operator type");
663 template<
typename SpT,
typename OT,
typename PT>
666 this->basisCardinality_ = 18;
667 this->basisDegree_ = 2;
668 this->basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() );
669 this->basisType_ = BASIS_FEM_DEFAULT;
670 this->basisCoordinates_ = COORDINATES_CARTESIAN;
671 this->functionSpace_ = FUNCTION_SPACE_HGRAD;
676 const ordinal_type tagSize = 4;
677 const ordinal_type posScDim = 0;
678 const ordinal_type posScOrd = 1;
679 const ordinal_type posDfOrd = 2;
682 ordinal_type tags[72] = { 0, 0, 0, 1,
708 this->setOrdinalTagData(this->tagToOrdinal_,
711 this->basisCardinality_,
719 Kokkos::DynRankView<typename ScalarViewType::value_type,typename SpT::array_layout,Kokkos::HostSpace>
720 dofCoords(
"dofCoordsHost", this->basisCardinality_,this->basisCellTopology_.getDimension());
722 dofCoords(0,0) = 0.0; dofCoords(0,1) = 0.0; dofCoords(0,2) = -1.0;
723 dofCoords(1,0) = 1.0; dofCoords(1,1) = 0.0; dofCoords(1,2) = -1.0;
724 dofCoords(2,0) = 0.0; dofCoords(2,1) = 1.0; dofCoords(2,2) = -1.0;
725 dofCoords(3,0) = 0.0; dofCoords(3,1) = 0.0; dofCoords(3,2) = 1.0;
726 dofCoords(4,0) = 1.0; dofCoords(4,1) = 0.0; dofCoords(4,2) = 1.0;
727 dofCoords(5,0) = 0.0; dofCoords(5,1) = 1.0; dofCoords(5,2) = 1.0;
729 dofCoords(6,0) = 0.5; dofCoords(6,1) = 0.0; dofCoords(6,2) = -1.0;
730 dofCoords(7,0) = 0.5; dofCoords(7,1) = 0.5; dofCoords(7,2) = -1.0;
731 dofCoords(8,0) = 0.0; dofCoords(8,1) = 0.5; dofCoords(8,2) = -1.0;
732 dofCoords(9,0) = 0.0; dofCoords(9,1) = 0.0; dofCoords(9,2) = 0.0;
733 dofCoords(10,0)= 1.0; dofCoords(10,1)= 0.0; dofCoords(10,2)= 0.0;
734 dofCoords(11,0)= 0.0; dofCoords(11,1)= 1.0; dofCoords(11,2)= 0.0;
736 dofCoords(12,0)= 0.5; dofCoords(12,1)= 0.0; dofCoords(12,2)= 1.0;
737 dofCoords(13,0)= 0.5; dofCoords(13,1)= 0.5; dofCoords(13,2)= 1.0;
738 dofCoords(14,0)= 0.0; dofCoords(14,1)= 0.5; dofCoords(14,2)= 1.0;
739 dofCoords(15,0)= 0.5; dofCoords(15,1)= 0.0; dofCoords(15,2)= 0.0;
740 dofCoords(16,0)= 0.5; dofCoords(16,1)= 0.5; dofCoords(16,2)= 0.0;
741 dofCoords(17,0)= 0.0; dofCoords(17,1)= 0.5; dofCoords(17,2)= 0.0;
743 this->dofCoords_ = Kokkos::create_mirror_view(
typename SpT::memory_space(), dofCoords);
744 Kokkos::deep_copy(this->dofCoords_, dofCoords);
Kokkos::View< ordinal_type *, typename ExecSpaceType::array_layout, Kokkos::HostSpace > OrdinalTypeArray1DHost
View type for 1d host array.
Basis_HGRAD_WEDGE_C2_FEM()
Constructor.