21 #include "libmesh/elem.h" 22 #include "libmesh/enum_to_string.h" 23 #include "libmesh/fe.h" 24 #include "libmesh/fe_interface.h" 25 #include "libmesh/fe_macro.h" 36 void clough_nodal_soln(
const Elem * elem,
38 const std::vector<Number> & elem_soln,
39 std::vector<Number> & nodal_soln,
40 const bool add_p_level)
42 const unsigned int n_nodes = elem->n_nodes();
44 const ElemType elem_type = elem->type();
48 const Order totalorder = order + add_p_level*elem->p_level();
51 FEType fe_type(order,
CLOUGH);
60 const unsigned int n_sf =
63 std::vector<Point> refspace_nodes;
65 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
66 libmesh_assert_equal_to (elem_soln.size(), n_sf);
69 std::fill(nodal_soln.begin(), nodal_soln.end(), 0);
71 for (
unsigned int n=0; n<
n_nodes; n++)
73 for (
unsigned int i=0; i<n_sf; i++)
74 nodal_soln[n] += elem_soln[i] *
81 libmesh_error_msg(
"ERROR: Invalid total order " << totalorder);
128 unsigned int CLOUGH_n_dofs(
const Elem * e,
const Order o)
131 return CLOUGH_n_dofs(e->type(), o);
136 unsigned int CLOUGH_n_dofs_at_node(
const ElemType t,
138 const unsigned int n)
165 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI!");
198 libmesh_error_msg(
"ERROR: Invalid node ID " << n <<
" selected for TRI6!");
213 unsigned int CLOUGH_n_dofs_at_node(
const Elem & e,
215 const unsigned int n)
217 return CLOUGH_n_dofs_at_node(e.type(), o, n);
222 unsigned int CLOUGH_n_dofs_per_elem(
const ElemType t,
const Order o)
250 unsigned int CLOUGH_n_dofs_per_elem(
const Elem & e,
const Order o)
252 return CLOUGH_n_dofs_per_elem(e.type(), o);
266 LIBMESH_DEFAULT_NDOFS(
CLOUGH)
281 #ifdef LIBMESH_ENABLE_AMR 286 const unsigned int variable_number,
288 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
293 const unsigned int variable_number,
295 { compute_proj_constraints(constraints, dof_map, variable_number, elem); }
296 #endif // #ifdef LIBMESH_ENABLE_AMR 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.
virtual bool shapes_need_reinit() const override
The libMesh namespace provides an interface to certain functionality in the library.
LIBMESH_FE_NODAL_SOLN(LIBMESH_FE_SIDE_NODAL_SOLN() LIBMESH_DEFAULT_NDOFS(BERNSTEIN) template<> FEContinuity FE< 0 BERNSTEIN, bernstein_nodal_soln)
virtual bool is_hierarchic() const override
This class handles the numbering of degrees of freedom on a mesh.
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)
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.