23#include "libmesh/libmesh_config.h"
25#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
27#include "libmesh/fe.h"
28#include "libmesh/elem.h"
40 const Order libmesh_dbg_var(order),
45 const Real xi2 = xi*xi;
50 libmesh_assert_less_equal (order,
SEVENTH);
65 case 0:
return 1./2.-1./2.*xi;
66 case 1:
return 1./2.+1./2.*xi;
67 case 2:
return 1./4. *2.4494897427831780982*(xi2-1.);
68 case 3:
return 1./4. *3.1622776601683793320*(xi2-1.)*xi;
69 case 4:
return 1./16. *3.7416573867739413856*((5.*xi2-6.)*xi2+1.);
70 case 5:
return 3./16. *1.4142135623730950488*(3.+(-10.+7.*xi2)*xi2)*xi;
71 case 6:
return 1./32. *4.6904157598234295546*(-1.+(15.+(-35.+21.*xi2)*xi2)*xi2);
72 case 7:
return 1./32. *5.0990195135927848300*(-5.+(35.+(-63.+33.*xi2)*xi2)*xi2)*xi;
73 case 8:
return 1./256.*5.4772255750516611346*(5.+(-140.+(630.+(-924.+429.*xi2)*xi2)*xi2)*xi2);
76 libmesh_error_msg(
"Invalid shape function index!");
87 const bool add_p_level)
100 const bool add_p_level)
111 const Order libmesh_dbg_var(order),
112 const unsigned int i,
113 const unsigned int libmesh_dbg_var(j),
117 libmesh_assert_equal_to (j, 0);
119 const Real xi = p(0);
120 const Real xi2 = xi*xi;
124 libmesh_assert_less_equal (order,
SEVENTH);
138 case 0:
return -1./2.;
140 case 2:
return 1./2.*2.4494897427831780982*xi;
141 case 3:
return -1./4.*3.1622776601683793320+3./4.*3.1622776601683793320*xi2;
142 case 4:
return 1./16.*3.7416573867739413856*(-12.+20*xi2)*xi;
143 case 5:
return 9./16.*1.4142135623730950488+(-45./8.*1.4142135623730950488+105./16.*1.4142135623730950488*xi2)*xi2;
144 case 6:
return 1./32.*4.6904157598234295546*(30.+(-140.+126.*xi2)*xi2)*xi;
145 case 7:
return -5./32.*5.0990195135927848300+(105./32.*5.0990195135927848300+(-315./32.*5.0990195135927848300+231./32.*5.0990195135927848300*xi2)*xi2)*xi2;
146 case 8:
return 1./256.*5.4772255750516611346*(-280.+(2520.+(-5544.+3432.*xi2)*xi2)*xi2)*xi;
149 libmesh_error_msg(
"Invalid shape function index!");
158 const unsigned int i,
159 const unsigned int j,
161 const bool add_p_level)
166 order + add_p_level*elem->
p_level(), i, j, p);
174 const unsigned int i,
175 const unsigned int j,
177 const bool add_p_level)
188#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
197 static bool warning_given =
false;
200 libMesh::err <<
"Second derivatives for Szabab elements "
201 <<
" are not yet implemented!"
204 warning_given =
true;
218 static bool warning_given =
false;
221 libMesh::err <<
"Second derivatives for Szabab elements "
222 <<
" are not yet implemented!"
225 warning_given =
true;
233 const unsigned int i,
234 const unsigned int j,
236 const bool add_p_level)
This is the base class from which all geometric element types are derived.
virtual ElemType type() const =0
unsigned int p_level() const
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
static OutputShape shape_second_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
static OutputShape shape_deriv(const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p)
A Point defines a location in LIBMESH_DIM dimensional Real space.
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_DEFAULT_VECTORIZED_FE(template<>Real FE< 0, BERNSTEIN)
ElemType
Defines an enum for geometric element types.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real