HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
local-dof-table.hpp
Go to the documentation of this file.
1#ifndef LOCALDOFTABLE_HPP
2#define LOCALDOFTABLE_HPP
3
5
6namespace HArDCore2D {
7
8 namespace DSL {
9
11 public:
13
14 const Mesh & mesh() const
15 {
16 return m_descriptor.mesh();
17 }
18
22
24 return m_descriptor;
25 }
26
28 {
30 }
31
32 size_t numberOfLocalVertexDofs(const std::string & dof_name) const
33 {
35 }
36
37 size_t numberOfLocalEdgeDofs() const
38 {
40 }
41
42 size_t numberOfLocalEdgeDofs(const std::string & dof_name) const
43 {
44 return m_descriptor.numberOfLocalEdgeDofs(dof_name);
45 }
46
47 size_t numberOfLocalCellDofs() const
48 {
50 }
51
52 size_t numberOfLocalCellDofs(const std::string & dof_name) const
53 {
54 return m_descriptor.numberOfLocalCellDofs(dof_name);
55 }
56
58 inline size_t dimension() const
59 {
63 }
64
66 inline size_t numTotalDofsVertices() const
67 {
69 }
70
72 inline size_t numTotalDofsEdges() const
73 {
74 return mesh().n_edges() * m_n_local_edge_dofs;
75 }
76
78 inline size_t numTotalDofsCells() const
79 {
80 return mesh().n_cells() * m_n_local_cell_dofs;
81 }
82
84 inline size_t dimensionVertex(const Vertex & V) const
85 {
87 }
88
90 inline size_t dimensionVertex(size_t iV) const
91 {
92 return dimensionVertex(*mesh().vertex(iV));
93 }
94
96 inline size_t dimensionEdge(const Edge & E) const
97 {
98 return 2 * m_n_local_vertex_dofs
100 }
101
103 inline size_t dimensionEdge(size_t iE) const
104 {
105 return dimensionEdge(*mesh().edge(iE));
106 }
107
109 inline size_t dimensionCell(const Cell & T) const
110 {
111 return T.n_vertices() * m_n_local_vertex_dofs
112 + T.n_edges() * m_n_local_edge_dofs
114 }
115
117 inline size_t dimensionCellBoundary(const Cell & T) const
118 {
119 return T.n_vertices() * m_n_local_vertex_dofs
120 + T.n_edges() * m_n_local_edge_dofs;
121 }
122
124 inline size_t dimensionCell(size_t iT) const
125 {
126 return dimensionCell(*mesh().cell(iT));
127 }
128
130 inline size_t dimensionCellBoundary(size_t iT) const
131 {
132 return dimensionCellBoundary(*mesh().cell(iT));
133 }
134
135 size_t localOffset(const Edge & E, const Vertex & V) const;
136 size_t localOffset(const Edge & E, const Vertex & V, const std::string & vertex_dof_name) const;
137 size_t localOffset(const Edge & E) const;
138 size_t localOffset(const Edge & E, const std::string & edge_dof_name) const;
139 size_t localOffset(const Cell & T, const Vertex & V) const;
140 size_t localOffset(const Cell & T, const Vertex & V, const std::string & vertex_dof_name) const;
141 size_t localOffset(const Cell & T, const Edge & E) const;
142 size_t localOffset(const Cell & T, const Edge & E, const std::string & edge_dof_name) const;
143 size_t localOffset(const Cell & T) const;
144 size_t localOffset(const Cell & T, const std::string & cell_dof_name) const;
145
146 protected:
148
152
153 std::map<std::string, size_t> m_cell_dofs_offsets;
154 std::map<std::string, size_t> m_edge_dofs_offsets;
155 std::map<std::string, size_t> m_vertex_dofs_offsets;
156 };
157
158 } // namespace DSL
159
160} // namespace HArDCore2D
161
162#endif
Definition discrete-space-descriptor.hpp:43
size_t numberOfLocalEdgeDofs() const
Definition discrete-space-descriptor.hpp:146
size_t numberOfLocalCellDofs() const
Definition discrete-space-descriptor.hpp:136
const Mesh & mesh() const
Definition discrete-space-descriptor.hpp:74
size_t numberOfLocalVertexDofs() const
Definition discrete-space-descriptor.hpp:156
Definition local-dof-table.hpp:10
DiscreteSpaceDescriptor & descriptor()
Definition local-dof-table.hpp:19
size_t numTotalDofsEdges() const
Returns the total number of vertex DOFs.
Definition local-dof-table.hpp:72
size_t dimensionCell(size_t iT) const
Returns the dimension of the local space on the cell of index iT (including faces,...
Definition local-dof-table.hpp:124
std::map< std::string, size_t > m_vertex_dofs_offsets
Definition local-dof-table.hpp:155
std::map< std::string, size_t > m_cell_dofs_offsets
Definition local-dof-table.hpp:153
size_t numberOfLocalEdgeDofs() const
Definition local-dof-table.hpp:37
size_t numberOfLocalVertexDofs(const std::string &dof_name) const
Definition local-dof-table.hpp:32
size_t m_n_local_vertex_dofs
Definition local-dof-table.hpp:151
size_t numberOfLocalVertexDofs() const
Definition local-dof-table.hpp:27
size_t localOffset(const Edge &E, const Vertex &V) const
Definition local-dof-table.cpp:36
size_t dimensionEdge(size_t iE) const
Returns the dimension of the local space on the edge of index iE (including vertices)
Definition local-dof-table.hpp:103
const Mesh & mesh() const
Definition local-dof-table.hpp:14
size_t dimensionVertex(const Vertex &V) const
Returns the dimension of the local space on the vertex V.
Definition local-dof-table.hpp:84
size_t dimensionVertex(size_t iV) const
Returns the dimension of the local space on the vertex of index iV.
Definition local-dof-table.hpp:90
DiscreteSpaceDescriptor m_descriptor
Definition local-dof-table.hpp:147
size_t numTotalDofsCells() const
Returns the total number of vertex DOFs.
Definition local-dof-table.hpp:78
size_t dimensionCellBoundary(const Cell &T) const
Returns the dimension of the local space on the boundary of T.
Definition local-dof-table.hpp:117
size_t numberOfLocalCellDofs(const std::string &dof_name) const
Definition local-dof-table.hpp:52
size_t dimension() const
Returns the dimension of the global space (all DOFs for all geometric entities)
Definition local-dof-table.hpp:58
size_t dimensionCell(const Cell &T) const
Returns the dimension of the local space on the cell T (including faces, edges and vertices)
Definition local-dof-table.hpp:109
size_t m_n_local_edge_dofs
Definition local-dof-table.hpp:150
size_t numTotalDofsVertices() const
Returns the total number of vertex DOFs.
Definition local-dof-table.hpp:66
size_t m_n_local_cell_dofs
Definition local-dof-table.hpp:149
size_t numberOfLocalEdgeDofs(const std::string &dof_name) const
Definition local-dof-table.hpp:42
const DiscreteSpaceDescriptor & descriptor() const
Definition local-dof-table.hpp:23
std::map< std::string, size_t > m_edge_dofs_offsets
Definition local-dof-table.hpp:154
size_t dimensionEdge(const Edge &E) const
Returns the dimension of the local space on the edge E (including vertices)
Definition local-dof-table.hpp:96
size_t numberOfLocalCellDofs() const
Definition local-dof-table.hpp:47
size_t dimensionCellBoundary(size_t iT) const
Returns the dimension of the local space on the boundary of T.
Definition local-dof-table.hpp:130
Definition Mesh2D.hpp:26
std::size_t n_vertices() const
number of vertices in the mesh.
Definition Mesh2D.hpp:60
std::size_t n_cells() const
number of cells in the mesh.
Definition Mesh2D.hpp:63
std::size_t n_edges() const
number of edges in the mesh.
Definition Mesh2D.hpp:61
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
Definition ddr-klplate.hpp:27