Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::fe::DofPolicyFeSpaceCQ< Dim > Struct Template Reference

#include <dof_policy.hpp>

Inheritance diagram for vulpes::fe::DofPolicyFeSpaceCQ< Dim >:
[legend]
Collaboration diagram for vulpes::fe::DofPolicyFeSpaceCQ< Dim >:
[legend]

Public Types

using ConvexCartIndexValue = uint16_t
using ConvexCartIndex = std::array<ConvexCartIndexValue, 1 << Dim>
using ConvexCartFaceIndex = std::array<ConvexCartIndexValue, 1 << (Dim - 1)>

Public Member Functions

 DofPolicyFeSpaceCQ (std::size_t order)
size_t getLocalDof (const ConvexCartIndex &convex_id) const
 Given the convex combination of vertices of the hyper-cube representing the local dof, return its local index.
template<typename MeshType>
constexpr MeshType::index_t dofToCellDof (const MeshType &mesh, MeshType::index_t cell_id, MeshType::index_t owning_enty_id, MeshType::index_t enty_dim, MeshType::index_t enty_multiplicity) const
 Returns the index of the dof in cell enumeration given geometrical information.
void buildDofTable ()

Static Public Member Functions

static std::array< std::size_t, Dim+1 > buildDofSubdimEntity (std::size_t order)
 Returns the number of dofs associated to each sub-dimensional entity.
static constexpr bool dofsInteractionDistance ()
 Returns the distance of interaction of dofs in different cells.

Public Attributes

ConvexCartIndexValue m_max_rescaling_dim
ConvexCartIndexValue m_max_rescaling_dim_1
std::vector< ConvexCartIndex > m_dofs = {}
std::vector< std::size_t > m_dofs_perm
std::vector< std::size_t > m_internal_dofs
std::vector< ConvexCartFaceIndex > m_face_dofs

Protected Member Functions

const auto & self () const

Protected Attributes

std::size_t m_order
 Polynomial order of the finite element space.

Detailed Description

template<std::size_t Dim>
struct vulpes::fe::DofPolicyFeSpaceCQ< Dim >

DoF policy for continuous elements on Q (tensor) polynomial space

See also
DofPolicyBase

Member Typedef Documentation

◆ ConvexCartFaceIndex

template<std::size_t Dim>
using vulpes::fe::DofPolicyFeSpaceCQ< Dim >::ConvexCartFaceIndex = std::array<ConvexCartIndexValue, 1 << (Dim - 1)>

◆ ConvexCartIndex

template<std::size_t Dim>
using vulpes::fe::DofPolicyFeSpaceCQ< Dim >::ConvexCartIndex = std::array<ConvexCartIndexValue, 1 << Dim>

◆ ConvexCartIndexValue

template<std::size_t Dim>
using vulpes::fe::DofPolicyFeSpaceCQ< Dim >::ConvexCartIndexValue = uint16_t

Constructor & Destructor Documentation

◆ DofPolicyFeSpaceCQ()

template<std::size_t Dim>
vulpes::fe::DofPolicyFeSpaceCQ< Dim >::DofPolicyFeSpaceCQ ( std::size_t order)
inlineexplicit

Member Function Documentation

◆ buildDofSubdimEntity()

template<std::size_t Dim>
std::array< std::size_t, Dim+1 > vulpes::fe::DofPolicyFeSpaceCQ< Dim >::buildDofSubdimEntity ( std::size_t order)
inlinestatic

Returns the number of dofs associated to each sub-dimensional entity.

◆ buildDofTable()

template<std::size_t Dim>
void vulpes::fe::DofPolicyFeSpaceCQ< Dim >::buildDofTable ( )
inline

◆ dofsInteractionDistance()

template<std::size_t Dim>
constexpr bool vulpes::fe::DofPolicyFeSpaceCQ< Dim >::dofsInteractionDistance ( )
inlinestaticconstexpr

Returns the distance of interaction of dofs in different cells.

◆ dofToCellDof()

template<std::size_t Dim>
template<typename MeshType>
MeshType::index_t vulpes::fe::DofPolicyFeSpaceCQ< Dim >::dofToCellDof ( const MeshType & mesh,
MeshType::index_t cell_id,
MeshType::index_t owning_enty_id,
MeshType::index_t enty_dim,
MeshType::index_t enty_multiplicity ) const
inlineconstexpr

Returns the index of the dof in cell enumeration given geometrical information.

Parameters
meshReference to the mesh
cell_idGlobal id of the cell
owning_enty_idGlobal id of the entity (vtx, face, ...) owning the dof
enty_dimDimension of the entity (0 for vtx, 1 for edge, ...)
enty_multiplicityMultiplicity of the dof on the entity (e.g. the second dof on an edge has multiplicity 1)
Returns
The index of the dof in cell enumeration

We write each degree of freedom as a convex combination of the vertices of the hyper-cube that define the cell. Then, recover the local id of the dof by searching in a precomputed table. E.g., for the faces, we recover the global vertices that define the face and write it as a convex combination of them. In this way we have a unique representation of the dof that does not depend on the frame of reference. The global vtx id of the face are face_to_vtx_map[owning_enty_id_local]. Their coefficient are m_face_dofs[enty_multiplicity] (up to a rescaling factor, since the rescaling is order^Dim and m_face_dofs are computed in 2D). Then, we can write this convex combination with respect to the local dofs of the cells since it has all the four vertices needed. Thus we find which are the position of these four global vertices in local enumeration (of the 8 vertices that define the cell), so we can write the dof as a ConvexCartIndex

Warning
The convention for vertex numbering of the hexahedron in a cell is: (v0, v1, v5, v4) Front (v3, v2, v6, v7) Back (v0, v3, v7, v4) Left (v1, v2, v6, v5) Right (v0, v1, v2, v3) Bottom (v4, v5, v6, v7) Top

y ^ z | / | 7-----—6 | /| / /| |/ | / / | 4-----—5 | | |/ | | | 3--—|–2 | / | / |/ |/ 0-----—1---->x

◆ getLocalDof()

template<std::size_t Dim>
size_t vulpes::fe::DofPolicyFeSpaceCQ< Dim >::getLocalDof ( const ConvexCartIndex & convex_id) const
inline

Given the convex combination of vertices of the hyper-cube representing the local dof, return its local index.

◆ self()

const auto & vulpes::fe::DofPolicyBase< Dim, DofPolicyFeSpaceCQ< Dim > >::self ( ) const
inlineprotectedinherited

Member Data Documentation

◆ m_dofs

template<std::size_t Dim>
std::vector<ConvexCartIndex> vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_dofs = {}

◆ m_dofs_perm

template<std::size_t Dim>
std::vector<std::size_t> vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_dofs_perm

◆ m_face_dofs

template<std::size_t Dim>
std::vector<ConvexCartFaceIndex> vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_face_dofs

◆ m_internal_dofs

template<std::size_t Dim>
std::vector<std::size_t> vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_internal_dofs

◆ m_max_rescaling_dim

template<std::size_t Dim>
ConvexCartIndexValue vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_max_rescaling_dim

◆ m_max_rescaling_dim_1

template<std::size_t Dim>
ConvexCartIndexValue vulpes::fe::DofPolicyFeSpaceCQ< Dim >::m_max_rescaling_dim_1

◆ m_order

std::size_t vulpes::fe::DofPolicyBase< Dim, DofPolicyFeSpaceCQ< Dim > >::m_order
protectedinherited

Polynomial order of the finite element space.


The documentation for this struct was generated from the following file: