1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
28 Holds information regarding type of cell. Used in inside/outside
29 determination in cellClassification.
35 \*---------------------------------------------------------------------------*/
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class cellInfo Declaration
53 \*---------------------------------------------------------------------------*/
61 // Private Member Functions
63 //- Update current cell/face type with neighbouring
64 // type. Return true if information needs to propagate,
66 template<class TrackingData>
70 const label thisFaceI,
71 const label thisCellI,
72 const label neighbourFaceI,
73 const label neighbourCellI,
84 //- Construct from cType
85 inline cellInfo(const label);
88 inline cellInfo(const cellInfo&);
95 inline label type() const
101 // Needed by meshWave
103 //- Check whether origin has been changed at all or
104 // still contains original (invalid) value.
105 template<class TrackingData>
106 inline bool valid(TrackingData& td) const;
108 //- Check for identical geometrical data. Used for cyclics checking.
109 template<class TrackingData>
110 inline bool sameGeometry
118 //- Convert any absolute coordinates into relative to (patch)face
120 template<class TrackingData>
121 inline void leaveDomain
124 const polyPatch& patch,
125 const label patchFaceI,
126 const point& faceCentre,
130 //- Reverse of leaveDomain
131 template<class TrackingData>
132 inline void enterDomain
135 const polyPatch& patch,
136 const label patchFaceI,
137 const point& faceCentre,
141 //- Apply rotation matrix to any coordinates
142 template<class TrackingData>
143 inline void transform
146 const tensor& rotTensor,
150 //- Influence of neighbouring face.
151 template<class TrackingData>
152 inline bool updateCell
155 const label thisCellI,
156 const label neighbourFaceI,
157 const cellInfo& neighbourInfo,
162 //- Influence of neighbouring cell.
163 template<class TrackingData>
164 inline bool updateFace
167 const label thisFaceI,
168 const label neighbourCellI,
169 const cellInfo& neighbourInfo,
174 //- Influence of different value on same face.
175 template<class TrackingData>
176 inline bool updateFace
179 const label thisFaceI,
180 const cellInfo& neighbourInfo,
185 //- Same (like operator==)
186 template<class TrackingData>
187 inline bool equal(const cellInfo&, TrackingData& td) const;
191 //Note: Used to determine whether to call update.
192 inline bool operator==(const cellInfo&) const;
194 inline bool operator!=(const cellInfo&) const;
197 // IOstream Operators
199 friend Ostream& operator<<(Ostream&, const cellInfo&);
200 friend Istream& operator>>(Istream&, cellInfo&);
204 //- Data associated with cellInfo type are contiguous
206 inline bool contiguous<cellInfo>()
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 } // End namespace Foam
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 #include "cellInfoI.H"
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 // ************************************************************************* //