21#include "libmesh/libmesh_config.h"
22#ifdef LIBMESH_ENABLE_HIGHER_ORDER_SHAPES
24#include "libmesh/elem.h"
25#include "libmesh/enum_to_string.h"
26#include "libmesh/fe.h"
27#include "libmesh/fe_interface.h"
28#include "libmesh/fe_macro.h"
37void rational_nodal_soln(
const Elem * elem,
39 const std::vector<Number> & elem_soln,
40 std::vector<Number> & nodal_soln,
41 const bool add_p_level)
49 const Order totalorder = order + add_p_level*elem->
p_level();
52 FEType fe_type(order, _underlying_fe_family);
53 FEType p_refined_fe_type(totalorder, _underlying_fe_family);
60 libmesh_assert_equal_to (elem_soln.size(), 1);
62 std::fill(nodal_soln.begin(), nodal_soln.end(), elem_soln[0]);
72 const unsigned int n_sf =
75 std::vector<Point> refspace_nodes;
77 libmesh_assert_equal_to (refspace_nodes.size(),
n_nodes);
78 libmesh_assert_equal_to (n_sf,
n_nodes);
79 libmesh_assert_equal_to (elem_soln.size(), n_sf);
81 std::vector<Real> node_weights(
n_nodes);
85 for (
unsigned int n=0; n<
n_nodes; n++)
90 std::fill(nodal_soln.begin(), nodal_soln.end(), 0);
92 for (
unsigned int n=0; n<
n_nodes; n++)
94 std::vector<Real> weighted_shape(n_sf);
95 Real weighted_sum = 0;
97 for (
unsigned int i=0; i<n_sf; i++)
99 weighted_shape[i] = node_weights[i] *
101 weighted_sum += weighted_shape[i];
105 for (
unsigned int i=0; i<n_sf; i++)
106 nodal_soln[n] += elem_soln[i] * weighted_shape[i];
107 nodal_soln[n] /= weighted_sum;
171#ifdef LIBMESH_ENABLE_AMR
176 const unsigned int variable_number,
178{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
183 const unsigned int variable_number,
185{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
The constraint matrix storage format.
This class handles the numbering of degrees of freedom on a mesh.
T get_extra_datum(const unsigned int index) const
Gets the value on this object of the extra datum associated with index, which should have been obtain...
This is the base class from which all geometric element types are derived.
unsigned char mapping_data() const
const Node & node_ref(const unsigned int i) const
virtual unsigned int n_nodes() const =0
virtual ElemType type() const =0
unsigned int p_level() const
static void get_refspace_nodes(const ElemType t, std::vector< Point > &nodes)
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
virtual bool is_hierarchic() const override
static unsigned int n_dofs_per_elem(const ElemType t, const Order o)
virtual FEContinuity get_continuity() const override
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...
static unsigned int n_dofs(const ElemType t, const Order o)
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.
LIBMESH_FE_NODAL_SOLN(BERNSTEIN, bernstein_nodal_soln)
ElemType
Defines an enum for geometric element types.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LIBMESH_FE_SIDE_NODAL_SOLN(HIERARCHIC_VEC)
const dof_id_type n_nodes