Intrepid
Intrepid_HGRAD_WEDGE_I2_FEMDef.hpp
Go to the documentation of this file.
1#ifndef INTREPID_HGRAD_WEDGE_I2_FEMDEF_HPP
2#define INTREPID_HGRAD_WEDGE_I2_FEMDEF_HPP
3// @HEADER
4// ************************************************************************
5//
6// Intrepid Package
7// Copyright (2007) Sandia Corporation
8//
9// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
10// license for use of this work by or on behalf of the U.S. Government.
11//
12// Redistribution and use in source and binary forms, with or without
13// modification, are permitted provided that the following conditions are
14// met:
15//
16// 1. Redistributions of source code must retain the above copyright
17// notice, this list of conditions and the following disclaimer.
18//
19// 2. Redistributions in binary form must reproduce the above copyright
20// notice, this list of conditions and the following disclaimer in the
21// documentation and/or other materials provided with the distribution.
22//
23// 3. Neither the name of the Corporation nor the names of the
24// contributors may be used to endorse or promote products derived from
25// this software without specific prior written permission.
26//
27// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
28// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
31// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
32// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
33// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
34// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
35// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
36// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38//
39// Questions? Contact Pavel Bochev (pbboche@sandia.gov)
40// Denis Ridzal (dridzal@sandia.gov), or
41// Kara Peterson (kjpeter@sandia.gov)
42//
43// ************************************************************************
44// @HEADER
45
51namespace Intrepid {
52
53 template<class Scalar, class ArrayScalar>
55 {
56 this -> basisCardinality_ = 15;
57 this -> basisDegree_ = 2;
58 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Wedge<6> >() );
59 this -> basisType_ = BASIS_FEM_DEFAULT;
60 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
61 this -> basisTagsAreSet_ = false;
62 }
63
64
65template<class Scalar, class ArrayScalar>
67
68 // Basis-dependent intializations
69 int tagSize = 4; // size of DoF tag
70 int posScDim = 0; // position in the tag, counting from 0, of the subcell dim
71 int posScOrd = 1; // position in the tag, counting from 0, of the subcell ordinal
72 int posDfOrd = 2; // position in the tag, counting from 0, of DoF ordinal relative to the subcell
73
74 // An array with local DoF tags assigned to basis functions, in the order of their local enumeration
75 int tags[] = { 0, 0, 0, 1,
76 0, 1, 0, 1,
77 0, 2, 0, 1,
78 0, 3, 0, 1,
79 0, 4, 0, 1,
80 0, 5, 0, 1,
81 1, 0, 0, 1,
82 1, 1, 0, 1,
83 1, 2, 0, 1,
84 1, 6, 0, 1,
85 1, 7, 0, 1,
86 1, 8, 0, 1,
87 1, 3, 0, 1,
88 1, 4, 0, 1,
89 1, 5, 0, 1,
90 };
91
92 // Basis-independent function sets tag and enum data in tagToOrdinal_ and ordinalToTag_ arrays:
93 Intrepid::setOrdinalTagData(this -> tagToOrdinal_,
94 this -> ordinalToTag_,
95 tags,
96 this -> basisCardinality_,
97 tagSize,
98 posScDim,
99 posScOrd,
100 posDfOrd);
101}
102
103
104
105template<class Scalar, class ArrayScalar>
107 const ArrayScalar & inputPoints,
108 const EOperator operatorType) const {
109
110 // Verify arguments
111#ifdef HAVE_INTREPID_DEBUG
112 Intrepid::getValues_HGRAD_Args<Scalar, ArrayScalar>(outputValues,
113 inputPoints,
114 operatorType,
115 this -> getBaseCellTopology(),
116 this -> getCardinality() );
117#endif
118
119 // Number of evaluation points = dim 0 of inputPoints
120 int dim0 = inputPoints.dimension(0);
121
122 // Temporaries: (x,y,z) coordinates of the evaluation point
123 Scalar x = 0.0;
124 Scalar y = 0.0;
125 Scalar z = 0.0;
126 Scalar w = 0.0;
127
128 switch (operatorType) {
129
130 case OPERATOR_VALUE:
131 for (int i0 = 0; i0 < dim0; i0++) {
132 x = inputPoints(i0, 0);
133 y = inputPoints(i0, 1);
134 z = inputPoints(i0, 2);
135 w = 1.0 - x - y;
136
137 // outputValues is a rank-2 array with dimensions (basisCardinality_, dim0)
138 outputValues(0, i0) = 0.5 * w *(2.0*w - 2.0 - z)*(1.0 - z);
139 outputValues(1, i0) = 0.5 * x *(2.0*x - 2.0 - z)*(1.0 - z);
140 outputValues(2, i0) = 0.5 * y *(2.0*y - 2.0 - z)*(1.0 - z);
141 outputValues(3, i0) = 0.5 * w *(2.0*w - 2.0 + z)*(1.0 + z);
142 outputValues(4, i0) = 0.5 * x *(2.0*x - 2.0 + z)*(1.0 + z);
143 outputValues(5, i0) = 0.5 * y *(2.0*y - 2.0 + z)*(1.0 + z);
144
145 outputValues(6, i0) = 2.0 * w * x * (1.0 - z);
146 outputValues(7, i0) = 2.0 * x * y * (1.0 - z);
147 outputValues(8, i0) = 2.0 * y * w * (1.0 - z);
148 outputValues(9, i0) = w * (1.0 - z*z);
149 outputValues(10,i0) = x * (1.0 - z*z);
150 outputValues(11,i0) = y * (1.0 - z*z);
151 outputValues(12,i0) = 2.0 * w * x * (1.0 + z);
152 outputValues(13,i0) = 2.0 * x * y * (1.0 + z);
153 outputValues(14,i0) = 2.0 * y * w * (1.0 + z);
154 }
155 break;
156
157 case OPERATOR_GRAD:
158 case OPERATOR_D1:
159 for (int i0 = 0; i0 < dim0; i0++) {
160 x = inputPoints(i0,0);
161 y = inputPoints(i0,1);
162 z = inputPoints(i0,2);
163 w = 1.0 - x - y;
164
165 // outputValues is a rank-3 array with dimensions (basisCardinality_, dim0, spaceDim)
166 outputValues(0, i0, 0) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z);
167 outputValues(0, i0, 1) = -(2.0*w - 1.0 - 0.5*z)*(1.0 - z);
168 outputValues(0, i0, 2) = -0.5*w*(2.0*w - 1.0 - 2.0*z);
169
170 outputValues(1, i0, 0) = (2.0*x - 1.0 - 0.5*z)*(1.0 - z);
171 outputValues(1, i0, 1) = 0.0;
172 outputValues(1, i0, 2) = -0.5*x*(2.0*x - 1.0 - 2.0*z);
173
174 outputValues(2, i0, 0) = 0.0;
175 outputValues(2, i0, 1) = (2.0*y - 1.0 - 0.5*z)*(1.0 - z);
176 outputValues(2, i0, 2) = -0.5*y*(2.0*y - 1.0 - 2.0*z);
177
178 outputValues(3, i0, 0) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z);
179 outputValues(3, i0, 1) = -(2.0*w - 1.0 + 0.5*z)*(1.0 + z);
180 outputValues(3, i0, 2) = 0.5*w*(2.0*w - 1.0 + 2.0*z);
181
182 outputValues(4, i0, 0) = (2.0*x - 1.0 + 0.5*z)*(1.0 + z);
183 outputValues(4, i0, 1) = 0.0;
184 outputValues(4, i0, 2) = 0.5*x*(2.0*x - 1.0 + 2.0*z);
185
186 outputValues(5, i0, 0) = 0.0;
187 outputValues(5, i0, 1) = (2.0*y - 1.0 + 0.5*z)*(1.0 + z);
188 outputValues(5, i0, 2) = 0.5*y*(2.0*y - 1.0 + 2.0*z);
189
190 outputValues(6, i0, 0) = 2.0*(w - x)*(1.0 - z);
191 outputValues(6, i0, 1) = -2.0*x*(1.0 - z);
192 outputValues(6, i0, 2) = -2.0*x*w;
193
194 outputValues(7, i0, 0) = 2.0*y*(1.0 - z);
195 outputValues(7, i0, 1) = 2.0*x*(1.0 - z);
196 outputValues(7, i0, 2) = -2.0*x*y;
197
198 outputValues(8, i0, 0) = -2.0*y*(1.0 - z);
199 outputValues(8, i0, 1) = 2.0*(w - y)*(1.0 - z);
200 outputValues(8, i0, 2) = -2.0*w*y;
201
202 outputValues(9, i0, 0) = -(1.0 - z*z);
203 outputValues(9, i0, 1) = -(1.0 - z*z);
204 outputValues(9, i0, 2) = -2.0*z*w;
205
206 outputValues(10,i0, 0) = (1.0 - z*z);
207 outputValues(10,i0, 1) = 0.0;
208 outputValues(10,i0, 2) = -2.0*z*x;
209
210 outputValues(11,i0, 0) = 0.0;
211 outputValues(11,i0, 1) = (1.0 - z*z);
212 outputValues(11,i0, 2) = -2.0*z*y;
213
214 outputValues(12,i0, 0) = 2.0*(w - x)*(1.0 + z);
215 outputValues(12,i0, 1) = -2.0*x*(1.0 + z);
216 outputValues(12,i0, 2) = 2.0*x*w;
217
218 outputValues(13,i0, 0) = 2.0*y*(1.0 + z);
219 outputValues(13,i0, 1) = 2.0*x*(1.0 + z);
220 outputValues(13,i0, 2) = 2.0*x*y;
221
222 outputValues(14,i0, 0) = -2.0*y*(1.0 + z);
223 outputValues(14,i0, 1) = 2.0*(w - y)*(1.0 + z);
224 outputValues(14,i0, 2) = 2.0*w*y;
225
226 }
227 break;
228
229 case OPERATOR_CURL:
230 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
231 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): CURL is invalid operator for rank-0 (scalar) functions in 3D");
232 break;
233
234 case OPERATOR_DIV:
235 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
236 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): DIV is invalid operator for rank-0 (scalar) functions in 3D");
237 break;
238
239 case OPERATOR_D2:
240 for (int i0 = 0; i0 < dim0; i0++) {
241 x = inputPoints(i0,0);
242 y = inputPoints(i0,1);
243 z = inputPoints(i0,2);
244 w = 1.0 - x - y;
245
246 outputValues(0, i0, 0) = 2.0*(1.0 - z);
247 outputValues(0, i0, 1) = 2.0*(1.0 - z);
248 outputValues(0, i0, 2) = 2.0*w - 0.5 - z;
249 outputValues(0, i0, 3) = 2.0*(1.0-z);
250 outputValues(0, i0, 4) = 2.0*w -0.5 - z;
251 outputValues(0, i0, 5) = w;
252
253 outputValues(1, i0, 0) = 2.0*(1.0 - z);
254 outputValues(1, i0, 1) = 0.;
255 outputValues(1, i0, 2) = -2.0*x + 0.5 + z;
256 outputValues(1, i0, 3) = 0.;
257 outputValues(1, i0, 4) = 0.;
258 outputValues(1, i0, 5) = x;
259
260 outputValues(2, i0, 0) = 0.;
261 outputValues(2, i0, 1) = 0.;
262 outputValues(2, i0, 2) = 0.;
263 outputValues(2, i0, 3) = 2.0*(1.0 - z);
264 outputValues(2, i0, 4) = -2.0*y + 0.5 + z;
265 outputValues(2, i0, 5) = y;
266
267 outputValues(3, i0, 0) = 2.0*(1.0 + z);
268 outputValues(3, i0, 1) = 2.0*(1.0 + z);
269 outputValues(3, i0, 2) = -2.0*w + 0.5 - z;
270 outputValues(3, i0, 3) = 2.0*(1.0 + z);
271 outputValues(3, i0, 4) = -2.0*w + 0.5 - z;
272 outputValues(3, i0, 5) = w;
273
274 outputValues(4, i0, 0) = 2.0*(1.0 + z);
275 outputValues(4, i0, 1) = 0.;
276 outputValues(4, i0, 2) = 2.0*x - 0.5 + z;
277 outputValues(4, i0, 3) = 0.;
278 outputValues(4, i0, 4) = 0.;
279 outputValues(4, i0, 5) = x;
280
281 outputValues(5, i0, 0) = 0.;
282 outputValues(5, i0, 1) = 0.;
283 outputValues(5, i0, 2) = 0.;
284 outputValues(5, i0, 3) = 2.0*(1.0 + z);
285 outputValues(5, i0, 4) = 2.0*y - 0.5 + z;
286 outputValues(5, i0, 5) = y;
287
288 outputValues(6, i0, 0) = -4.0*(1.0 - z);
289 outputValues(6, i0, 1) = -2.0*(1.0 - z);
290 outputValues(6, i0, 2) = -2.0*(w - x);
291 outputValues(6, i0, 3) = 0.;
292 outputValues(6, i0, 4) = 2.0*x;
293 outputValues(6, i0, 5) = 0.;
294
295 outputValues(7, i0, 0) = 0.;
296 outputValues(7, i0, 1) = 2.0*(1.0 - z);
297 outputValues(7, i0, 2) = -2.0*y;
298 outputValues(7, i0, 3) = 0.;
299 outputValues(7, i0, 4) = -2.0*x;
300 outputValues(7, i0, 5) = 0.;
301
302 outputValues(8, i0, 0) = 0.;
303 outputValues(8, i0, 1) = -2.0*(1.0 - z);
304 outputValues(8, i0, 2) = 2.0*y;
305 outputValues(8, i0, 3) = -4.0*(1.0 - z);
306 outputValues(8, i0, 4) = -2.0*(w - y);
307 outputValues(8, i0, 5) = 0.;
308
309 outputValues(9, i0, 0) = 0.;
310 outputValues(9, i0, 1) = 0.;
311 outputValues(9, i0, 2) = 2.0*z;
312 outputValues(9, i0, 3) = 0.;
313 outputValues(9, i0, 4) = 2.0*z;
314 outputValues(9, i0, 5) = -2.0*w;
315
316 outputValues(10,i0, 0) = 0.;
317 outputValues(10,i0, 1) = 0.;
318 outputValues(10,i0, 2) = -2.0*z;
319 outputValues(10,i0, 3) = 0.;
320 outputValues(10,i0, 4) = 0.;
321 outputValues(10,i0, 5) = -2.0*x;
322
323 outputValues(11,i0, 0) = 0.;
324 outputValues(11,i0, 1) = 0.;
325 outputValues(11,i0, 2) = 0.;
326 outputValues(11,i0, 3) = 0.;
327 outputValues(11,i0, 4) = -2.0*z;
328 outputValues(11,i0, 5) = -2.0*y;
329
330 outputValues(12,i0, 0) = -4.0*(1.0 + z);
331 outputValues(12,i0, 1) = -2.0*(1.0 + z);
332 outputValues(12,i0, 2) = 2.0*(w - x);
333 outputValues(12,i0, 3) = 0.;
334 outputValues(12,i0, 4) = -2.0*x;
335 outputValues(12,i0, 5) = 0.;
336
337 outputValues(13,i0, 0) = 0.;
338 outputValues(13,i0, 1) = 2.0*(1.0 + z);
339 outputValues(13,i0, 2) = 2.0*y;
340 outputValues(13,i0, 3) = 0.;
341 outputValues(13,i0, 4) = 2.0*x;
342 outputValues(13,i0, 5) = 0.;
343
344 outputValues(14,i0, 0) = 0.;
345 outputValues(14,i0, 1) = -2.0*(1.0 + z);
346 outputValues(14,i0, 2) = -2.0*y;
347 outputValues(14,i0, 3) = -4.0*(1.0 + z);
348 outputValues(14,i0, 4) = 2.0*(w - y);
349 outputValues(14,i0, 5) = 0.;
350
351 }
352 break;
353
354 case OPERATOR_D3:
355 for (int i0 = 0; i0 < dim0; i0++) {
356 x = inputPoints(i0,0);
357 y = inputPoints(i0,1);
358 z = inputPoints(i0,2);
359
360 outputValues(0, i0, 0) = 0.0;
361 outputValues(0, i0, 1) = 0.0;
362 outputValues(0, i0, 2) = -2.0;
363 outputValues(0, i0, 3) = 0.0;
364 outputValues(0, i0, 4) = -2.0;
365 outputValues(0, i0, 5) = -1.0;
366 outputValues(0, i0, 6) = 0.0;
367 outputValues(0, i0, 7) = -2.0;
368 outputValues(0, i0, 8) = -1.0;
369 outputValues(0, i0, 9) = 0.0;
370
371 outputValues(1, i0, 0) = 0.0;
372 outputValues(1, i0, 1) = 0.0;
373 outputValues(1, i0, 2) = -2.0;
374 outputValues(1, i0, 3) = 0.0;
375 outputValues(1, i0, 4) = 0.0;
376 outputValues(1, i0, 5) = -1.0;
377 outputValues(1, i0, 6) = 0.0;
378 outputValues(1, i0, 7) = 0.0;
379 outputValues(1, i0, 8) = 0.0;
380 outputValues(1, i0, 9) = 0.0;
381
382 outputValues(2, i0, 0) = 0.0;
383 outputValues(2, i0, 1) = 0.0;
384 outputValues(2, i0, 2) = 0.0;
385 outputValues(2, i0, 3) = 0.0;
386 outputValues(2, i0, 4) = 0.0;
387 outputValues(2, i0, 5) = 0.0;
388 outputValues(2, i0, 6) = 0.0;
389 outputValues(2, i0, 7) = -2.0;
390 outputValues(2, i0, 8) = -1.0;
391 outputValues(2, i0, 9) = 0.0;
392
393 outputValues(3, i0, 0) = 0.0;
394 outputValues(3, i0, 1) = 0.0;
395 outputValues(3, i0, 2) = 2.0;
396 outputValues(3, i0, 3) = 0.0;
397 outputValues(3, i0, 4) = 2.0;
398 outputValues(3, i0, 5) = -1.0;
399 outputValues(3, i0, 6) = 0.0;
400 outputValues(3, i0, 7) = 2.0;
401 outputValues(3, i0, 8) = -1.0;
402 outputValues(3, i0, 9) = 0.0;
403
404 outputValues(4, i0, 0) = 0.0;
405 outputValues(4, i0, 1) = 0.0;
406 outputValues(4, i0, 2) = 2.0;
407 outputValues(4, i0, 3) = 0.0;
408 outputValues(4, i0, 4) = 0.0;
409 outputValues(4, i0, 5) = 1.0;
410 outputValues(4, i0, 6) = 0.0;
411 outputValues(4, i0, 7) = 0.0;
412 outputValues(4, i0, 8) = 0.0;
413 outputValues(4, i0, 9) = 0.0;
414
415 outputValues(5, i0, 0) = 0.0;
416 outputValues(5, i0, 1) = 0.0;
417 outputValues(5, i0, 2) = 0.0;
418 outputValues(5, i0, 3) = 0.0;
419 outputValues(5, i0, 4) = 0.0;
420 outputValues(5, i0, 5) = 0.0;
421 outputValues(5, i0, 6) = 0.0;
422 outputValues(5, i0, 7) = 2.0;
423 outputValues(5, i0, 8) = 1.0;
424 outputValues(5, i0, 9) = 0.0;
425
426 outputValues(6, i0, 0) = 0.0;
427 outputValues(6, i0, 1) = 0.0;
428 outputValues(6, i0, 2) = 4.0;
429 outputValues(6, i0, 3) = 0.0;
430 outputValues(6, i0, 4) = 2.0;
431 outputValues(6, i0, 5) = 0.0;
432 outputValues(6, i0, 6) = 0.0;
433 outputValues(6, i0, 7) = 0.0;
434 outputValues(6, i0, 8) = 0.0;
435 outputValues(6, i0, 9) = 0.0;
436
437 outputValues(7, i0, 0) = 0.0;
438 outputValues(7, i0, 1) = 0.0;
439 outputValues(7, i0, 2) = 0.0;
440 outputValues(7, i0, 3) = 0.0;
441 outputValues(7, i0, 4) = -2.0;
442 outputValues(7, i0, 5) = 0.0;
443 outputValues(7, i0, 6) = 0.0;
444 outputValues(7, i0, 7) = 0.0;
445 outputValues(7, i0, 8) = 0.0;
446 outputValues(7, i0, 9) = 0.0;
447
448 outputValues(8, i0, 0) = 0.0;
449 outputValues(8, i0, 1) = 0.0;
450 outputValues(8, i0, 2) = 0.0;
451 outputValues(8, i0, 3) = 0.0;
452 outputValues(8, i0, 4) = 2.0;
453 outputValues(8, i0, 5) = 0.0;
454 outputValues(8, i0, 6) = 0.0;
455 outputValues(8, i0, 7) = 4.0;
456 outputValues(8, i0, 8) = 0.0;
457 outputValues(8, i0, 9) = 0.0;
458
459 outputValues(9, i0, 0) = 0.0;
460 outputValues(9, i0, 1) = 0.0;
461 outputValues(9, i0, 2) = 0.0;
462 outputValues(9, i0, 3) = 0.0;
463 outputValues(9, i0, 4) = 0.0;
464 outputValues(9, i0, 5) = 2.0;
465 outputValues(9, i0, 6) = 0.0;
466 outputValues(9, i0, 7) = 0.0;
467 outputValues(9, i0, 8) = 2.0;
468 outputValues(9, i0, 9) = 0.0;
469
470 outputValues(10,i0, 0) = 0.0;
471 outputValues(10,i0, 1) = 0.0;
472 outputValues(10,i0, 2) = 0.0;
473 outputValues(10,i0, 3) = 0.0;
474 outputValues(10,i0, 4) = 0.0;
475 outputValues(10,i0, 5) = -2.0;
476 outputValues(10,i0, 6) = 0.0;
477 outputValues(10,i0, 7) = 0.0;
478 outputValues(10,i0, 8) = 0.0;
479 outputValues(10,i0, 9) = 0.0;
480
481 outputValues(11,i0, 0) = 0.0;
482 outputValues(11,i0, 1) = 0.0;
483 outputValues(11,i0, 2) = 0.0;
484 outputValues(11,i0, 3) = 0.0;
485 outputValues(11,i0, 4) = 0.0;
486 outputValues(11,i0, 5) = 0.0;
487 outputValues(11,i0, 6) = 0.0;
488 outputValues(11,i0, 7) = 0.0;
489 outputValues(11,i0, 8) = -2.0;
490 outputValues(11,i0, 9) = 0.0;
491
492 outputValues(12,i0, 0) = 0.0;
493 outputValues(12,i0, 1) = 0.0;
494 outputValues(12,i0, 2) = -4.0;
495 outputValues(12,i0, 3) = 0.0;
496 outputValues(12,i0, 4) = -2.0;
497 outputValues(12,i0, 5) = 0.0;
498 outputValues(12,i0, 6) = 0.0;
499 outputValues(12,i0, 7) = 0.0;
500 outputValues(12,i0, 8) = 0.0;
501 outputValues(12,i0, 9) = 0.0;
502
503 outputValues(13,i0, 0) = 0.0;
504 outputValues(13,i0, 1) = 0.0;
505 outputValues(13,i0, 2) = 0.0;
506 outputValues(13,i0, 3) = 0.0;
507 outputValues(13,i0, 4) = 2.0;
508 outputValues(13,i0, 5) = 0.0;
509 outputValues(13,i0, 6) = 0.0;
510 outputValues(13,i0, 7) = 0.0;
511 outputValues(13,i0, 8) = 0.0;
512 outputValues(13,i0, 9) = 0.0;
513
514 outputValues(14,i0, 0) = 0.0;
515 outputValues(14,i0, 1) = 0.0;
516 outputValues(14,i0, 2) = 0.0;
517 outputValues(14,i0, 3) = 0.0;
518 outputValues(14,i0, 4) = -2.0;
519 outputValues(14,i0, 5) = 0.0;
520 outputValues(14,i0, 6) = 0.0;
521 outputValues(14,i0, 7) = -4.0;
522 outputValues(14,i0, 8) = 0.0;
523 outputValues(14,i0, 9) = 0.0;
524
525 }
526 break;
527
528 case OPERATOR_D4:
529 case OPERATOR_D5:
530 case OPERATOR_D6:
531 case OPERATOR_D7:
532 case OPERATOR_D8:
533 case OPERATOR_D9:
534 case OPERATOR_D10:
535 {
536 // outputValues is a rank-3 array with dimensions (basisCardinality_, dim0, DkCardinality)
537 int DkCardinality = Intrepid::getDkCardinality(operatorType,
538 this -> basisCellTopology_.getDimension() );
539 for(int dofOrd = 0; dofOrd < this -> basisCardinality_; dofOrd++) {
540 for (int i0 = 0; i0 < dim0; i0++) {
541 for(int dkOrd = 0; dkOrd < DkCardinality; dkOrd++){
542 outputValues(dofOrd, i0, dkOrd) = 0.0;
543 }
544 }
545 }
546 }
547 break;
548
549 default:
550 TEUCHOS_TEST_FOR_EXCEPTION( !( Intrepid::isValidOperator(operatorType) ), std::invalid_argument,
551 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): Invalid operator type");
552 }
553}
554
555
556
557template<class Scalar, class ArrayScalar>
559 const ArrayScalar & inputPoints,
560 const ArrayScalar & cellVertices,
561 const EOperator operatorType) const {
562 TEUCHOS_TEST_FOR_EXCEPTION( (true), std::logic_error,
563 ">>> ERROR (Basis_HGRAD_WEDGE_I2_FEM): FEM Basis calling an FVD member function");
564}
565}// namespace Intrepid
566#endif
int isValidOperator(const EOperator operatorType)
Verifies validity of an operator enum.
void setOrdinalTagData(std::vector< std::vector< std::vector< int > > > &tagToOrdinal, std::vector< std::vector< int > > &ordinalToTag, const int *tags, const int basisCard, const int tagSize, const int posScDim, const int posScOrd, const int posDfOrd)
Fills ordinalToTag_ and tagToOrdinal_ by basis-specific tag data.
int getDkCardinality(const EOperator operatorType, const int spaceDim)
Returns cardinality of Dk, i.e., the number of all derivatives of order k.
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
FEM basis evaluation on a reference Wedge cell.