35 void hierarchic_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());
57 libmesh_assert_equal_to (elem_soln.size(), 1);
59 const Number val = elem_soln[0];
61 for (
unsigned int n=0; n<
n_nodes; n++)
73 const unsigned int n_sf =
77 std::vector<Point> refspace_nodes;
79 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
81 for (
unsigned int n=0; n<
n_nodes; n++)
83 libmesh_assert_equal_to (elem_soln.size(), n_sf);
89 for (
unsigned int i=0; i<n_sf; i++)
90 nodal_soln[n] += elem_soln[i] *
103 unsigned int hierarchic_n_dofs(
const ElemType t,
const Order o)
105 libmesh_assert_greater (o, 0);
115 libmesh_assert_less (o, 2);
116 libmesh_fallthrough();
120 return ((o+1)*(o+1));
122 libmesh_assert_less (o, 2);
123 libmesh_fallthrough();
125 libmesh_assert_less (o, 2);
126 libmesh_fallthrough();
128 return ((o+1)*(o+1)*(o+1));
130 libmesh_assert_less (o, 2);
131 libmesh_fallthrough();
133 return ((o+1)*(o+2)/2);
137 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for HIERARCHIC FE family!");
144 unsigned int hierarchic_n_dofs_at_node(
const ElemType t,
146 const unsigned int n)
148 libmesh_assert_greater (o, 0);
164 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for EDGE2/3!");
167 libmesh_assert_less (n, 3);
168 libmesh_assert_less (o, 2);
169 libmesh_fallthrough();
185 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
189 libmesh_assert_less (n, 4);
190 libmesh_assert_less (o, 2);
191 libmesh_fallthrough();
214 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for QUAD4/8/9!");
217 libmesh_assert_less (n, 8);
218 libmesh_assert_less (o, 2);
219 libmesh_fallthrough();
221 libmesh_assert_less (n, 20);
222 libmesh_assert_less (o, 2);
223 libmesh_fallthrough();
257 return ((o-1)*(o-1));
263 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for HEX8/20/27!");
277 unsigned int hierarchic_n_dofs_per_elem(
const ElemType t,
280 libmesh_assert_greater (o, 0);
294 return ((o-1)*(o-2)/2);
298 return ((o-1)*(o-1));
301 libmesh_assert_less (o, 2);
304 return ((o-1)*(o-1)*(o-1));
324 const std::vector<Number> & elem_soln,
325 std::vector<Number> & nodal_soln)
326 { hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 0); }
331 const std::vector<Number> & elem_soln,
332 std::vector<Number> & nodal_soln)
333 { hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 1); }
338 const std::vector<Number> & elem_soln,
339 std::vector<Number> & nodal_soln)
340 { hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 2); }
345 const std::vector<Number> & elem_soln,
346 std::vector<Number> & nodal_soln)
347 { hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 3); }
380 #ifdef LIBMESH_ENABLE_AMR 385 const unsigned int variable_number,
387 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
392 const unsigned int variable_number,
394 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
395 #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)