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/>.
25 Foam::topoDistanceData
28 For use with FaceCellWave. Determines topological distance to starting faces
34 \*---------------------------------------------------------------------------*/
36 #ifndef topoDistanceData_H
37 #define topoDistanceData_H
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class topoDistanceData Declaration
52 \*---------------------------------------------------------------------------*/
54 class topoDistanceData
70 inline topoDistanceData();
72 //- Construct from count
73 inline topoDistanceData
85 inline label data() const
89 inline label distance() const
95 // Needed by FaceCellWave
97 //- Check whether origin has been changed at all or
98 // still contains original (invalid) value.
99 template<class TrackingData>
100 inline bool valid(TrackingData& td) const;
102 //- Check for identical geometrical data. Used for cyclics checking.
103 template<class TrackingData>
104 inline bool sameGeometry
107 const topoDistanceData&,
112 //- Convert any absolute coordinates into relative to (patch)face
114 template<class TrackingData>
115 inline void leaveDomain
119 const label patchFaceI,
120 const point& faceCentre,
124 //- Reverse of leaveDomain
125 template<class TrackingData>
126 inline void enterDomain
130 const label patchFaceI,
131 const point& faceCentre,
135 //- Apply rotation matrix to any coordinates
136 template<class TrackingData>
137 inline void transform
144 //- Influence of neighbouring face.
145 template<class TrackingData>
146 inline bool updateCell
149 const label thisCellI,
150 const label neighbourFaceI,
151 const topoDistanceData& neighbourInfo,
156 //- Influence of neighbouring cell.
157 template<class TrackingData>
158 inline bool updateFace
161 const label thisFaceI,
162 const label neighbourCellI,
163 const topoDistanceData& neighbourInfo,
168 //- Influence of different value on same face.
169 template<class TrackingData>
170 inline bool updateFace
173 const label thisFaceI,
174 const topoDistanceData& neighbourInfo,
179 //- Same (like operator==)
180 template<class TrackingData>
181 inline bool equal(const topoDistanceData&, TrackingData& td) const;
185 // Needed for List IO
186 inline bool operator==(const topoDistanceData&) const;
188 inline bool operator!=(const topoDistanceData&) const;
191 // IOstream Operators
193 friend Ostream& operator<<(Ostream&, const topoDistanceData&);
194 friend Istream& operator>>(Istream&, topoDistanceData&);
198 //- Data associated with topoDistanceData type are contiguous
200 inline bool contiguous<topoDistanceData>()
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 } // End namespace Foam
210 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 #include "topoDistanceDataI.H"
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 // ************************************************************************* //