54 const Real eta = p(1);
56 libmesh_assert_less (i, 4);
59 static const unsigned int i0[] = {0, 1, 1, 0};
60 static const unsigned int i1[] = {0, 0, 1, 1};
70 const Real zeta1 = p(0);
71 const Real zeta2 = p(1);
72 const Real zeta0 = 1. - zeta1 - zeta2;
74 libmesh_assert_less (i, 3);
88 libmesh_error_msg(
"Invalid shape function index i = " << i);
93 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
106 const Real xi = p(0);
107 const Real eta = p(1);
109 libmesh_assert_less (i, 8);
114 return .25*(1. - xi)*(1. - eta)*(-1. - xi - eta);
117 return .25*(1. + xi)*(1. - eta)*(-1. + xi - eta);
120 return .25*(1. + xi)*(1. + eta)*(-1. + xi + eta);
123 return .25*(1. - xi)*(1. + eta)*(-1. - xi + eta);
126 return .5*(1. - xi*xi)*(1. - eta);
129 return .5*(1. + xi)*(1. - eta*eta);
132 return .5*(1. - xi*xi)*(1. + eta);
135 return .5*(1. - xi)*(1. - eta*eta);
138 libmesh_error_msg(
"Invalid shape function index i = " << i);
145 const Real xi = p(0);
146 const Real eta = p(1);
148 libmesh_assert_less (i, 9);
151 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
152 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
160 const Real zeta1 = p(0);
161 const Real zeta2 = p(1);
162 const Real zeta0 = 1. - zeta1 - zeta2;
164 libmesh_assert_less (i, 6);
169 return 2.*zeta0*(zeta0-0.5);
172 return 2.*zeta1*(zeta1-0.5);
175 return 2.*zeta2*(zeta2-0.5);
178 return 4.*zeta0*zeta1;
181 return 4.*zeta1*zeta2;
184 return 4.*zeta2*zeta0;
187 libmesh_error_msg(
"Invalid shape function index i = " << i);
192 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
200 libmesh_error_msg(
"ERROR: Unsupported 2D FE order: " << order);
202 #else // LIBMESH_DIM > 1 212 const unsigned int i,
215 libmesh_assert(elem);
226 const unsigned int i,
227 const unsigned int j,
233 libmesh_assert_less (j, 2);
249 const Real xi = p(0);
250 const Real eta = p(1);
252 libmesh_assert_less (i, 4);
255 static const unsigned int i0[] = {0, 1, 1, 0};
256 static const unsigned int i1[] = {0, 0, 1, 1};
271 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
279 libmesh_assert_less (i, 3);
281 const Real dzeta0dxi = -1.;
282 const Real dzeta1dxi = 1.;
283 const Real dzeta2dxi = 0.;
285 const Real dzeta0deta = -1.;
286 const Real dzeta1deta = 0.;
287 const Real dzeta2deta = 1.;
306 libmesh_error_msg(
"Invalid shape function index i = " << i);
324 libmesh_error_msg(
"Invalid shape function index i = " << i);
328 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
333 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
346 const Real xi = p(0);
347 const Real eta = p(1);
349 libmesh_assert_less (i, 8);
358 return .25*(1. - eta)*((1. - xi)*(-1.) +
359 (-1.)*(-1. - xi - eta));
362 return .25*(1. - eta)*((1. + xi)*(1.) +
363 (1.)*(-1. + xi - eta));
366 return .25*(1. + eta)*((1. + xi)*(1.) +
367 (1.)*(-1. + xi + eta));
370 return .25*(1. + eta)*((1. - xi)*(-1.) +
371 (-1.)*(-1. - xi + eta));
374 return .5*(-2.*xi)*(1. - eta);
377 return .5*(1.)*(1. - eta*eta);
380 return .5*(-2.*xi)*(1. + eta);
383 return .5*(-1.)*(1. - eta*eta);
386 libmesh_error_msg(
"Invalid shape function index i = " << i);
394 return .25*(1. - xi)*((1. - eta)*(-1.) +
395 (-1.)*(-1. - xi - eta));
398 return .25*(1. + xi)*((1. - eta)*(-1.) +
399 (-1.)*(-1. + xi - eta));
402 return .25*(1. + xi)*((1. + eta)*(1.) +
403 (1.)*(-1. + xi + eta));
406 return .25*(1. - xi)*((1. + eta)*(1.) +
407 (1.)*(-1. - xi + eta));
410 return .5*(1. - xi*xi)*(-1.);
413 return .5*(1. + xi)*(-2.*eta);
416 return .5*(1. - xi*xi)*(1.);
419 return .5*(1. - xi)*(-2.*eta);
422 libmesh_error_msg(
"Invalid shape function index i = " << i);
426 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
433 const Real xi = p(0);
434 const Real eta = p(1);
436 libmesh_assert_less (i, 9);
439 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
440 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
455 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
461 libmesh_assert_less (i, 6);
463 const Real zeta1 = p(0);
464 const Real zeta2 = p(1);
465 const Real zeta0 = 1. - zeta1 - zeta2;
467 const Real dzeta0dxi = -1.;
468 const Real dzeta1dxi = 1.;
469 const Real dzeta2dxi = 0.;
471 const Real dzeta0deta = -1.;
472 const Real dzeta1deta = 0.;
473 const Real dzeta2deta = 1.;
482 return (4.*zeta0-1.)*dzeta0dxi;
485 return (4.*zeta1-1.)*dzeta1dxi;
488 return (4.*zeta2-1.)*dzeta2dxi;
491 return 4.*zeta1*dzeta0dxi + 4.*zeta0*dzeta1dxi;
494 return 4.*zeta2*dzeta1dxi + 4.*zeta1*dzeta2dxi;
497 return 4.*zeta2*dzeta0dxi + 4*zeta0*dzeta2dxi;
500 libmesh_error_msg(
"Invalid shape function index i = " << i);
509 return (4.*zeta0-1.)*dzeta0deta;
512 return (4.*zeta1-1.)*dzeta1deta;
515 return (4.*zeta2-1.)*dzeta2deta;
518 return 4.*zeta1*dzeta0deta + 4.*zeta0*dzeta1deta;
521 return 4.*zeta2*dzeta1deta + 4.*zeta1*dzeta2deta;
524 return 4.*zeta2*dzeta0deta + 4*zeta0*dzeta2deta;
527 libmesh_error_msg(
"Invalid shape function index i = " << i);
531 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
536 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
542 libmesh_error_msg(
"ERROR: Unsupported 2D FE order: " << order);
544 #else // LIBMESH_DIM > 1 554 const unsigned int i,
555 const unsigned int j,
558 libmesh_assert(elem);
571 const unsigned int i,
572 const unsigned int j,
580 libmesh_assert_less (j, 3);
596 const Real xi = p(0);
597 const Real eta = p(1);
599 libmesh_assert_less (i, 4);
602 static const unsigned int i0[] = {0, 1, 1, 0};
603 static const unsigned int i1[] = {0, 0, 1, 1};
621 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
634 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
648 const Real xi = p(0);
649 const Real eta = p(1);
651 libmesh_assert_less (j, 3);
679 libmesh_error_msg(
"Invalid shape function index i = " << i);
689 return 0.25*( 1. - 2.*xi - 2.*eta);
692 return 0.25*(-1. - 2.*xi + 2.*eta);
695 return 0.25*( 1. + 2.*xi + 2.*eta);
698 return 0.25*(-1. + 2.*xi - 2.*eta);
713 libmesh_error_msg(
"Invalid shape function index i = " << i);
741 libmesh_error_msg(
"Invalid shape function index i = " << i);
746 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
753 const Real xi = p(0);
754 const Real eta = p(1);
756 libmesh_assert_less (i, 9);
759 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
760 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
780 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
786 const Real dzeta0dxi = -1.;
787 const Real dzeta1dxi = 1.;
788 const Real dzeta2dxi = 0.;
790 const Real dzeta0deta = -1.;
791 const Real dzeta1deta = 0.;
792 const Real dzeta2deta = 1.;
794 libmesh_assert_less (j, 3);
804 return 4.*dzeta0dxi*dzeta0dxi;
807 return 4.*dzeta1dxi*dzeta1dxi;
810 return 4.*dzeta2dxi*dzeta2dxi;
813 return 8.*dzeta0dxi*dzeta1dxi;
816 return 8.*dzeta1dxi*dzeta2dxi;
819 return 8.*dzeta0dxi*dzeta2dxi;
822 libmesh_error_msg(
"Invalid shape function index i = " << i);
832 return 4.*dzeta0dxi*dzeta0deta;
835 return 4.*dzeta1dxi*dzeta1deta;
838 return 4.*dzeta2dxi*dzeta2deta;
841 return 4.*dzeta1deta*dzeta0dxi + 4.*dzeta0deta*dzeta1dxi;
844 return 4.*dzeta2deta*dzeta1dxi + 4.*dzeta1deta*dzeta2dxi;
847 return 4.*dzeta2deta*dzeta0dxi + 4.*dzeta0deta*dzeta2dxi;
850 libmesh_error_msg(
"Invalid shape function index i = " << i);
860 return 4.*dzeta0deta*dzeta0deta;
863 return 4.*dzeta1deta*dzeta1deta;
866 return 4.*dzeta2deta*dzeta2deta;
869 return 8.*dzeta0deta*dzeta1deta;
872 return 8.*dzeta1deta*dzeta2deta;
875 return 8.*dzeta0deta*dzeta2deta;
878 libmesh_error_msg(
"Invalid shape function index i = " << i);
883 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
888 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
896 libmesh_error_msg(
"ERROR: Unsupported 2D FE order: " << order);
900 #else // LIBMESH_DIM > 1 910 const unsigned int i,
911 const unsigned int j,
914 libmesh_assert(elem);
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
The base class for all geometric element types.
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
unsigned int p_level() const
Template class which generates the different FE families and orders.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual ElemType type() const =0
A geometric point in (x,y,z) space.
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)