Reference cells
The reference cells are used to i) define grid cells, ii) define shape functions, and iii) define quadrature rules. The numbering of vertices, edges, faces are visualized below. See also FerriteViz.elementinfo
.
AbstractRefShape
subtypes
Ferrite.AbstractRefShape
— TypeAbstractRefShape{refdim}
Supertype for all reference shapes, with reference dimension refdim
. Reference shapes are used to define grid cells, shape functions, and quadrature rules. Currently existing reference shapes are: RefLine
, RefTriangle
, RefQuadrilateral
, RefTetrahedron
, RefHexahedron
, RefPrism
.
Ferrite.RefLine
— TypeRefLine <: AbstractRefShape{1}
Reference line/interval, reference dimension 1.
----------------+--------------------
Vertex numbers: | Vertex coordinates:
1-------2 | v1: 𝛏 = (-1.0,)
--> ξ₁ | v2: 𝛏 = ( 1.0,)
----------------+--------------------
Face numbers: | Face identifiers:
1-------2 | f1: (v1,)
| f2: (v2,)
----------------+--------------------
Ferrite.RefTriangle
— TypeRefTriangle <: AbstractRefShape{2}
Reference triangle, reference dimension 2.
----------------+--------------------
Vertex numbers: | Vertex coordinates:
2 |
| \ | v1: 𝛏 = (1.0, 0.0)
| \ | v2: 𝛏 = (0.0, 1.0)
ξ₂^ | \ | v3: 𝛏 = (0.0, 0.0)
| 3-------1 |
+--> ξ₁ |
----------------+--------------------
Face numbers: | Face identifiers:
+ |
| \ | f1: (v1, v2)
2 1 | f2: (v2, v3)
| \ | f3: (v3, v1)
+---3---+ |
----------------+--------------------
Ferrite.RefQuadrilateral
— TypeRefQuadrilateral <: AbstractRefShape{2}
Reference quadrilateral, reference dimension 2.
----------------+---------------------
Vertex numbers: | Vertex coordinates:
4-------3 |
| | | v1: 𝛏 = (-1.0, -1.0)
| | | v2: 𝛏 = ( 1.0, -1.0)
ξ₂^ | | | v3: 𝛏 = ( 1.0, 1.0)
| 1-------2 | v4: 𝛏 = (-1.0, 1.0)
+--> ξ₁ |
----------------+---------------------
Face numbers: | Face identifiers:
+---3---+ | f1: (v1, v2)
| | | f2: (v2, v3)
4 2 | f3: (v3, v4)
| | | f4: (v4, v1)
+---1---+ |
----------------+---------------------
Ferrite.RefTetrahedron
— TypeRefTetrahedron <: AbstractRefShape{3}
Reference tetrahedron, reference dimension 3.
---------------------------------------+-------------------------
Vertex numbers: | Vertex coordinates:
4 4 |
^ ξ₃ / \ /| \ | v1: 𝛏 = (0.0, 0.0, 0.0)
| / \ / | \ | v2: 𝛏 = (1.0, 0.0, 0.0)
+-> ξ₂ / \ / 1___ \ | v3: 𝛏 = (0.0, 1.0, 0.0)
/ / __--3 / / __‾-3 | v4: 𝛏 = (0.0, 0.0, 1.0)
ξ₁ 2 __--‾‾ 2/__--‾‾ |
---------------------------------------+-------------------------
Edge numbers: | Edge identifiers:
+ + | e1: (v1, v2)
/ \ /| \ | e2: (v2, v3)
5 / \ 6 5 / |4 \ 6 | e3: (v3, v1)
/ \ / +__3 \ | e4: (v1, v4)
/ __--+ / /1 __‾-+ | e5: (v2, v4)
+ __--‾‾2 +/__--‾‾2 | e6: (v3, v4)
---------------------------------------+-------------------------
Face numbers: | Face identifiers:
+ + |
/ \ /| \ | f1: (v1, v3, v2)
/ \ / | 4 \ | f2: (v1, v2, v4)
/ 3 \ /2 +___ \ | f3: (v2, v3, v4)
/ __--+ / / 1 __‾-+ | f4: (v1, v4, v3)
+ __--‾‾ +/__--‾‾ |
---------------------------------------+-------------------------
Ferrite.RefHexahedron
— TypeRefHexahedron <: AbstractRefShape{3}
Reference hexahedron, reference dimension 3.
-----------------------------------------+----------------------------
Vertex numbers: | Vertex coordinates:
5--------8 5--------8 | v1: 𝛏 = (-1.0, -1.0, -1.0)
/ /| /| | | v2: 𝛏 = ( 1.0, -1.0, -1.0)
/ / | / | | | v3: 𝛏 = ( 1.0, 1.0, -1.0)
^ ξ₃ 6--------7 | 6 | | | v4: 𝛏 = (-1.0, 1.0, -1.0)
| | | 4 | 1--------4 | v5: 𝛏 = (-1.0, -1.0, 1.0)
+-> ξ₂ | | / | / / | v6: 𝛏 = ( 1.0, -1.0, 1.0)
/ | |/ |/ / | v7: 𝛏 = ( 1.0, 1.0, 1.0)
ξ₁ 2--------3 2--------3 | v8: 𝛏 = (-1.0, 1.0, 1.0)
-----------------------------------------+-----------------------------
Edge numbers: | Edge identifiers:
+----8---+ +----8---+ |
5/ /| 5/| | | e1: (v1, v2), e2: (v2, v3)
/ 7/ |12 / |9 12| | e3: (v3, v4), e4: (v4, v1)
+----6---+ | + | | | e5: (v5, v6), e6: (v6, v7)
| | + | +---4----+ | e7: (v7, v8), e8: (v8, v5)
10| 11| / 10| /1 / | e9: (v1, v5), e10: (v2, v6)
| |/3 |/ /3 | e11: (v3, v7), e12: (v4, v8)
+---2----+ +---2----+ |
-----------------------------------------+-----------------------------
Face numbers: | Face identifiers:
+--------+ +--------+ |
/ 6 /| /| | | f1: (v1, v4, v3, v2)
/ / | / | 5 | | f2: (v1, v2, v6, v5)
+--------+ 4| + | | | f3: (v2, v3, v7, v6)
| | + |2 +--------+ | f4: (v3, v4, v8, v7)
| 3 | / | / / | f5: (v1, v5, v8, v4)
| |/ |/ 1 / | f6: (v5, v6, v7, v8)
+--------+ +--------+ |
-----------------------------------------+-----------------------------
Ferrite.RefPrism
— TypeRefPrism <: AbstractRefShape{3}
Reference prism, reference dimension 3.
-----------------------------------------+----------------------------
Vertex numbers: | Vertex coordinates:
4-------/6 4--------6 |
/ / | /| | | v1: 𝛏 = (0.0, 0.0, 0.0)
/ / | / | | | v2: 𝛏 = (1.0, 0.0, 0.0)
^ ξ₃ 5 / | 5 | | | v3: 𝛏 = (0.0, 1.0, 0.0)
| | /3 | 1-------/3 | v4: 𝛏 = (0.0, 0.0, 1.0)
+-> ξ₂ | / | / / | v5: 𝛏 = (1.0, 0.0, 1.0)
/ | / |/ / | v6: 𝛏 = (0.0, 1.0, 1.0)
ξ₁ 2 / 2 / |
-----------------------------------------+----------------------------
Edge numbers: | Edge identifiers:
+---8---/+ +---8----+ |
7/ / | 7/| | | e1: (v2, v1), e2: (v1, v3)
/ / 9 |6 / |3 |6 | e3: (v1, v4), e4: (v3, v2)
+ / | + | | | e5: (v2, v5), e6: (v3, v6)
| /+ | +--2----/+ | e7: (v4, v5), e8: (v4, v6)
5| / 5| /1 / | e9: (v6, v5)
| / 4 |/ / 4 |
+ / + / |
-----------------------------------------+----------------------------
Face numbers: | Face identifiers:
+-------/+ +--------+ |
/ 5 / | /| | | f1: (v1, v3, v2)
/ / | / | 3 | | f2: (v1, v2, v5, v4)
+ / | + | | | f3: (v3, v1, v4, v6)
| 4 /+ |2 +-------/+ | f4: (v2, v3, v6, v5)
| / | / 1 / | f5: (v4, v5, v6)
| / |/ / |
+ / + / |
-----------------------------------------+----------------------------
Required methods to implement for all subtypes of AbstractRefShape
to define a new reference shape
Ferrite.reference_vertices
— Methodreference_vertices(::Type{<:AbstractRefShape})
reference_vertices(::AbstractCell)
Returns a tuple of integers containing the local node indices corresponding to the vertices (i.e. corners or endpoints) of the cell.
Ferrite.reference_edges
— Methodreference_edges(::Type{<:AbstractRefShape})
reference_edges(::AbstractCell)
Returns a tuple of 2-tuples containing the ordered local node indices (corresponding to the vertices) that define an edge.
Ferrite.reference_faces
— Methodreference_faces(::Type{<:AbstractRefShape})
reference_faces(::AbstractCell)
Returns a tuple of n-tuples containing the ordered local node indices (corresponding to the vertices) that define a face.
which automatically defines
Ferrite.reference_facets
— MethodFerrite.reference_facets(::Type{<:AbstractRefShape})
Ferrite.reference_facets(::AbstractCell)
Returns a tuple of n-tuples containing the ordered local node indices (corresponding to the vertices) that define a facet.
See also reference_vertices
, reference_edges
, and reference_faces
.
Applicable methods to AbstractRefShape
s
Ferrite.getrefdim
— MethodFerrite.getrefdim(RefShape::Type{<:AbstractRefShape})
Get the dimension of the reference shape