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);
210 const unsigned int i,
213 libmesh_assert(elem);
224 const unsigned int i,
225 const unsigned int j,
231 libmesh_assert_less (j, 2);
247 const Real xi = p(0);
248 const Real eta = p(1);
250 libmesh_assert_less (i, 4);
253 static const unsigned int i0[] = {0, 1, 1, 0};
254 static const unsigned int i1[] = {0, 0, 1, 1};
269 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
277 libmesh_assert_less (i, 3);
279 const Real dzeta0dxi = -1.;
280 const Real dzeta1dxi = 1.;
281 const Real dzeta2dxi = 0.;
283 const Real dzeta0deta = -1.;
284 const Real dzeta1deta = 0.;
285 const Real dzeta2deta = 1.;
304 libmesh_error_msg(
"Invalid shape function index i = " << i);
322 libmesh_error_msg(
"Invalid shape function index i = " << i);
326 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
331 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
344 const Real xi = p(0);
345 const Real eta = p(1);
347 libmesh_assert_less (i, 8);
356 return .25*(1. - eta)*((1. - xi)*(-1.) +
357 (-1.)*(-1. - xi - eta));
360 return .25*(1. - eta)*((1. + xi)*(1.) +
361 (1.)*(-1. + xi - eta));
364 return .25*(1. + eta)*((1. + xi)*(1.) +
365 (1.)*(-1. + xi + eta));
368 return .25*(1. + eta)*((1. - xi)*(-1.) +
369 (-1.)*(-1. - xi + eta));
372 return .5*(-2.*xi)*(1. - eta);
375 return .5*(1.)*(1. - eta*eta);
378 return .5*(-2.*xi)*(1. + eta);
381 return .5*(-1.)*(1. - eta*eta);
384 libmesh_error_msg(
"Invalid shape function index i = " << i);
392 return .25*(1. - xi)*((1. - eta)*(-1.) +
393 (-1.)*(-1. - xi - eta));
396 return .25*(1. + xi)*((1. - eta)*(-1.) +
397 (-1.)*(-1. + xi - eta));
400 return .25*(1. + xi)*((1. + eta)*(1.) +
401 (1.)*(-1. + xi + eta));
404 return .25*(1. - xi)*((1. + eta)*(1.) +
405 (1.)*(-1. - xi + eta));
408 return .5*(1. - xi*xi)*(-1.);
411 return .5*(1. + xi)*(-2.*eta);
414 return .5*(1. - xi*xi)*(1.);
417 return .5*(1. - xi)*(-2.*eta);
420 libmesh_error_msg(
"Invalid shape function index i = " << i);
424 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
431 const Real xi = p(0);
432 const Real eta = p(1);
434 libmesh_assert_less (i, 9);
437 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
438 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
453 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
459 libmesh_assert_less (i, 6);
461 const Real zeta1 = p(0);
462 const Real zeta2 = p(1);
463 const Real zeta0 = 1. - zeta1 - zeta2;
465 const Real dzeta0dxi = -1.;
466 const Real dzeta1dxi = 1.;
467 const Real dzeta2dxi = 0.;
469 const Real dzeta0deta = -1.;
470 const Real dzeta1deta = 0.;
471 const Real dzeta2deta = 1.;
480 return (4.*zeta0-1.)*dzeta0dxi;
483 return (4.*zeta1-1.)*dzeta1dxi;
486 return (4.*zeta2-1.)*dzeta2dxi;
489 return 4.*zeta1*dzeta0dxi + 4.*zeta0*dzeta1dxi;
492 return 4.*zeta2*dzeta1dxi + 4.*zeta1*dzeta2dxi;
495 return 4.*zeta2*dzeta0dxi + 4*zeta0*dzeta2dxi;
498 libmesh_error_msg(
"Invalid shape function index i = " << i);
507 return (4.*zeta0-1.)*dzeta0deta;
510 return (4.*zeta1-1.)*dzeta1deta;
513 return (4.*zeta2-1.)*dzeta2deta;
516 return 4.*zeta1*dzeta0deta + 4.*zeta0*dzeta1deta;
519 return 4.*zeta2*dzeta1deta + 4.*zeta1*dzeta2deta;
522 return 4.*zeta2*dzeta0deta + 4*zeta0*dzeta2deta;
525 libmesh_error_msg(
"Invalid shape function index i = " << i);
529 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
534 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
542 libmesh_error_msg(
"ERROR: Unsupported 2D FE order: " << order);
552 const unsigned int i,
553 const unsigned int j,
556 libmesh_assert(elem);
569 const unsigned int i,
570 const unsigned int j,
578 libmesh_assert_less (j, 3);
594 const Real xi = p(0);
595 const Real eta = p(1);
597 libmesh_assert_less (i, 4);
600 static const unsigned int i0[] = {0, 1, 1, 0};
601 static const unsigned int i1[] = {0, 0, 1, 1};
619 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
632 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
645 const Real xi = p(0);
646 const Real eta = p(1);
648 libmesh_assert_less (j, 3);
676 libmesh_error_msg(
"Invalid shape function index i = " << i);
686 return 0.25*( 1. - 2.*xi - 2.*eta);
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);
710 libmesh_error_msg(
"Invalid shape function index i = " << i);
738 libmesh_error_msg(
"Invalid shape function index i = " << i);
744 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
751 const Real xi = p(0);
752 const Real eta = p(1);
754 libmesh_assert_less (i, 9);
757 static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
758 static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
778 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
784 const Real dzeta0dxi = -1.;
785 const Real dzeta1dxi = 1.;
786 const Real dzeta2dxi = 0.;
788 const Real dzeta0deta = -1.;
789 const Real dzeta1deta = 0.;
790 const Real dzeta2deta = 1.;
792 libmesh_assert_less (j, 3);
802 return 4.*dzeta0dxi*dzeta0dxi;
805 return 4.*dzeta1dxi*dzeta1dxi;
808 return 4.*dzeta2dxi*dzeta2dxi;
811 return 8.*dzeta0dxi*dzeta1dxi;
814 return 8.*dzeta1dxi*dzeta2dxi;
817 return 8.*dzeta0dxi*dzeta2dxi;
820 libmesh_error_msg(
"Invalid shape function index i = " << i);
830 return 4.*dzeta0dxi*dzeta0deta;
833 return 4.*dzeta1dxi*dzeta1deta;
836 return 4.*dzeta2dxi*dzeta2deta;
839 return 4.*dzeta1deta*dzeta0dxi + 4.*dzeta0deta*dzeta1dxi;
842 return 4.*dzeta2deta*dzeta1dxi + 4.*dzeta1deta*dzeta2dxi;
845 return 4.*dzeta2deta*dzeta0dxi + 4.*dzeta0deta*dzeta2dxi;
848 libmesh_error_msg(
"Invalid shape function index i = " << i);
858 return 4.*dzeta0deta*dzeta0deta;
861 return 4.*dzeta1deta*dzeta1deta;
864 return 4.*dzeta2deta*dzeta2deta;
867 return 8.*dzeta0deta*dzeta1deta;
870 return 8.*dzeta1deta*dzeta2deta;
873 return 8.*dzeta0deta*dzeta2deta;
876 libmesh_error_msg(
"Invalid shape function index i = " << i);
881 libmesh_error_msg(
"ERROR: Invalid derivative index j = " << j);
886 libmesh_error_msg(
"ERROR: Unsupported 2D element type: " << type);
894 libmesh_error_msg(
"ERROR: Unsupported 2D FE order: " << order);
898 #endif // LIBMESH_DIM > 1 906 const unsigned int i,
907 const unsigned int j,
910 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)