19 #ifndef DISCRETE_SPACE_HH_
20 #define DISCRETE_SPACE_HH_
28 using FEPtr = std::shared_ptr<FiniteElement<dim>>;
54 template<
unsigned int dim>
122 for (
unsigned int d=0; d < fe_ptr->n_dofs(); d++) {
123 if (fe_ptr->dof(d).dim == 0)
125 if (fe_ptr->dof(d).dim == dim-1 && fe_ptr->dof(d).n_face_idx == 0)
127 if (fe_ptr->dof(d).dim == 0 && fe_ptr->dof(d).n_face_idx == 0)
#define ASSERT_PERMANENT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
virtual ~DiscreteSpace()
Destructor.
virtual unsigned int n_elem_dofs(const ElementAccessor< 3 > &cell) const =0
Number of dofs associated to element (not shared by adjacent elements).
unsigned int n_face_dofs(unsigned int face_id)
Number of dofs associated to generalized n-face (node, line, triangle or tetrahedron).
virtual unsigned int n_node_dofs(unsigned int nid) const =0
Number of dofs associated to node. nid is the node index in the mesh duplicate_nodes object.
virtual MixedPtr< FiniteElement > fe() const =0
virtual unsigned int n_edge_dofs(const Edge &edge) const =0
Number of dofs associated to edge.
DiscreteSpace(MeshBase *mesh)
Constructor.
const std::vector< unsigned int > & node_dim() const
std::vector< unsigned int > _n_node_dofs
unsigned int n_node_dofs(unsigned int nid) const override
Number of dofs associated to node. nid is the node index in the mesh duplicate_nodes object.
unsigned int n_edge_dofs(const Edge &edge) const override
Number of dofs associated to edge.
EqualOrderDiscreteSpace(MeshBase *mesh, MixedPtr< FiniteElement > fe)
std::vector< unsigned int > _n_elem_dofs
std::vector< unsigned int > _n_edge_dofs
MixedPtr< FiniteElement > fe() const override
MixedPtr< FiniteElement > fe_
unsigned int n_elem_dofs(const ElementAccessor< 3 > &cell) const override
Number of dofs associated to element (not shared by adjacent elements).
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
Base class for Mesh and BCMesh.
const DuplicateNodes * duplicate_nodes() const
std::shared_ptr< FiniteElement< dim > > FEPtr
Abstract class for description of finite elements.