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(), 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(), 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(), 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(), 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                                       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(), 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                                       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(), 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                                              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                                              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(),
   432                             const unsigned int i,
   435   libmesh_assert_less (i, order+1u);
   438   libmesh_error_msg_if (order <= 0,
   439                         "HIERARCHIC FE families do not support p=0");
   445   const Real xi = p(0);
   452       returnval = .5*(1. - xi);
   455       returnval = .5*(1.  + xi);
   460       returnval = (xi*xi - 1.)/2.;
   463       returnval = (pow<4>(xi) - 1.)/24.;
   466       returnval = (pow<6>(xi) - 1.)/720.;
   472       returnval = (xi*xi*xi - xi)/6.;
   475       returnval = (pow<5>(xi) - xi)/120.;
   478       returnval = (pow<7>(xi) - xi)/5040.;
   481       Real denominator = 1.;
   482       for (
unsigned int n=1; n <= i; ++n)
   489         returnval = (returnval - xi)/denominator;
   492         returnval = (returnval - 1.)/denominator;
   503                                   const unsigned int i,
   504                                   const unsigned int libmesh_dbg_var(j),
   508   libmesh_assert_equal_to (j, 0);
   509   libmesh_assert_less (i, order+1u);
   512   libmesh_error_msg_if (order <= 0,
   513                         "HIERARCHIC FE families do not support p=0");
   519   const Real xi = p(0);
   537       returnval = pow<3>(xi)/6.;
   540       returnval = pow<5>(xi)/120.;
   545       returnval = (3*xi*xi - 1.)/6.;
   548       returnval = (5.*pow<4>(xi) - 1.)/120.;
   551       returnval = (7.*pow<6>(xi) - 1.)/5040.;
   554       Real denominator = 1.;
   555       for (
unsigned int n=1; n != i; ++n)
   562         returnval = (i * returnval - 1.)/denominator/i;
   565         returnval = returnval/denominator;
   574 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES   576 Real fe_hierarchic_1D_shape_second_deriv(
const ElemType,
   578                                          const unsigned int i,
   579                                          const unsigned int libmesh_dbg_var(j),
   583   libmesh_assert_equal_to (j, 0);
   584   libmesh_assert_less (i, order+1u);
   587   libmesh_error_msg_if (order <= 0,
   588                         "HIERARCHIC FE families do not support p=0");
   594   const Real xi = p(0);
   613       returnval = pow<2>(xi)/2.;
   616       returnval = pow<3>(xi)/6.;
   619       returnval = pow<4>(xi)/24.;
   622       returnval = pow<5>(xi)/120.;
   626       Real denominator = 1.;
   627       for (
unsigned int n=1; n != i; ++n)
   634         returnval = (i * returnval - 1.)/denominator/i;
   637         returnval = returnval/denominator;
   644 #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)