21 #include "libmesh/fe.h" 22 #include "libmesh/elem.h" 23 #include "libmesh/enum_to_string.h" 24 #include "libmesh/fe_interface.h" 25 #include "libmesh/fe_macro.h" 245 const unsigned int order =
static_cast<unsigned int>(o);
264 return (order+1)*(order+2)/2;
280 return (order+1)*(order+2)*(order+3)/6;
296 void monomial_nodal_soln(
const Elem * elem,
298 const std::vector<Number> & elem_soln,
299 std::vector<Number> & nodal_soln,
300 const bool add_p_level)
302 const unsigned int n_nodes = elem->n_nodes();
304 const ElemType elem_type = elem->type();
308 const Order totalorder =
static_cast<Order>(order+add_p_level*elem->p_level());
315 libmesh_assert_equal_to (elem_soln.size(), 1);
317 const Number val = elem_soln[0];
319 for (
unsigned int n=0; n<
n_nodes; n++)
333 const unsigned int n_sf =
336 std::vector<Point> refspace_nodes;
338 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
340 for (
unsigned int n=0; n<
n_nodes; n++)
342 libmesh_assert_equal_to (elem_soln.size(), n_sf);
348 for (
unsigned int i=0; i<n_sf; i++)
349 nodal_soln[n] += elem_soln[i] *
402 #ifdef LIBMESH_ENABLE_AMR 410 #endif // #ifdef LIBMESH_ENABLE_AMR static unsigned int n_dofs(const ElemType t, const Order o)
ElemType
Defines an enum for geometric element types.
Order
defines an enum for polynomial orders.
This is the base class from which all geometric element types are derived.
static unsigned int n_dofs_at_node(const ElemType t, const Order o, const unsigned int n)
virtual bool shapes_need_reinit() const override
The libMesh namespace provides an interface to certain functionality in the library.
virtual bool is_hierarchic() const override
This class handles the numbering of degrees of freedom on a mesh.
LIBMESH_FE_NODAL_SOLN(BERNSTEIN, bernstein_nodal_soln)
LIBMESH_FE_SIDE_NODAL_SOLN(HIERARCHIC_VEC)
const dof_id_type n_nodes
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static void get_refspace_nodes(const ElemType t, std::vector< Point > &nodes)
unsigned int monomial_n_dofs(const ElemType t, const Order o)
Helper functions for Discontinuous-Pn type basis functions.
static unsigned int n_dofs_per_elem(const ElemType t, const Order o)
virtual FEContinuity get_continuity() const override
std::string enum_to_string(const T e)
static void compute_constraints(DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem)
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to var...
FEContinuity
defines an enum for finite element types to libmesh_assert a certain level (or type? Hcurl?) of continuity.
The constraint matrix storage format.