1 #ifndef INTREPID_HGRAD_HEX_I2_FEMDEF_HPP
2 #define INTREPID_HGRAD_HEX_I2_FEMDEF_HPP
54 template<
class Scalar,
class ArrayScalar>
57 this -> basisCardinality_ = 20;
58 this -> basisDegree_ = 2;
59 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Hexahedron<8> >() );
60 this -> basisType_ = BASIS_FEM_DEFAULT;
61 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
62 this -> basisTagsAreSet_ =
false;
67 template<
class Scalar,
class ArrayScalar>
77 int tags[] = { 0, 0, 0, 1,
100 Intrepid::setOrdinalTagData(
this -> tagToOrdinal_,
101 this -> ordinalToTag_,
103 this -> basisCardinality_,
112 template<
class Scalar,
class ArrayScalar>
114 const ArrayScalar & inputPoints,
115 const EOperator operatorType)
const {
118 #ifdef HAVE_INTREPID_DEBUG
119 Intrepid::getValues_HGRAD_Args<Scalar, ArrayScalar>(outputValues,
122 this -> getBaseCellTopology(),
123 this -> getCardinality() );
127 int dim0 = inputPoints.dimension(0);
134 switch (operatorType) {
137 for (
int i0 = 0; i0 < dim0; i0++) {
138 x = inputPoints(i0, 0);
139 y = inputPoints(i0, 1);
140 z = inputPoints(i0, 2);
143 outputValues( 0, i0) = 0.125*(1.0 - x)*(1.0 - y)*(1.0 - z)*(-x - y - z - 2.0);
144 outputValues( 1, i0) = 0.125*(1.0 + x)*(1.0 - y)*(1.0 - z)*( x - y - z - 2.0);
145 outputValues( 2, i0) = 0.125*(1.0 + x)*(1.0 + y)*(1.0 - z)*( x + y - z - 2.0);
146 outputValues( 3, i0) = 0.125*(1.0 - x)*(1.0 + y)*(1.0 - z)*(-x + y - z - 2.0);
147 outputValues( 4, i0) = 0.125*(1.0 - x)*(1.0 - y)*(1.0 + z)*(-x - y + z - 2.0);
148 outputValues( 5, i0) = 0.125*(1.0 + x)*(1.0 - y)*(1.0 + z)*( x - y + z - 2.0);
149 outputValues( 6, i0) = 0.125*(1.0 + x)*(1.0 + y)*(1.0 + z)*( x + y + z - 2.0);
150 outputValues( 7, i0) = 0.125*(1.0 - x)*(1.0 + y)*(1.0 + z)*(-x + y + z - 2.0);
152 outputValues( 8, i0) = 0.25*(1.0 - x*x)*(1.0 - y)*(1.0 - z);
153 outputValues( 9, i0) = 0.25*(1.0 + x)*(1.0 - y*y)*(1.0 - z);
154 outputValues(10, i0) = 0.25*(1.0 - x*x)*(1.0 + y)*(1.0 - z);
155 outputValues(11, i0) = 0.25*(1.0 - x)*(1.0 - y*y)*(1.0 - z);
157 outputValues(12, i0) = 0.25*(1.0 - x)*(1.0 - y)*(1.0 - z*z);
158 outputValues(13, i0) = 0.25*(1.0 + x)*(1.0 - y)*(1.0 - z*z);
159 outputValues(14, i0) = 0.25*(1.0 + x)*(1.0 + y)*(1.0 - z*z);
160 outputValues(15, i0) = 0.25*(1.0 - x)*(1.0 + y)*(1.0 - z*z);
162 outputValues(16, i0) = 0.25*(1.0 - x*x)*(1.0 - y)*(1.0 + z);
163 outputValues(17, i0) = 0.25*(1.0 + x)*(1.0 - y*y)*(1.0 + z);
164 outputValues(18, i0) = 0.25*(1.0 - x*x)*(1.0 + y)*(1.0 + z);
165 outputValues(19, i0) = 0.25*(1.0 - x)*(1.0 - y*y)*(1.0 + z);
171 for (
int i0 = 0; i0 < dim0; i0++) {
172 x = inputPoints(i0,0);
173 y = inputPoints(i0,1);
174 z = inputPoints(i0,2);
177 outputValues(0, i0, 0) = -0.125*(1.0-y)*(1.0-z)*(-x-y-z-2.0) - 0.125*(1.0-x)*(1.0-y)*(1.0-z);
178 outputValues(0, i0, 1) = -0.125*(1.0-x)*(1.0-z)*(-x-y-z-2.0) - 0.125*(1.0-x)*(1.0-y)*(1.0-z);
179 outputValues(0, i0, 2) = -0.125*(1.0-x)*(1.0-y)*(-x-y-z-2.0) - 0.125*(1.0-x)*(1.0-y)*(1.0-z);
181 outputValues(1, i0, 0) = 0.125*(1.0-y)*(1.0-z)*( x-y-z-2.0) + 0.125*(1.0+x)*(1.0-y)*(1.0-z);
182 outputValues(1, i0, 1) = -0.125*(1.0+x)*(1.0-z)*( x-y-z-2.0) - 0.125*(1.0+x)*(1.0-y)*(1.0-z);
183 outputValues(1, i0, 2) = -0.125*(1.0+x)*(1.0-y)*( x-y-z-2.0) - 0.125*(1.0+x)*(1.0-y)*(1.0-z);
185 outputValues(2, i0, 0) = 0.125*(1.0+y)*(1.0-z)*( x+y-z-2.0) + 0.125*(1.0+x)*(1.0+y)*(1.0-z);
186 outputValues(2, i0, 1) = 0.125*(1.0+x)*(1.0-z)*( x+y-z-2.0) + 0.125*(1.0+x)*(1.0+y)*(1.0-z);
187 outputValues(2, i0, 2) = -0.125*(1.0+x)*(1.0+y)*( x+y-z-2.0) - 0.125*(1.0+x)*(1.0+y)*(1.0-z);
189 outputValues(3, i0, 0) = -0.125*(1.0+y)*(1.0-z)*(-x+y-z-2.0) - 0.125*(1.0-x)*(1.0+y)*(1.0-z);
190 outputValues(3, i0, 1) = 0.125*(1.0-x)*(1.0-z)*(-x+y-z-2.0) + 0.125*(1.0-x)*(1.0+y)*(1.0-z);
191 outputValues(3, i0, 2) = -0.125*(1.0-x)*(1.0+y)*(-x+y-z-2.0) - 0.125*(1.0-x)*(1.0+y)*(1.0-z);
193 outputValues(4, i0, 0) = -0.125*(1.0-y)*(1.0+z)*(-x-y+z-2.0) - 0.125*(1.0-x)*(1.0-y)*(1.0+z);
194 outputValues(4, i0, 1) = -0.125*(1.0-x)*(1.0+z)*(-x-y+z-2.0) - 0.125*(1.0-x)*(1.0-y)*(1.0+z);
195 outputValues(4, i0, 2) = 0.125*(1.0-x)*(1.0-y)*(-x-y+z-2.0) + 0.125*(1.0-x)*(1.0-y)*(1.0+z);
197 outputValues(5, i0, 0) = 0.125*(1.0-y)*(1.0+z)*( x-y+z-2.0) + 0.125*(1.0+x)*(1.0-y)*(1.0+z);
198 outputValues(5, i0, 1) = -0.125*(1.0+x)*(1.0+z)*( x-y+z-2.0) - 0.125*(1.0+x)*(1.0-y)*(1.0+z);
199 outputValues(5, i0, 2) = 0.125*(1.0+x)*(1.0-y)*( x-y+z-2.0) + 0.125*(1.0+x)*(1.0-y)*(1.0+z);
201 outputValues(6, i0, 0) = 0.125*(1.0+y)*(1.0+z)*( x+y+z-2.0) + 0.125*(1.0+x)*(1.0+y)*(1.0+z);
202 outputValues(6, i0, 1) = 0.125*(1.0+x)*(1.0+z)*( x+y+z-2.0) + 0.125*(1.0+x)*(1.0+y)*(1.0+z);
203 outputValues(6, i0, 2) = 0.125*(1.0+x)*(1.0+y)*( x+y+z-2.0) + 0.125*(1.0+x)*(1.0+y)*(1.0+z);
205 outputValues(7, i0, 0) = -0.125*(1.0+y)*(1.0+z)*(-x+y+z-2.0) - 0.125*(1.0-x)*(1.0+y)*(1.0+z);
206 outputValues(7, i0, 1) = 0.125*(1.0-x)*(1.0+z)*(-x+y+z-2.0) + 0.125*(1.0-x)*(1.0+y)*(1.0+z);
207 outputValues(7, i0, 2) = 0.125*(1.0-x)*(1.0+y)*(-x+y+z-2.0) + 0.125*(1.0-x)*(1.0+y)*(1.0+z);
209 outputValues(8, i0, 0) = -0.5*x*(1.0-y)*(1.0-z);
210 outputValues(8, i0, 1) = -0.25*(1.0-x*x)*(1.0-z);
211 outputValues(8, i0, 2) = -0.25*(1.0-x*x)*(1.0-y);
213 outputValues(9, i0, 0) = 0.25*(1.0-y*y)*(1.0-z);
214 outputValues(9, i0, 1) = -0.5*y*(1.0+x)*(1.0-z);
215 outputValues(9, i0, 2) = -0.25*(1.0+x)*(1.0-y*y);
217 outputValues(10, i0, 0) = -0.5*x*(1.0+y)*(1.0-z);
218 outputValues(10, i0, 1) = 0.25*(1.0-x*x)*(1.0-z);
219 outputValues(10, i0, 2) = -0.25*(1.0-x*x)*(1.0+y);
221 outputValues(11, i0, 0) = -0.25*(1.0-y*y)*(1.0-z);
222 outputValues(11, i0, 1) = -0.5*y*(1.0-x)*(1.0-z);
223 outputValues(11, i0, 2) = -0.25*(1.0-x)*(1.0-y*y);
225 outputValues(12, i0, 0) = -0.25*(1.0-y)*(1.0-z*z);
226 outputValues(12, i0, 1) = -0.25*(1.0-x)*(1.0-z*z);
227 outputValues(12, i0, 2) = -0.5*z*(1.0-x)*(1.0-y);
229 outputValues(13, i0, 0) = 0.25*(1.0-y)*(1.0-z*z);
230 outputValues(13, i0, 1) = -0.25*(1.0+x)*(1.0-z*z);
231 outputValues(13, i0, 2) = -0.5*z*(1.0+x)*(1.0-y);
233 outputValues(14, i0, 0) = 0.25*(1.0+y)*(1.0-z*z);
234 outputValues(14, i0, 1) = 0.25*(1.0+x)*(1.0-z*z);
235 outputValues(14, i0, 2) = -0.5*z*(1.0+x)*(1.0+y);
237 outputValues(15, i0, 0) = -0.25*(1.0+y)*(1.0-z*z);
238 outputValues(15, i0, 1) = 0.25*(1.0-x)*(1.0-z*z);
239 outputValues(15, i0, 2) = -0.5*z*(1.0-x)*(1.0+y);
241 outputValues(16, i0, 0) = -0.5*x*(1.0-y)*(1.0+z);
242 outputValues(16, i0, 1) = -0.25*(1.0-x*x)*(1.0+z);
243 outputValues(16, i0, 2) = 0.25*(1.0-x*x)*(1.0-y);
245 outputValues(17, i0, 0) = 0.25*(1.0-y*y)*(1.0+z);
246 outputValues(17, i0, 1) = -0.5*y*(1.0+x)*(1.0+z);
247 outputValues(17, i0, 2) = 0.25*(1.0+x)*(1.0-y*y);
249 outputValues(18, i0, 0) = -0.5*x*(1.0+y)*(1.0+z);
250 outputValues(18, i0, 1) = 0.25*(1.0-x*x)*(1.0+z);
251 outputValues(18, i0, 2) = 0.25*(1.0-x*x)*(1.0+y);
253 outputValues(19, i0, 0) = -0.25*(1.0-y*y)*(1.0+z);
254 outputValues(19, i0, 1) = -0.5*y*(1.0-x)*(1.0+z);
255 outputValues(19, i0, 2) = 0.25*(1.0-x)*(1.0-y*y);
261 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_CURL), std::invalid_argument,
262 ">>> ERROR (Basis_HGRAD_HEX_I2_FEM): CURL is invalid operator for rank-0 (scalar) functions in 3D");
266 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
267 ">>> ERROR (Basis_HGRAD_HEX_I2_FEM): DIV is invalid operator for rank-0 (scalar) functions in 3D");
271 for (
int i0 = 0; i0 < dim0; i0++) {
272 x = inputPoints(i0,0);
273 y = inputPoints(i0,1);
274 z = inputPoints(i0,2);
277 outputValues(0, i0, 0) = 0.25*(1.0 - y)*(1.0 - z);
278 outputValues(0, i0, 1) = 0.125*(1.0 - z)*(-2.0*x - 2.0*y - z);
279 outputValues(0, i0, 2) = 0.125*(1.0 - y)*(-2.0*x - y - 2.0*z);
280 outputValues(0, i0, 3) = 0.25*(1.0 - x)*(1.0 - z);
281 outputValues(0, i0, 4) = 0.125*(1.0 - x)*(-x - 2.0*y - 2.0*z);
282 outputValues(0, i0, 5) = 0.25*(1.0 - x)*(1.0 - y);
284 outputValues(1, i0, 0) = 0.25*(1.0 - y)*(1.0 - z);
285 outputValues(1, i0, 1) = -0.125*(1.0 - z)*(2.0*x - 2.0*y - z);
286 outputValues(1, i0, 2) = -0.125*(1.0 - y)*(2.0*x - y - 2.0*z);
287 outputValues(1, i0, 3) = 0.25*(1.0 + x)*(1.0 - z);
288 outputValues(1, i0, 4) = 0.125*(1.0 + x)*(x - 2.0*y - 2.0*z);
289 outputValues(1, i0, 5) = 0.25*(1.0 + x)*(1.0 - y);
291 outputValues(2, i0, 0) = 0.25*(1.0 + y)*(1.0 - z);
292 outputValues(2, i0, 1) = 0.125*(1.0 - z)*(2.0*x + 2.0*y - z);
293 outputValues(2, i0, 2) = -0.125*(1.0 + y)*(2.0*x + y - 2.0*z);
294 outputValues(2, i0, 3) = 0.25*(1.0 + x)*(1.0 - z);
295 outputValues(2, i0, 4) = -0.125*(1.0 + x)*(x + 2.0*y - 2.0*z);
296 outputValues(2, i0, 5) = 0.25*(1.0 + x)*(1.0 + y);
298 outputValues(3, i0, 0) = 0.25*(1.0 + y)*(1.0 - z);
299 outputValues(3, i0, 1) = -0.125*(1.0 - z)*(-2.0*x + 2.0*y - z);
300 outputValues(3, i0, 2) = 0.125*(1.0 + y)*(-2.0*x + y - 2.0*z);
301 outputValues(3, i0, 3) = 0.25*(1.0 - x)*(1.0 - z);
302 outputValues(3, i0, 4) = -0.125*(1.0 - x)*(-x + 2.0*y - 2.0*z);
303 outputValues(3, i0, 5) = 0.25*(1.0 - x)*(1.0 + y);
305 outputValues(4, i0, 0) = 0.25*(1.0 - y)*(1.0 + z);
306 outputValues(4, i0, 1) = 0.125*(1.0 + z)*(-2.0*x - 2.0*y + z);
307 outputValues(4, i0, 2) = -0.125*(1.0 - y)*(-2.0*x - y + 2.0*z);
308 outputValues(4, i0, 3) = 0.25*(1.0 - x)*(1.0 + z);
309 outputValues(4, i0, 4) = -0.125*(1.0 - x)*(-x - 2.0*y + 2.0*z);
310 outputValues(4, i0, 5) = 0.25*(1.0 - x)*(1.0 - y);
312 outputValues(5, i0, 0) = 0.25*(1.0 - y)*(1.0 + z);
313 outputValues(5, i0, 1) = -0.125*(1.0 + z)*(2.0*x - 2.0*y + z);
314 outputValues(5, i0, 2) = 0.125*(1.0 - y)*(2.0*x - y + 2.0*z);
315 outputValues(5, i0, 3) = 0.25*(1.0 + x)*(1.0 + z);
316 outputValues(5, i0, 4) = -0.125*(1.0 + x)*(x - 2.0*y + 2.0*z);
317 outputValues(5, i0, 5) = 0.25*(1.0 + x)*(1.0 - y);
319 outputValues(6, i0, 0) = 0.25*(1.0 + y)*(1.0 + z);
320 outputValues(6, i0, 1) = 0.125*(1.0 + z)*(2.0*x + 2.0*y + z);
321 outputValues(6, i0, 2) = 0.125*(1.0 + y)*(2.0*x + y + 2.0*z);
322 outputValues(6, i0, 3) = 0.25*(1.0 + x)*(1.0 + z);
323 outputValues(6, i0, 4) = 0.125*(1.0 + x)*(x + 2.0*y + 2.0*z);
324 outputValues(6, i0, 5) = 0.25*(1.0 + x)*(1.0 + y);
326 outputValues(7, i0, 0) = 0.25*(1.0 + y)*(1.0 + z);
327 outputValues(7, i0, 1) = -0.125*(1.0 + z)*(-2.0*x + 2.0*y + z);
328 outputValues(7, i0, 2) = -0.125*(1.0 + y)*(-2.0*x + y + 2.0*z);
329 outputValues(7, i0, 3) = 0.25*(1.0 - x)*(1.0 + z);
330 outputValues(7, i0, 4) = 0.125*(1.0 - x)*(-x + 2.0*y + 2.0*z);
331 outputValues(7, i0, 5) = 0.25*(1.0 - x)*(1.0 + y);
333 outputValues(8, i0, 0) = -0.5*(1.0 - y)*(1.0 - z);
334 outputValues(8, i0, 1) = 0.5*x*(1.0 - z);
335 outputValues(8, i0, 2) = 0.5*x*(1.0 - y);
336 outputValues(8, i0, 3) = 0.0;
337 outputValues(8, i0, 4) = 0.25*(1.0 - x*x);
338 outputValues(8, i0, 5) = 0.0;
340 outputValues(9, i0, 0) = 0.0;
341 outputValues(9, i0, 1) = -0.5*y*(1.0 - z);
342 outputValues(9, i0, 2) = -0.25*(1.0 - y*y);
343 outputValues(9, i0, 3) = -0.5*(1.0 + x)*(1.0 - z);
344 outputValues(9, i0, 4) = 0.5*y*(1.0 + x);
345 outputValues(9, i0, 5) = 0.0;
347 outputValues(10, i0, 0) = -0.5*(1.0 + y)*(1.0 - z);
348 outputValues(10, i0, 1) = -0.5*x*(1.0 - z);
349 outputValues(10, i0, 2) = 0.5*x*(1.0 + y);
350 outputValues(10, i0, 3) = 0.0;
351 outputValues(10, i0, 4) = -0.25*(1.0 - x*x);
352 outputValues(10, i0, 5) = 0.0;
354 outputValues(11, i0, 0) = 0.0;
355 outputValues(11, i0, 1) = 0.5*y*(1.0 - z);
356 outputValues(11, i0, 2) = 0.25*(1.0 - y*y);
357 outputValues(11, i0, 3) = -0.5*(1.0 - x)*(1.0 - z);
358 outputValues(11, i0, 4) = 0.5*y*(1.0 - x);
359 outputValues(11, i0, 5) = 0.0;
361 outputValues(12, i0, 0) = 0.0;
362 outputValues(12, i0, 1) = 0.25*(1.0 - z*z);
363 outputValues(12, i0, 2) = 0.5*z*(1.0 - y);
364 outputValues(12, i0, 3) = 0.0;
365 outputValues(12, i0, 4) = 0.5*z*(1.0 - x);
366 outputValues(12, i0, 5) = -0.5*(1.0 - x)*(1.0 - y);
368 outputValues(13, i0, 0) = 0.0;
369 outputValues(13, i0, 1) = -0.25*(1.0 - z*z);
370 outputValues(13, i0, 2) = -0.5*z*(1.0 - y);
371 outputValues(13, i0, 3) = 0.0;
372 outputValues(13, i0, 4) = 0.5*z*(1.0 + x);
373 outputValues(13, i0, 5) = -0.5*(1.0 + x)*(1.0 - y);
375 outputValues(14, i0, 0) = 0.0;
376 outputValues(14, i0, 1) = 0.25*(1.0 - z*z);
377 outputValues(14, i0, 2) = -0.5*z*(1.0 + y);
378 outputValues(14, i0, 3) = 0.0;
379 outputValues(14, i0, 4) = -0.5*z*(1.0 + x);
380 outputValues(14, i0, 5) = -0.5*(1.0 + x)*(1.0 + y);
382 outputValues(15, i0, 0) = 0.0;
383 outputValues(15, i0, 1) = -0.25*(1.0 - z*z);
384 outputValues(15, i0, 2) = 0.5*z*(1.0 + y);
385 outputValues(15, i0, 3) = 0.0;
386 outputValues(15, i0, 4) = -0.5*z*(1.0 - x);
387 outputValues(14, i0, 5) = -0.5*(1.0 - x)*(1.0 + y);
389 outputValues(16, i0, 0) = -0.5*(1.0 - y)*(1.0 + z);
390 outputValues(16, i0, 1) = 0.5*x*(1.0 + z);
391 outputValues(16, i0, 2) = -0.5*x*(1.0 - y);
392 outputValues(16, i0, 3) = 0.0;
393 outputValues(16, i0, 4) = -0.25*(1.0 - x*x);
394 outputValues(16, i0, 5) = 0.0;
396 outputValues(17, i0, 0) = 0.0;
397 outputValues(17, i0, 1) = -0.5*y*(1.0 + z);
398 outputValues(17, i0, 2) = 0.25*(1.0 - y*y);
399 outputValues(17, i0, 3) = -0.5*(1.0 + x)*(1.0 + z);
400 outputValues(17, i0, 4) = -0.5*y*(1.0 + x);
401 outputValues(17, i0, 5) = 0.0;
403 outputValues(18, i0, 0) = -0.5*(1.0 + y)*(1.0 + z);
404 outputValues(18, i0, 1) = -0.5*x*(1.0 + z);
405 outputValues(18, i0, 2) = -0.5*x*(1.0 + y);
406 outputValues(18, i0, 3) = 0.0;
407 outputValues(18, i0, 4) = 0.25*(1.0 - x*x);
408 outputValues(18, i0, 5) = 0.0;
410 outputValues(19, i0, 0) = 0.0;
411 outputValues(19, i0, 1) = 0.5*y*(1.0 + z);
412 outputValues(19, i0, 2) = -0.25*(1.0 - y*y);
413 outputValues(19, i0, 3) = -0.5*(1.0 - x)*(1.0 + z);
414 outputValues(19, i0, 4) = -0.5*y*(1.0 - x);
415 outputValues(19, i0, 5) = 0.0;
421 for (
int i0 = 0; i0 < dim0; i0++) {
422 x = inputPoints(i0,0);
423 y = inputPoints(i0,1);
424 z = inputPoints(i0,2);
426 outputValues(0,i0, 0) = 0.0;
427 outputValues(0,i0, 1) = -0.25*(1.0 - z);
428 outputValues(0,i0, 2) = -0.25*(1.0 - y);
429 outputValues(0,i0, 3) = -0.25*(1.0 - z);
430 outputValues(0,i0, 4) = -0.125*(-2.0*x - 2.0*y - 2.0*z + 1.0);
431 outputValues(0,i0, 5) = -0.25*(1.0 - y);
432 outputValues(0,i0, 6) = 0.0;
433 outputValues(0,i0, 7) = -0.25*(1.0 - x);
434 outputValues(0,i0, 8) = -0.25*(1.0 - x);
435 outputValues(0,i0, 9) = 0.0;
437 outputValues(1,i0, 0) = 0.0;
438 outputValues(1,i0, 1) = -0.25*(1.0 - z);
439 outputValues(1,i0, 2) = -0.25*(1.0 - y);
440 outputValues(1,i0, 3) = 0.25*(1.0 - z);
441 outputValues(1,i0, 4) = 0.125*(2.0*x - 2.0*y - 2.0*z + 1.0);
442 outputValues(1,i0, 5) = 0.25*(1.0 - y);
443 outputValues(1,i0, 6) = 0.0;
444 outputValues(1,i0, 7) = -0.25*(1.0 + x);
445 outputValues(1,i0, 8) = -0.25*(1.0 + x);
446 outputValues(1,i0, 9) = 0.0;
448 outputValues(2,i0, 0) = 0.0;
449 outputValues(2,i0, 1) = 0.25*(1.0 - z);
450 outputValues(2,i0, 2) = -0.25*(1.0 + y);
451 outputValues(2,i0, 3) = 0.25*(1.0 - z);
452 outputValues(2,i0, 4) = -0.125*(2.0*x + 2.0*y - 2.0*z + 1.0);
453 outputValues(2,i0, 5) = 0.25*(1.0 + y);
454 outputValues(2,i0, 6) = 0.0;
455 outputValues(2,i0, 7) = -0.25*(1.0 + x);
456 outputValues(2,i0, 8) = 0.25*(1.0 + x);
457 outputValues(2,i0, 9) = 0.0;
459 outputValues(3,i0, 0) = 0.0;
460 outputValues(3,i0, 1) = 0.25*(1.0 - z);
461 outputValues(3,i0, 2) = -0.25*(1.0 + y);
462 outputValues(3,i0, 3) = -0.25*(1.0 - z);
463 outputValues(3,i0, 4) = 0.125*(-2.0*x + 2.0*y - 2.0*z + 1.0);
464 outputValues(3,i0, 5) = -0.25*(1.0 + y);
465 outputValues(3,i0, 6) = 0.0;
466 outputValues(3,i0, 7) = -0.25*(1.0 - x);
467 outputValues(3,i0, 8) = 0.25*(1.0 - x);
468 outputValues(3,i0, 9) = 0.0;
470 outputValues(4,i0, 0) = 0.0;
471 outputValues(4,i0, 1) = -0.25*(1.0 + z);
472 outputValues(4,i0, 2) = 0.25*(1.0 - y);
473 outputValues(4,i0, 3) = -0.25*(1.0 + z);
474 outputValues(4,i0, 4) = 0.125*(-2.0*x - 2.0*y + 2.0*z + 1.0);
475 outputValues(4,i0, 5) = -0.25*(1.0 - y);
476 outputValues(4,i0, 6) = 0.0;
477 outputValues(4,i0, 7) = 0.25*(1.0 - x);
478 outputValues(4,i0, 8) = -0.25*(1.0 - x);
479 outputValues(4,i0, 9) = 0.0;
481 outputValues(5,i0, 0) = 0.0;
482 outputValues(5,i0, 1) = -0.25*(1.0 + z);
483 outputValues(5,i0, 2) = 0.25*(1.0 - y);
484 outputValues(5,i0, 3) = 0.25*(1.0 + z);
485 outputValues(5,i0, 4) = -0.125*(2.0*x - 2.0*y + 2.0*z + 1.0);
486 outputValues(5,i0, 5) = 0.25*(1.0 - y);
487 outputValues(5,i0, 6) = 0.0;
488 outputValues(5,i0, 7) = 0.25*(1.0 + x);
489 outputValues(5,i0, 8) = -0.25*(1.0 + x);
490 outputValues(5,i0, 9) = 0.0;
492 outputValues(6,i0, 0) = 0.0;
493 outputValues(6,i0, 1) = 0.25*(1.0 + z);
494 outputValues(6,i0, 2) = 0.25*(1.0 + y);
495 outputValues(6,i0, 3) = 0.25*(1.0 + z);
496 outputValues(6,i0, 4) = 0.125*(2.0*x + 2.0*y + 2.0*z + 1.0);
497 outputValues(6,i0, 5) = 0.25*(1.0 + y);
498 outputValues(6,i0, 6) = 0.0;
499 outputValues(6,i0, 7) = 0.25*(1.0 + x);
500 outputValues(6,i0, 8) = 0.25*(1.0 + x);
501 outputValues(6,i0, 9) = 0.0;
503 outputValues(7,i0, 0) = 0.0;
504 outputValues(7,i0, 1) = 0.25*(1.0 + z);
505 outputValues(7,i0, 2) = 0.25*(1.0 + y);
506 outputValues(7,i0, 3) = -0.25*(1.0 + z);
507 outputValues(7,i0, 4) = -0.125*(-2.0*x + 2.0*y + 2.0*z + 1.0);
508 outputValues(7,i0, 5) = -0.25*(1.0 + y);
509 outputValues(7,i0, 6) = 0.0;
510 outputValues(7,i0, 7) = 0.25*(1.0 - x);
511 outputValues(7,i0, 8) = 0.25*(1.0 - x);
512 outputValues(7,i0, 9) = 0.0;
514 outputValues(8,i0, 0) = 0.0;
515 outputValues(8,i0, 1) = 0.5*(1.0 - z);
516 outputValues(8,i0, 2) = 0.5*(1.0 - y);
517 outputValues(8,i0, 3) = 0.0;
518 outputValues(8,i0, 4) = -0.5*x;
519 outputValues(8,i0, 5) = 0.0;
520 outputValues(8,i0, 6) = 0.0;
521 outputValues(8,i0, 7) = 0.0;
522 outputValues(8,i0, 8) = 0.0;
523 outputValues(8,i0, 9) = 0.0;
525 outputValues(9,i0, 0) = 0.0;
526 outputValues(9,i0, 1) = 0.0;
527 outputValues(9,i0, 2) = 0.0;
528 outputValues(9,i0, 3) = -0.5*(1.0 - z);
529 outputValues(9,i0, 4) = 0.5*y;
530 outputValues(9,i0, 5) = 0.0;
531 outputValues(9,i0, 6) = 0.0;
532 outputValues(9,i0, 7) = 0.5*(1.0 + x);
533 outputValues(9,i0, 8) = 0.0;
534 outputValues(9,i0, 9) = 0.0;
536 outputValues(10,i0, 0) = 0.0;
537 outputValues(10,i0, 1) = -0.5*(1.0 - z);
538 outputValues(10,i0, 2) = 0.5*(1.0 + y);
539 outputValues(10,i0, 3) = 0.0;
540 outputValues(10,i0, 4) = 0.5*x;
541 outputValues(10,i0, 5) = 0.0;
542 outputValues(10,i0, 6) = 0.0;
543 outputValues(10,i0, 7) = 0.0;
544 outputValues(10,i0, 8) = 0.0;
545 outputValues(10,i0, 9) = 0.0;
547 outputValues(11,i0, 0) = 0.0;
548 outputValues(11,i0, 1) = 0.0;
549 outputValues(11,i0, 2) = 0.0;
550 outputValues(11,i0, 3) = 0.5*(1.0 - z);
551 outputValues(11,i0, 4) = -0.5*y;
552 outputValues(11,i0, 5) = 0.0;
553 outputValues(11,i0, 6) = 0.0;
554 outputValues(11,i0, 7) = 0.5*(1.0 - x);
555 outputValues(11,i0, 8) = 0.0;
556 outputValues(11,i0, 9) = 0.0;
558 outputValues(12,i0, 0) = 0.0;
559 outputValues(12,i0, 1) = 0.0;
560 outputValues(12,i0, 2) = 0.0;
561 outputValues(12,i0, 3) = 0.0;
562 outputValues(12,i0, 4) = -0.5*z;
563 outputValues(12,i0, 5) = 0.5*(1.0 - y);
564 outputValues(12,i0, 6) = 0.0;
565 outputValues(12,i0, 7) = 0.0;
566 outputValues(12,i0, 8) = 0.5*(1.0 - x);
567 outputValues(12,i0, 9) = 0.0;
569 outputValues(13,i0, 0) = 0.0;
570 outputValues(13,i0, 1) = 0.0;
571 outputValues(13,i0, 2) = 0.0;
572 outputValues(13,i0, 3) = 0.0;
573 outputValues(13,i0, 4) = 0.5*z;
574 outputValues(13,i0, 5) = -0.5*(1.0 - y);
575 outputValues(13,i0, 6) = 0.0;
576 outputValues(13,i0, 7) = 0.0;
577 outputValues(13,i0, 8) = 0.5*(1.0 + x);
578 outputValues(13,i0, 9) = 0.0;
580 outputValues(14,i0, 0) = 0.0;
581 outputValues(14,i0, 1) = 0.0;
582 outputValues(14,i0, 2) = 0.0;
583 outputValues(14,i0, 3) = 0.0;
584 outputValues(14,i0, 4) = -0.5*z;
585 outputValues(14,i0, 5) = -0.5*(1.0 + y);
586 outputValues(14,i0, 6) = 0.0;
587 outputValues(14,i0, 7) = 0.0;
588 outputValues(14,i0, 8) = -0.5*(1.0 + x);
589 outputValues(14,i0, 9) = 0.0;
591 outputValues(15,i0, 0) = 0.0;
592 outputValues(15,i0, 1) = 0.0;
593 outputValues(15,i0, 2) = 0.0;
594 outputValues(15,i0, 3) = 0.0;
595 outputValues(15,i0, 4) = 0.5*z;
596 outputValues(15,i0, 5) = 0.5*(1.0 + y);
597 outputValues(15,i0, 6) = 0.0;
598 outputValues(15,i0, 7) = 0.0;
599 outputValues(15,i0, 8) = -0.5*(1.0 - x);
600 outputValues(15,i0, 9) = 0.0;
602 outputValues(16,i0, 0) = 0.0;
603 outputValues(16,i0, 1) = 0.5*(1.0 + z);
604 outputValues(16,i0, 2) = -0.5*(1.0 - y);
605 outputValues(16,i0, 3) = 0.0;
606 outputValues(16,i0, 4) = 0.5*x;
607 outputValues(16,i0, 5) = 0.0;
608 outputValues(16,i0, 6) = 0.0;
609 outputValues(16,i0, 7) = 0.0;
610 outputValues(16,i0, 8) = 0.0;
611 outputValues(16,i0, 9) = 0.0;
613 outputValues(17,i0, 0) = 0.0;
614 outputValues(17,i0, 1) = 0.0;
615 outputValues(17,i0, 2) = 0.0;
616 outputValues(17,i0, 3) = -0.5*(1.0 + z);
617 outputValues(17,i0, 4) = -0.5*y;
618 outputValues(17,i0, 5) = 0.0;
619 outputValues(17,i0, 6) = 0.0;
620 outputValues(17,i0, 7) = -0.5*(1.0 + x);
621 outputValues(17,i0, 8) = 0.0;
622 outputValues(17,i0, 9) = 0.0;
624 outputValues(18,i0, 0) = 0.0;
625 outputValues(18,i0, 1) = -0.5*(1.0 + z);
626 outputValues(18,i0, 2) = -0.5*(1.0 + y);
627 outputValues(18,i0, 3) = 0.0;
628 outputValues(18,i0, 4) = -0.5*x;
629 outputValues(18,i0, 5) = 0.0;
630 outputValues(18,i0, 6) = 0.0;
631 outputValues(18,i0, 7) = 0.0;
632 outputValues(18,i0, 8) = 0.0;
633 outputValues(18,i0, 9) = 0.0;
635 outputValues(19,i0, 0) = 0.0;
636 outputValues(19,i0, 1) = 0.0;
637 outputValues(19,i0, 2) = 0.0;
638 outputValues(19,i0, 3) = 0.5*(1.0 + z);
639 outputValues(19,i0, 4) = 0.5*y;
640 outputValues(19,i0, 5) = 0.0;
641 outputValues(19,i0, 6) = 0.0;
642 outputValues(19,i0, 7) = -0.5*(1.0 - x);
643 outputValues(19,i0, 8) = 0.0;
644 outputValues(19,i0, 9) = 0.0;
652 int DkCardinality = Intrepid::getDkCardinality(operatorType,
this -> basisCellTopology_.getDimension() );
653 for(
int dofOrd = 0; dofOrd <
this -> basisCardinality_; dofOrd++) {
654 for (
int i0 = 0; i0 < dim0; i0++) {
655 for(
int dkOrd = 0; dkOrd < DkCardinality; dkOrd++){
656 outputValues(dofOrd, i0, dkOrd) = 0.0;
661 for (
int i0 = 0; i0 < dim0; i0++) {
662 x = inputPoints(i0,0);
663 y = inputPoints(i0,1);
664 z = inputPoints(i0,2);
666 outputValues( 0, i0, 4) = 0.25;
667 outputValues( 0, i0, 7) = 0.25;
668 outputValues( 0, i0, 8) = 0.25;
670 outputValues( 1, i0, 4) = 0.25;
671 outputValues( 1, i0, 7) = -0.25;
672 outputValues( 1, i0, 8) = -0.25;
674 outputValues( 2, i0, 4) = -0.25;
675 outputValues( 2, i0, 7) = -0.25;
676 outputValues( 2, i0, 8) = 0.25;
678 outputValues( 3, i0, 4) = -0.25;
679 outputValues( 3, i0, 7) = 0.25;
680 outputValues( 3, i0, 8) = -0.25;
682 outputValues( 4, i0, 4) = -0.25;
683 outputValues( 4, i0, 7) = -0.25;
684 outputValues( 4, i0, 8) = 0.25;
686 outputValues( 5, i0, 4) = -0.25;
687 outputValues( 5, i0, 7) = 0.25;
688 outputValues( 5, i0, 8) = -0.25;
690 outputValues( 6, i0, 4) = 0.25;
691 outputValues( 6, i0, 7) = 0.25;
692 outputValues( 6, i0, 8) = 0.25;
694 outputValues( 7, i0, 4) = 0.25;
695 outputValues( 7, i0, 7) = -0.25;
696 outputValues( 7, i0, 8) = -0.25;
698 outputValues( 8, i0, 4) = -0.5;
699 outputValues( 9, i0, 7) = 0.5;
700 outputValues(10, i0, 4) = 0.5;
701 outputValues(11, i0, 7) = -0.5;
702 outputValues(12, i0, 8) = -0.5;
703 outputValues(13, i0, 8) = 0.5;
704 outputValues(14, i0, 8) = -0.5;
705 outputValues(15, i0, 8) = 0.5;
706 outputValues(16, i0, 4) = 0.5;
707 outputValues(17, i0, 7) = -0.5;
708 outputValues(18, i0, 4) = -0.5;
709 outputValues(19, i0, 7) = 0.5;
722 int DkCardinality = Intrepid::getDkCardinality(operatorType,
723 this -> basisCellTopology_.getDimension() );
724 for(
int dofOrd = 0; dofOrd <
this -> basisCardinality_; dofOrd++) {
725 for (
int i0 = 0; i0 < dim0; i0++) {
726 for(
int dkOrd = 0; dkOrd < DkCardinality; dkOrd++){
727 outputValues(dofOrd, i0, dkOrd) = 0.0;
735 TEUCHOS_TEST_FOR_EXCEPTION( !( Intrepid::isValidOperator(operatorType) ), std::invalid_argument,
736 ">>> ERROR (Basis_HGRAD_HEX_I2_FEM): Invalid operator type");
742 template<
class Scalar,
class ArrayScalar>
744 const ArrayScalar & inputPoints,
745 const ArrayScalar & cellVertices,
746 const EOperator operatorType)
const {
747 TEUCHOS_TEST_FOR_EXCEPTION( (
true), std::logic_error,
748 ">>> ERROR (Basis_HGRAD_HEX_I2_FEM): FEM Basis calling an FVD member function");
751 template<
class Scalar,
class ArrayScalar>
753 #ifdef HAVE_INTREPID_DEBUG
755 TEUCHOS_TEST_FOR_EXCEPTION( !(DofCoords.rank() == 2), std::invalid_argument,
756 ">>> ERROR: (Intrepid::Basis_HGRAD_HEX_I2_FEM::getDofCoords) rank = 2 required for DofCoords array");
758 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(0) ==
this -> basisCardinality_ ), std::invalid_argument,
759 ">>> ERROR: (Intrepid::Basis_HGRAD_HEX_I2_FEM::getDofCoords) mismatch in number of DoF and 0th dimension of DofCoords array");
761 TEUCHOS_TEST_FOR_EXCEPTION( !( DofCoords.dimension(1) == (int)(
this -> basisCellTopology_.getDimension()) ), std::invalid_argument,
762 ">>> ERROR: (Intrepid::Basis_HGRAD_HEX_I2_FEM::getDofCoords) incorrect reference cell (1st) dimension in DofCoords array");
765 DofCoords(0,0) = -1.0; DofCoords(0,1) = -1.0; DofCoords(0,2) = -1.0;
766 DofCoords(1,0) = 1.0; DofCoords(1,1) = -1.0; DofCoords(1,2) = -1.0;
767 DofCoords(2,0) = 1.0; DofCoords(2,1) = 1.0; DofCoords(2,2) = -1.0;
768 DofCoords(3,0) = -1.0; DofCoords(3,1) = 1.0; DofCoords(3,2) = -1.0;
769 DofCoords(4,0) = -1.0; DofCoords(4,1) = -1.0; DofCoords(4,2) = 1.0;
770 DofCoords(5,0) = 1.0; DofCoords(5,1) = -1.0; DofCoords(5,2) = 1.0;
771 DofCoords(6,0) = 1.0; DofCoords(6,1) = 1.0; DofCoords(6,2) = 1.0;
772 DofCoords(7,0) = -1.0; DofCoords(7,1) = 1.0; DofCoords(7,2) = 1.0;
774 DofCoords(8,0) = 0.0; DofCoords(8,1) = -1.0; DofCoords(8,2) = -1.0;
775 DofCoords(9,0) = 1.0; DofCoords(9,1) = 0.0; DofCoords(9,2) = -1.0;
776 DofCoords(10,0) = 0.0; DofCoords(10,1) = 1.0; DofCoords(10,2) = -1.0;
777 DofCoords(11,0) = -1.0; DofCoords(11,1) = 0.0; DofCoords(11,2) = -1.0;
778 DofCoords(12,0) = -1.0; DofCoords(12,1) = -1.0; DofCoords(12,2) = 0.0;
779 DofCoords(13,0) = 1.0; DofCoords(13,1) = -1.0; DofCoords(13,2) = 0.0;
780 DofCoords(14,0) = 1.0; DofCoords(14,1) = 1.0; DofCoords(14,2) = 0.0;
781 DofCoords(15,0) = -1.0; DofCoords(15,1) = 1.0; DofCoords(15,2) = 0.0;
782 DofCoords(16,0) = 0.0; DofCoords(16,1) = -1.0; DofCoords(16,2) = 1.0;
783 DofCoords(17,0) = 1.0; DofCoords(17,1) = 0.0; DofCoords(17,2) = 1.0;
784 DofCoords(18,0) = 0.0; DofCoords(18,1) = 1.0; DofCoords(18,2) = 1.0;
785 DofCoords(19,0) = -1.0; DofCoords(19,1) = 0.0; DofCoords(19,2) = 1.0;
791 #if defined(Intrepid_SHOW_DEPRECATED_WARNINGS)
793 #warning "The Intrepid package is deprecated"
void initializeTags()
Initializes tagToOrdinal_ and ordinalToTag_ lookup arrays.
void getDofCoords(ArrayScalar &DofCoords) const
Returns spatial locations (coordinates) of degrees of freedom on a reference Quadrilateral.
void getValues(ArrayScalar &outputValues, const ArrayScalar &inputPoints, const EOperator operatorType) const
Evaluation of a FEM basis on a reference Hexahedron cell.
Basis_HGRAD_HEX_I2_FEM()
Constructor.