tetCell.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::tetCell
26 
27 Description
28  A tetrahedral cell primitive.
29 
30  It is important that the ordering of edges is the same for a tetrahedron
31  class, a tetrahedron cell shape model and a tetCell
32 
33 SourceFiles
34  tetCell.C
35  tetCellI.H
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef tetCell_H
40 #define tetCell_H
41 
42 #include "FixedList.H"
43 #include "triFace.H"
44 #include "edge.H"
45 #include "pointField.H"
46 #include "tetPointRef.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 class cellShape;
54 
55 /*---------------------------------------------------------------------------*\
56  class tetCell Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class tetCell
60 :
61  public FixedList<label, 4>
62 {
63 
64 public:
65 
66  // Constructors
67 
68  //- Construct null
69  inline tetCell();
70 
71  //- Construct from four points
72  inline tetCell
73  (
74  const label a,
75  const label b,
76  const label c,
77  const label d
78  );
79 
80  //- Construct from FixedList
81  inline tetCell(const FixedList<label, 4>&);
82 
83  //- Construct from Istream
84  inline tetCell(Istream&);
85 
86 
87  // Member Functions
88 
89  // Access
90 
91  //- Return i-th face
92  inline triFace face(const label facei) const;
93 
94  //- Return first face adjacent to the given edge
95  inline label edgeFace(const label edgeI) const;
96 
97  //- Return face adjacent to the given face sharing the same edge
98  inline label edgeAdjacentFace
99  (
100  const label edgeI,
101  const label facei
102  ) const;
103 
104  //- Return i-th edge
105  inline edge tetEdge(const label edgeI) const;
106 
107 
108  // Operations
109 
110  //- Return tet shape cell
111  cellShape tetCellShape() const;
112 
113  //- Return the tetrahedron
114  inline tetPointRef tet(const pointField&) const;
115 };
116 
117 
118 // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
119 
120 //- Data associated with the type are contiguous
121 template<>
122 inline bool contiguous<tetCell>() {return true;}
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #include "tetCellI.H"
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
A tetrahedron primitive.
Definition: tetrahedron.H:61
tetCell()
Construct null.
Definition: tetCellI.H:32
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
label edgeAdjacentFace(const label edgeI, const label facei) const
Return face adjacent to the given face sharing the same edge.
Definition: tetCellI.H:112
tetPointRef tet(const pointField &) const
Return the tetrahedron.
Definition: tetCellI.H:170
A 1D vector of objects of type <T> with a fixed size <Size>.
Definition: FixedList.H:54
An analytical geometric cellShape.
Definition: cellShape.H:69
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
Definition: createFields.H:27
const dimensionedScalar c
Speed of light in a vacuum.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:58
A triangular face using a FixedList of labels corresponding to mesh vertices.
Definition: triFace.H:68
bool contiguous< tetCell >()
Data associated with the type are contiguous.
Definition: tetCell.H:121
edge tetEdge(const label edgeI) const
Return i-th edge.
Definition: tetCellI.H:149
A tetrahedral cell primitive.
Definition: tetCell.H:58
label edgeFace(const label edgeI) const
Return first face adjacent to the given edge.
Definition: tetCellI.H:91
triFace face(const label facei) const
Return i-th face.
Definition: tetCellI.H:65
cellShape tetCellShape() const
Return tet shape cell.
Definition: tetCell.C:33
Namespace for OpenFOAM.