1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. 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,
69 const label thisFaceI,
70 const label thisCellI,
71 const label neighbourFaceI,
72 const label neighbourCellI
82 //- Construct from cType
83 inline cellInfo(const label);
86 inline cellInfo(const cellInfo&);
93 inline label type() const
101 //- Check whether origin has been changed at all or
102 // still contains original (invalid) value.
103 inline bool valid() const;
105 //- Check for identical geometrical data. Used for cyclics checking.
106 inline bool sameGeometry
113 //- Convert any absolute coordinates into relative to (patch)face
115 inline void leaveDomain
118 const polyPatch& patch,
119 const label patchFaceI,
120 const point& faceCentre
123 //- Reverse of leaveDomain
124 inline void enterDomain
127 const polyPatch& patch,
128 const label patchFaceI,
129 const point& faceCentre
132 //- Apply rotation matrix to any coordinates
133 inline void transform
136 const tensor& rotTensor
139 //- Influence of neighbouring face.
140 inline bool updateCell
143 const label thisCellI,
144 const label neighbourFaceI,
145 const cellInfo& neighbourInfo,
149 //- Influence of neighbouring cell.
150 inline bool updateFace
153 const label thisFaceI,
154 const label neighbourCellI,
155 const cellInfo& neighbourInfo,
159 //- Influence of different value on same face.
160 inline bool updateFace
163 const label thisFaceI,
164 const cellInfo& neighbourInfo,
170 //Note: Used to determine whether to call update.
171 inline bool operator==(const cellInfo&) const;
173 inline bool operator!=(const cellInfo&) const;
176 // IOstream Operators
178 friend Ostream& operator<<(Ostream&, const cellInfo&);
179 friend Istream& operator>>(Istream&, cellInfo&);
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 #include "cellInfoI.H"
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 // ************************************************************************* //