22 #include "libmesh/fe.h" 23 #include "libmesh/elem.h" 35 const Order libmesh_dbg_var(order),
42 const Real eta = p(1);
43 const Real zeta = p(2);
45 libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
46 (static_cast<unsigned int>(order)+2)*
47 (static_cast<unsigned int>(order)+3)/6);
111 return eta*zeta*zeta;
114 return zeta*zeta*zeta;
124 return xi*xi*eta*eta;
127 return xi*eta*eta*eta;
130 return eta*eta*eta*eta;
133 return xi*xi*xi*zeta;
136 return xi*xi*eta*zeta;
139 return xi*eta*eta*zeta;
142 return eta*eta*eta*zeta;
145 return xi*xi*zeta*zeta;
148 return xi*eta*zeta*zeta;
151 return eta*eta*zeta*zeta;
154 return xi*zeta*zeta*zeta;
157 return eta*zeta*zeta*zeta;
160 return zeta*zeta*zeta*zeta;
164 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
165 const int i2 = i - (o*(o+1)*(o+2)/6);
167 for (; block < i2; block += (o-nz+1)) { nz++; }
168 const int nx = block - i2;
169 const int ny = o - nx - nz;
171 for (
int index=0; index != nx; index++)
173 for (
int index=0; index != ny; index++)
175 for (
int index=0; index != nz; index++)
180 #else // LIBMESH_DIM != 3 183 libmesh_not_implemented();
192 const unsigned int i,
194 const bool add_p_level)
207 const unsigned int i,
209 const bool add_p_level)
220 const Order libmesh_dbg_var(order),
221 const unsigned int i,
222 const unsigned int j,
227 libmesh_assert_less (j, 3);
229 libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
230 (static_cast<unsigned int>(order)+2)*
231 (static_cast<unsigned int>(order)+3)/6);
234 const Real xi = p(0);
235 const Real eta = p(1);
236 const Real zeta = p(2);
318 return 2.*xi*eta*eta;
327 return 3.*xi*xi*zeta;
330 return 2.*xi*eta*zeta;
339 return 2.*xi*zeta*zeta;
342 return eta*zeta*zeta;
348 return zeta*zeta*zeta;
358 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
359 const int i2 = i - (o*(o+1)*(o+2)/6);
361 for (; block < i2; block += (o-nz+1)) { nz++; }
362 const int nx = block - i2;
363 const int ny = o - nx - nz;
365 for (
int index=1; index < nx; index++)
367 for (
int index=0; index != ny; index++)
369 for (
int index=0; index != nz; index++)
456 return 3.*xi*eta*eta;
459 return 4.*eta*eta*eta;
468 return 2.*xi*eta*zeta;
471 return 3.*eta*eta*zeta;
480 return 2.*eta*zeta*zeta;
486 return zeta*zeta*zeta;
493 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
494 const int i2 = i - (o*(o+1)*(o+2)/6);
496 for (; block < i2; block += (o-nz+1)) { nz++; }
497 const int nx = block - i2;
498 const int ny = o - nx - nz;
500 for (
int index=0; index != nx; index++)
502 for (
int index=1; index < ny; index++)
504 for (
int index=0; index != nz; index++)
609 return 2.*xi*xi*zeta;
612 return 2.*xi*eta*zeta;
615 return 2.*eta*eta*zeta;
618 return 3.*xi*zeta*zeta;
621 return 3.*eta*zeta*zeta;
624 return 4.*zeta*zeta*zeta;
628 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
629 const int i2 = i - (o*(o+1)*(o+2)/6);
631 for (; block < i2; block += (o-nz+1)) { nz++; }
632 const int nx = block - i2;
633 const int ny = o - nx - nz;
635 for (
int index=0; index != nx; index++)
637 for (
int index=0; index != ny; index++)
639 for (
int index=1; index < nz; index++)
646 libmesh_error_msg(
"Invalid shape function derivative j = " << j);
649 #else // LIBMESH_DIM != 3 652 libmesh_not_implemented();
661 const unsigned int i,
662 const unsigned int j,
664 const bool add_p_level)
676 const unsigned int i,
677 const unsigned int j,
679 const bool add_p_level)
687 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 691 const Order libmesh_dbg_var(order),
692 const unsigned int i,
693 const unsigned int j,
698 libmesh_assert_less (j, 6);
700 libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
701 (static_cast<unsigned int>(order)+2)*
702 (static_cast<unsigned int>(order)+3)/6);
704 const Real xi = p(0);
705 const Real eta = p(1);
706 const Real zeta = p(2);
793 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
794 const int i2 = i - (o*(o+1)*(o+2)/6);
796 for (; block < i2; block += (o-nz+1)) { nz++; }
797 const int nx = block - i2;
798 const int ny = o - nx - nz;
799 Real val = nx * (nx - 1);
800 for (
int index=2; index < nx; index++)
802 for (
int index=0; index != ny; index++)
804 for (
int index=0; index != nz; index++)
899 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
900 const int i2 = i - (o*(o+1)*(o+2)/6);
902 for (; block < i2; block += (o-nz+1)) { nz++; }
903 const int nx = block - i2;
904 const int ny = o - nx - nz;
906 for (
int index=1; index < nx; index++)
908 for (
int index=1; index < ny; index++)
910 for (
int index=0; index != nz; index++)
1004 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
1005 const int i2 = i - (o*(o+1)*(o+2)/6);
1006 int block=o, nz = 0;
1007 for (; block < i2; block += (o-nz+1)) { nz++; }
1008 const int nx = block - i2;
1009 const int ny = o - nx - nz;
1010 Real val = ny * (ny - 1);
1011 for (
int index=0; index != nx; index++)
1013 for (
int index=2; index < ny; index++)
1015 for (
int index=0; index != nz; index++)
1102 return 3.*zeta*zeta;
1110 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
1111 const int i2 = i - (o*(o+1)*(o+2)/6);
1112 int block=o, nz = 0;
1113 for (; block < i2; block += (o-nz+1)) { nz++; }
1114 const int nx = block - i2;
1115 const int ny = o - nx - nz;
1117 for (
int index=1; index < nx; index++)
1119 for (
int index=0; index != ny; index++)
1121 for (
int index=1; index < nz; index++)
1208 return 3.*zeta*zeta;
1215 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
1216 const int i2 = i - (o*(o+1)*(o+2)/6);
1217 int block=o, nz = 0;
1218 for (; block < i2; block += (o-nz+1)) { nz++; }
1219 const int nx = block - i2;
1220 const int ny = o - nx - nz;
1222 for (
int index=0; index != nx; index++)
1224 for (
int index=1; index < ny; index++)
1226 for (
int index=1; index < nz; index++)
1305 return 12.*zeta*zeta;
1309 for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
1310 const int i2 = i - (o*(o+1)*(o+2)/6);
1311 int block=o, nz = 0;
1312 for (; block < i2; block += (o-nz+1)) { nz++; }
1313 const int nx = block - i2;
1314 const int ny = o - nx - nz;
1315 Real val = nz * (nz - 1);
1316 for (
int index=0; index != nx; index++)
1318 for (
int index=0; index != ny; index++)
1320 for (
int index=2; index < nz; index++)
1327 libmesh_error_msg(
"Invalid j = " << j);
1330 #else // LIBMESH_DIM != 3 1333 libmesh_not_implemented();
1342 const unsigned int i,
1343 const unsigned int j,
1345 const bool add_p_level)
1357 const unsigned int i,
1358 const unsigned int j,
1360 const bool add_p_level)
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
ElemType
Defines an enum for geometric element types.
Order
defines an enum for polynomial orders.
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
This is the base class from which all geometric element types are derived.
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
OrderWrapper order
The approximation order of the element.
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_DEFAULT_VECTORIZED_FE(template<>Real FE< 0, BERNSTEIN)
void libmesh_ignore(const Args &...)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual ElemType type() const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)