FreeFOAM The Cross-Platform CFD Toolkit
tetCell.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/FixedList.H>
43 #include <OpenFOAM/triFace.H>
44 #include <OpenFOAM/edge.H>
45 #include <OpenFOAM/pointField.H>
46 #include <OpenFOAM/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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #include <OpenFOAM/tetCellI.H>
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************ vim: set sw=4 sts=4 et: ************************ //