35 void hermite_nodal_soln(
const Elem * elem,
37 const std::vector<Number> & elem_soln,
38 std::vector<Number> & nodal_soln,
41 const unsigned int n_nodes = elem->n_nodes();
43 const ElemType elem_type = elem->type();
47 const Order totalorder =
static_cast<Order>(order + elem->p_level());
50 FEType fe_type(totalorder,
HERMITE);
52 const unsigned int n_sf =
56 std::vector<Point> refspace_nodes;
58 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
60 for (
unsigned int n=0; n<
n_nodes; n++)
62 libmesh_assert_equal_to (elem_soln.size(), n_sf);
68 for (
unsigned int i=0; i<n_sf; i++)
69 nodal_soln[n] += elem_soln[i] *
81 libmesh_error_msg(
"Error: Hermite elements require order>=3, but you asked for order=" << o);
90 libmesh_assert_less (o, 4);
91 libmesh_fallthrough();
99 libmesh_assert_less (o, 4);
100 libmesh_fallthrough();
102 return ((o+1)*(o+1));
106 libmesh_assert_less (o, 4);
107 libmesh_fallthrough();
109 return ((o+1)*(o+1)*(o+1));
122 unsigned int hermite_n_dofs_at_node(
const ElemType t,
124 const unsigned int n)
126 libmesh_assert_greater (o, 2);
146 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
152 libmesh_assert_less (o, 4);
153 libmesh_fallthrough();
178 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD4/8/9!");
184 libmesh_assert_less (o, 4);
185 libmesh_fallthrough();
221 return (2*(o-3)*(o-3));
228 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for HEX8/20/27!");
242 unsigned int hermite_n_dofs_per_elem(
const ElemType t,
245 libmesh_assert_greater (o, 2);
256 libmesh_assert_less (o, 4);
257 libmesh_fallthrough();
261 return ((o-3)*(o-3));
263 libmesh_assert_less (o, 4);
264 libmesh_fallthrough();
267 return ((o-3)*(o-3)*(o-3));
290 const std::vector<Number> & elem_soln,
291 std::vector<Number> & nodal_soln)
292 { hermite_nodal_soln(elem, order, elem_soln, nodal_soln, 0); }
297 const std::vector<Number> & elem_soln,
298 std::vector<Number> & nodal_soln)
299 { hermite_nodal_soln(elem, order, elem_soln, nodal_soln, 1); }
304 const std::vector<Number> & elem_soln,
305 std::vector<Number> & nodal_soln)
306 { hermite_nodal_soln(elem, order, elem_soln, nodal_soln, 2); }
311 const std::vector<Number> & elem_soln,
312 std::vector<Number> & nodal_soln)
313 { hermite_nodal_soln(elem, order, elem_soln, nodal_soln, 3); }
352 #ifdef LIBMESH_ENABLE_AMR 357 const unsigned int variable_number,
359 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
364 const unsigned int variable_number,
366 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
367 #endif // #ifdef LIBMESH_ENABLE_AMR static unsigned int n_dofs(const ElemType t, const Order o)
The base class for all geometric element types.
static unsigned int n_dofs_at_node(const ElemType t, const Order o, const unsigned int n)
virtual bool shapes_need_reinit() const override
virtual bool is_hierarchic() const override
Manages the degrees of freedom (DOFs) in a simulation.
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)
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)
static void nodal_soln(const Elem *elem, const Order o, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln)