BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
meshtools.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef BELFEM_ElementTypeS_HPP
13#define BELFEM_ElementTypeS_HPP
14#include "typedefs.hpp"
15#include "cl_Cell.hpp"
16#include "Mesh_Enums.hpp"
17#include "cl_Node.hpp"
18
19namespace belfem
20{
21 namespace mesh
22 {
23 // forward declarations for the thin-shell layer helpers below.
24 // Node is also forward-declared here (even though cl_Node.hpp is
25 // included above) because cl_Node.hpp itself re-includes this
26 // header, so the include guard can leave Node incomplete when this
27 // header is read from inside cl_Node.hpp's include chain.
28 class Node ;
29 class Element ;
30 class Edge ;
31
32//------------------------------------------------------------------------------
33
34 unsigned int
35 number_of_nodes( const enum ElementType aElementType );
36
37//------------------------------------------------------------------------------
38
39 unsigned int
40 number_of_edges( const enum ElementType aElementType );
41//------------------------------------------------------------------------------
42
43 unsigned int
44 number_of_corner_nodes( const enum ElementType aElementType );
45
46//------------------------------------------------------------------------------
47
48 unsigned int
49 number_of_facets( const enum ElementType aElementType );
50
51//------------------------------------------------------------------------------
52
61 unsigned int
62 bottom_facet_index( const enum ElementType aElementType );
63
64//------------------------------------------------------------------------------
65
74 unsigned int
75 top_facet_index( const enum ElementType aElementType );
76
77//------------------------------------------------------------------------------
78
79 unsigned int
80 number_of_faces( const enum ElementType aElementType );
81
82//------------------------------------------------------------------------------
83
85 interpolation_order( const enum ElementType aElementType );
86
87//------------------------------------------------------------------------------
88
89 unsigned int
90 interpolation_order_numeric( const enum ElementType aElementType );
91
92//------------------------------------------------------------------------------
93
95 geometry_type( const enum ElementType aElementType );
96
97//------------------------------------------------------------------------------
98
99 int
100 dimension( const enum GeometryType aGeometryType );
101
102//------------------------------------------------------------------------------
103
104 int
105 dimension( const enum ElementType aElementType );
106
107//------------------------------------------------------------------------------
108
110 element_type_from_gmsh( const int aGmshNumber );
111
112//------------------------------------------------------------------------------
113
114 int
115 gmsh_from_element_type( const ElementType aElementType );
116
117//------------------------------------------------------------------------------
118
120 linear_element_type( const ElementType aElementType );
121
122//------------------------------------------------------------------------------
123
126 const ElementType aElementType,
127 const unsigned int aFacetIndex );
128
129
130//------------------------------------------------------------------------------
131
132 uint
134 const ElementType aElementType,
135 const uint aFacetNumber );
136
137//------------------------------------------------------------------------------
138
139 uint
140 number_of_nedelec_dofs( const ElementType aElementType );
141
142//------------------------------------------------------------------------------
143
145 element_type_from_numnodes( const uint aDimension, const uint aNumNodes, const bool aAsThinshell = false );
146
147//------------------------------------------------------------------------------
148
149 void
150 get_bottom_nodes( Element * aElement, Cell< Node * > & aNodes );
151
152 void
153 get_top_nodes( Element * aElement, Cell< Node * > & aNodes );
154
155 void
156 get_bottom_edges( Element * aElement, Cell< Edge * > & aEdges );
157
158 void
159 get_top_edges( Element * aElement, Cell< Edge * > & aEdges );
160
161//------------------------------------------------------------------------------
162 }
163}
164#endif //BELFEM_ElementTypeS_HPP
Special Edge class for NEDELEC-Type elements.
Definition cl_Edge.hpp:30
Lagrange Element baseclass.
Definition cl_Element.hpp:35
Definition cl_Node.hpp:30
Definition cl_EF_EdgeFunction.hpp:17
ElementType element_type_from_gmsh(const int aGmshNumber)
Definition meshtools.cpp:444
void get_bottom_edges(Element *aElement, Cell< Edge * > &aEdges)
Definition meshtools.cpp:1421
unsigned int top_facet_index(const enum ElementType aElementType)
Facet index of the "upper" face of a thin-shell element (the face whose outward normal points away fr...
Definition meshtools.cpp:724
ElementType element_type_of_facet(const ElementType aElementType, const unsigned int aFacetIndex)
Definition meshtools.cpp:815
void get_top_edges(Element *aElement, Cell< Edge * > &aEdges)
Definition meshtools.cpp:1462
unsigned int bottom_facet_index(const enum ElementType aElementType)
Facet index of the "lower" face of a thin-shell element (the face whose outward normal points away fr...
Definition meshtools.cpp:697
unsigned int number_of_edges(const enum ElementType aElementType)
Definition meshtools.cpp:140
int dimension(const enum GeometryType aGeometryType)
Definition meshtools.cpp:401
void get_top_nodes(Element *aElement, Cell< Node * > &aNodes)
Definition meshtools.cpp:1387
ElementType linear_element_type(const ElementType aElementType)
Definition meshtools.cpp:519
unsigned int number_of_faces(const enum ElementType aElementType)
Definition meshtools.cpp:750
unsigned int interpolation_order_numeric(const enum ElementType aElementType)
Definition meshtools.cpp:266
belfem::InterpolationOrder interpolation_order(const enum ElementType aElementType)
Definition meshtools.cpp:210
int gmsh_from_element_type(const ElementType aElementType)
Definition meshtools.cpp:493
ElementType element_type_from_numnodes(const uint aDimension, const uint aNumNodes, const bool aAsThinshell)
Definition meshtools.cpp:1105
uint number_of_orientations(const ElementType aElementType, const uint aFacetNumber)
Definition meshtools.cpp:950
uint number_of_nedelec_dofs(const ElementType aElementType)
Definition meshtools.cpp:1015
belfem::GeometryType geometry_type(const enum ElementType aElementType)
Definition meshtools.cpp:331
unsigned int number_of_nodes(const enum ElementType aElementType)
Definition meshtools.cpp:25
unsigned int number_of_facets(const enum ElementType aElementType)
Definition meshtools.cpp:650
unsigned int number_of_corner_nodes(const enum ElementType aElementType)
Definition meshtools.cpp:601
void get_bottom_nodes(Element *aElement, Cell< Node * > &aNodes)
Definition meshtools.cpp:1296
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
ElementType
Element types.
Definition Mesh_Enums.hpp:27
InterpolationOrder
Definition Mesh_Enums.hpp:85
GeometryType
Definition Mesh_Enums.hpp:70