20 #include "libmesh/fe.h" 21 #include "libmesh/elem.h" 22 #include "libmesh/utility.h" 33 const Order libmesh_dbg_var(order),
38 const Order libmesh_dbg_var(order),
40 const unsigned int libmesh_dbg_var(j),
43 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 46 const Order libmesh_dbg_var(order),
48 const unsigned int libmesh_dbg_var(j),
51 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 72 return fe_hierarchic_1D_shape(elem_type, order, i, p);
83 return fe_hierarchic_1D_shape(elem_type, order, i, p);
94 unsigned int right_side = p(0) > 0;
95 return (right_side == i);
103 const unsigned int i,
105 const bool add_p_level)
109 return fe_hierarchic_1D_shape(elem->
type(),
static_cast<Order>(order + add_p_level * elem->
p_level()), i, p);
117 const unsigned int i,
119 const bool add_p_level)
122 return fe_hierarchic_1D_shape(elem->
type(),
static_cast<Order>(fet.
order + add_p_level * elem->
p_level()), i, p);
132 const unsigned int i,
134 const bool add_p_level)
138 return fe_hierarchic_1D_shape(elem->
type(),
static_cast<Order>(order + add_p_level * elem->
p_level()), i, p);
144 const unsigned int i,
146 const bool add_p_level)
149 return fe_hierarchic_1D_shape(elem->
type(),
static_cast<Order>(fet.
order + add_p_level * elem->
p_level()), i, p);
157 const unsigned int i,
161 unsigned int right_side = p(0) > 0;
162 return (right_side == i);
168 const unsigned int i,
172 unsigned int right_side = p(0) > 0;
173 return (right_side == i);
180 const unsigned int i,
181 const unsigned int j,
184 return fe_hierarchic_1D_shape_deriv(elem_type, order, i, j, p);
192 const unsigned int i,
193 const unsigned int j,
196 return fe_hierarchic_1D_shape_deriv(elem_type, order, i, j, p);
216 const unsigned int i,
217 const unsigned int j,
219 const bool add_p_level)
223 return fe_hierarchic_1D_shape_deriv(elem->
type(),
224 static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
232 const unsigned int i,
233 const unsigned int j,
235 const bool add_p_level)
238 return fe_hierarchic_1D_shape_deriv(elem->
type(),
static_cast<Order>(fet.
order + add_p_level * elem->
p_level()), i, j, p);
247 const unsigned int i,
248 const unsigned int j,
250 const bool add_p_level)
254 return fe_hierarchic_1D_shape_deriv(elem->
type(),
255 static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
263 const unsigned int i,
264 const unsigned int j,
266 const bool add_p_level)
269 return fe_hierarchic_1D_shape_deriv(elem->
type(),
static_cast<Order>(fet.
order + add_p_level * elem->
p_level()), i, j, p);
299 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 304 const unsigned int i,
305 const unsigned int j,
308 return fe_hierarchic_1D_shape_second_deriv(elem_type, order, i, j, p);
317 const unsigned int i,
318 const unsigned int j,
321 return fe_hierarchic_1D_shape_second_deriv(elem_type, order, i, j, p);
341 const unsigned int i,
342 const unsigned int j,
344 const bool add_p_level)
348 return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
349 static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
357 const unsigned int i,
358 const unsigned int j,
360 const bool add_p_level)
363 return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
371 const unsigned int i,
372 const unsigned int j,
374 const bool add_p_level)
378 return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
379 static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
386 const unsigned int i,
387 const unsigned int j,
389 const bool add_p_level)
392 return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
431 const Order libmesh_dbg_var(order),
432 const unsigned int i,
435 libmesh_assert_less (i, order+1u);
441 const Real xi = p(0);
448 returnval = .5*(1. - xi);
451 returnval = .5*(1. + xi);
456 returnval = (xi*xi - 1.)/2.;
459 returnval = (pow<4>(xi) - 1.)/24.;
462 returnval = (pow<6>(xi) - 1.)/720.;
468 returnval = (xi*xi*xi - xi)/6.;
471 returnval = (pow<5>(xi) - xi)/120.;
474 returnval = (pow<7>(xi) - xi)/5040.;
477 Real denominator = 1.;
478 for (
unsigned int n=1; n <= i; ++n)
485 returnval = (returnval - xi)/denominator;
488 returnval = (returnval - 1.)/denominator;
498 const Order libmesh_dbg_var(order),
499 const unsigned int i,
500 const unsigned int libmesh_dbg_var(j),
505 libmesh_assert_equal_to (j, 0);
506 libmesh_assert_less (i, order+1u);
512 const Real xi = p(0);
530 returnval = pow<3>(xi)/6.;
533 returnval = pow<5>(xi)/120.;
538 returnval = (3*xi*xi - 1.)/6.;
541 returnval = (5.*pow<4>(xi) - 1.)/120.;
544 returnval = (7.*pow<6>(xi) - 1.)/5040.;
547 Real denominator = 1.;
548 for (
unsigned int n=1; n != i; ++n)
555 returnval = (i * returnval - 1.)/denominator/i;
558 returnval = returnval/denominator;
567 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 569 Real fe_hierarchic_1D_shape_second_deriv(
const ElemType,
570 const Order libmesh_dbg_var(order),
571 const unsigned int i,
572 const unsigned int libmesh_dbg_var(j),
577 libmesh_assert_equal_to (j, 0);
578 libmesh_assert_less (i, order+1u);
584 const Real xi = p(0);
603 returnval = pow<2>(xi)/2.;
606 returnval = pow<3>(xi)/6.;
609 returnval = pow<4>(xi)/24.;
612 returnval = pow<5>(xi)/120.;
616 Real denominator = 1.;
617 for (
unsigned int n=1; n != i; ++n)
624 returnval = (i * returnval - 1.)/denominator/i;
627 returnval = returnval/denominator;
634 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
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)
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)