20 #include "libmesh/fe.h" 21 #include "libmesh/elem.h" 22 #include "libmesh/enum_to_string.h" 32 const bool add_p_level)
37 const Order totalorder = order + add_p_level*elem->
p_level();
38 libmesh_assert_less(i, n_dofs(elem->
type(), totalorder));
43 const Real eta = p(1);
44 const Real zeta = p(2);
58 libmesh_assert_less_equal ( std::fabs(xi), 1.0+10*
TOLERANCE );
59 libmesh_assert_less_equal ( std::fabs(eta), 1.0+10*
TOLERANCE );
60 libmesh_assert_less_equal ( std::fabs(zeta), 1.0+10*
TOLERANCE );
65 return sign *
RealGradient( 0.0, 0.0, 0.125*(zeta-1.0) );
75 return sign *
RealGradient( 0.0, 0.0, 0.125*(1.0+zeta) );
78 libmesh_error_msg(
"Invalid i = " << i);
87 return sign *
RealGradient( 2.0*xi, 2.0*eta, 2.0*zeta-2.0 );
89 return sign *
RealGradient( 2.0*xi, 2.0*eta-2.0, 2.0*zeta );
93 return sign *
RealGradient( 2.0*xi-2.0, 2.0*eta, 2.0*zeta );
96 libmesh_error_msg(
"Invalid i = " << i);
107 libmesh_error_msg(
"ERROR: Unsupported 3D FE order!: " << totalorder);
110 #else // LIBMESH_DIM != 3 112 libmesh_not_implemented();
120 const unsigned int i,
122 const bool add_p_level)
134 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
145 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
153 const unsigned int i,
155 const bool add_p_level)
164 const unsigned int i,
166 const bool add_p_level)
175 const unsigned int i,
176 const unsigned int j,
178 const bool add_p_level)
182 libmesh_assert_less (j, 3);
184 const Order totalorder = order + add_p_level*elem->
p_level();
185 libmesh_assert_less(i, n_dofs(elem->
type(), totalorder));
194 switch (elem->
type())
215 libmesh_error_msg(
"Invalid i = " << i);
235 libmesh_error_msg(
"Invalid i = " << i);
255 libmesh_error_msg(
"Invalid i = " << i);
261 libmesh_error_msg(
"Invalid j = " << j);
281 libmesh_error_msg(
"Invalid i = " << i);
298 libmesh_error_msg(
"Invalid i = " << i);
315 libmesh_error_msg(
"Invalid i = " << i);
321 libmesh_error_msg(
"Invalid j = " << j);
331 libmesh_error_msg(
"ERROR: Unsupported 3D FE order!: " << totalorder);
334 #else // LIBMESH_DIM != 3 336 libmesh_not_implemented();
344 const unsigned int i,
345 const unsigned int j,
347 const bool add_p_level)
360 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
372 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
380 const unsigned int i,
381 const unsigned int j,
383 const bool add_p_level)
392 const unsigned int i,
393 const unsigned int j,
395 const bool add_p_level)
401 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 406 const unsigned int libmesh_dbg_var(i),
407 const unsigned int libmesh_dbg_var(j),
409 const bool add_p_level)
421 libmesh_assert_less (j, 6);
423 const Order totalorder = order + add_p_level*elem->
p_level();
424 libmesh_assert_less(i, n_dofs(elem->
type(), totalorder));
431 switch (elem->
type())
446 libmesh_error_msg(
"ERROR: Unsupported 3D FE order!: " << totalorder);
449 #else // LIBMESH_DIM != 3 452 libmesh_not_implemented();
460 const unsigned int i,
461 const unsigned int j,
463 const bool add_p_level)
476 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
488 libmesh_error_msg(
"Raviart-Thomas elements require the element type \nbecause face orientation is needed.");
496 const unsigned int i,
497 const unsigned int j,
499 const bool add_p_level)
508 const unsigned int i,
509 const unsigned int j,
511 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.
RealVectorValue RealGradient
Order
defines an enum for polynomial orders.
static OutputShape shape(const ElemType t, const Order o, const unsigned int i, const Point &p)
static constexpr Real TOLERANCE
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.
void libmesh_ignore(const Args &...)
std::string enum_to_string(const T e)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool positive_face_orientation(const unsigned int i) const
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)