35 void l2_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 l2_hierarchic_n_dofs(
const ElemType t,
const Order o)
105 libmesh_assert_greater (o, 0);
118 return ((o+1)*(o+1));
122 return ((o+1)*(o+1)*(o+1));
124 libmesh_assert_less (o, 2);
125 libmesh_fallthrough();
127 return ((o+1)*(o+2)/2);
131 libmesh_error_msg(
"ERROR: Invalid ElemType " <<
Utility::enum_to_string(t) <<
" selected for L2_HIERARCHIC FE family!");
148 const std::vector<Number> & elem_soln,
149 std::vector<Number> & nodal_soln)
150 { l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 0); }
155 const std::vector<Number> & elem_soln,
156 std::vector<Number> & nodal_soln)
157 { l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 1); }
162 const std::vector<Number> & elem_soln,
163 std::vector<Number> & nodal_soln)
164 { l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 2); }
169 const std::vector<Number> & elem_soln,
170 std::vector<Number> & nodal_soln)
171 { l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, 3); }
204 #ifdef LIBMESH_ENABLE_AMR 219 #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)