20 #include "libmesh/fe.h" 
   21 #include "libmesh/elem.h" 
   22 #include "libmesh/utility.h" 
   32                             const Order libmesh_dbg_var(order),
 
   37                                   const Order libmesh_dbg_var(order),
 
   39                                   const unsigned int libmesh_dbg_var(j),
 
   42 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 
   45                                          const Order libmesh_dbg_var(order),
 
   47                                          const unsigned int libmesh_dbg_var(j),
 
   50 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 
   65   return fe_hierarchic_1D_shape(elem_type, order, i, p);
 
   76   return fe_hierarchic_1D_shape(elem_type, order, i, p);
 
   86                              const bool add_p_level)
 
   90   return fe_hierarchic_1D_shape(elem->
type(), static_cast<Order>(order + add_p_level * elem->
p_level()), i, p);
 
  100                                 const bool add_p_level)
 
  104   return fe_hierarchic_1D_shape(elem->
type(), static_cast<Order>(order + add_p_level * elem->
p_level()), i, p);
 
  112                                    const unsigned int i,
 
  113                                    const unsigned int j,
 
  116   return fe_hierarchic_1D_shape_deriv(elem_type, order, i, j, p);
 
  124                                       const unsigned int i,
 
  125                                       const unsigned int j,
 
  128   return fe_hierarchic_1D_shape_deriv(elem_type, order, i, j, p);
 
  136                                    const unsigned int i,
 
  137                                    const unsigned int j,
 
  139                                    const bool add_p_level)
 
  143   return fe_hierarchic_1D_shape_deriv(elem->
type(),
 
  144                                       static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
 
  151                                       const unsigned int i,
 
  152                                       const unsigned int j,
 
  154                                       const bool add_p_level)
 
  158   return fe_hierarchic_1D_shape_deriv(elem->
type(),
 
  159                                       static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
 
  164 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 
  169                                           const unsigned int i,
 
  170                                           const unsigned int j,
 
  173   return fe_hierarchic_1D_shape_second_deriv(elem_type, order, i, j, p);
 
  182                                              const unsigned int i,
 
  183                                              const unsigned int j,
 
  186   return fe_hierarchic_1D_shape_second_deriv(elem_type, order, i, j, p);
 
  193                                           const unsigned int i,
 
  194                                           const unsigned int j,
 
  196                                           const bool add_p_level)
 
  200   return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
 
  201                                              static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
 
  209                                              const unsigned int i,
 
  210                                              const unsigned int j,
 
  212                                              const bool add_p_level)
 
  216   return fe_hierarchic_1D_shape_second_deriv(elem->
type(),
 
  217                                              static_cast<Order>(order + add_p_level * elem->
p_level()), i, j, p);
 
  231                             const Order libmesh_dbg_var(order),
 
  232                             const unsigned int i,
 
  235   libmesh_assert_less (i, order+1u);
 
  241   const Real xi = p(0);
 
  248       returnval = .5*(1. - xi);
 
  251       returnval = .5*(1.  + xi);
 
  256       returnval = (xi*xi - 1.)/2.;
 
  259       returnval = (pow<4>(xi) - 1.)/24.;
 
  262       returnval = (pow<6>(xi) - 1.)/720.;
 
  268       returnval = (xi*xi*xi - xi)/6.;
 
  271       returnval = (pow<5>(xi) - xi)/120.;
 
  274       returnval = (pow<7>(xi) - xi)/5040.;
 
  277       Real denominator = 1.;
 
  278       for (
unsigned int n=1; n <= i; ++n)
 
  285         returnval = (returnval - xi)/denominator;
 
  288         returnval = (returnval - 1.)/denominator;
 
  298                                   const Order libmesh_dbg_var(order),
 
  299                                   const unsigned int i,
 
  300                                   const unsigned int libmesh_dbg_var(j),
 
  305   libmesh_assert_equal_to (j, 0);
 
  306   libmesh_assert_less (i, order+1u);
 
  312   const Real xi = p(0);
 
  330       returnval = pow<3>(xi)/6.;
 
  333       returnval = pow<5>(xi)/120.;
 
  338       returnval = (3*xi*xi - 1.)/6.;
 
  341       returnval = (5.*pow<4>(xi) - 1.)/120.;
 
  344       returnval = (7.*pow<6>(xi) - 1.)/5040.;
 
  347       Real denominator = 1.;
 
  348       for (
unsigned int n=1; n != i; ++n)
 
  355         returnval = (i * returnval - 1.)/denominator/i;
 
  358         returnval = returnval/denominator;
 
  367 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 
  369 Real fe_hierarchic_1D_shape_second_deriv(
const ElemType,
 
  370                                          const Order libmesh_dbg_var(order),
 
  371                                          const unsigned int i,
 
  372                                          const unsigned int libmesh_dbg_var(j),
 
  377   libmesh_assert_equal_to (j, 0);
 
  378   libmesh_assert_less (i, order+1u);
 
  384   const Real xi = p(0);
 
  403       returnval = pow<2>(xi)/2.;
 
  406       returnval = pow<3>(xi)/6.;
 
  409       returnval = pow<4>(xi)/24.;
 
  412       returnval = pow<5>(xi)/120.;
 
  416       Real denominator = 1.;
 
  417       for (
unsigned int n=1; n != i; ++n)
 
  424         returnval = (i * returnval - 1.)/denominator/i;
 
  427         returnval = returnval/denominator;
 
  434 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES