1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Transfers refinement levels such that slow transition between levels is
30 maintained. Used in meshWave.
36 \*---------------------------------------------------------------------------*/
38 #ifndef refinementData_H
39 #define refinementData_H
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class refinementData Declaration
54 \*---------------------------------------------------------------------------*/
60 //- Count which triggers refinement
61 label refinementCount_;
71 inline refinementData();
73 //- Construct from count
74 inline refinementData(const label refinementCount, const label count);
81 inline label refinementCount() const
83 return refinementCount_;
86 inline label& refinementCount()
88 return refinementCount_;
91 inline label count() const
101 inline bool isRefined() const
103 return count_ >= refinementCount_;
108 // Needed by FaceCellWave
110 //- Check whether origin has been changed at all or
111 // still contains original (invalid) value.
112 inline bool valid() const;
114 //- Check for identical geometrical data. Used for cyclics checking.
115 inline bool sameGeometry
118 const refinementData&,
122 //- Convert any absolute coordinates into relative to (patch)face
124 inline void leaveDomain
128 const label patchFaceI,
129 const point& faceCentre
132 //- Reverse of leaveDomain
133 inline void enterDomain
137 const label patchFaceI,
138 const point& faceCentre
141 //- Apply rotation matrix to any coordinates
142 inline void transform
148 //- Influence of neighbouring face.
149 inline bool updateCell
152 const label thisCellI,
153 const label neighbourFaceI,
154 const refinementData& neighbourInfo,
158 //- Influence of neighbouring cell.
159 inline bool updateFace
162 const label thisFaceI,
163 const label neighbourCellI,
164 const refinementData& neighbourInfo,
168 //- Influence of different value on same face.
169 inline bool updateFace
172 const label thisFaceI,
173 const refinementData& neighbourInfo,
179 // Needed for List IO
180 inline bool operator==(const refinementData&) const;
182 inline bool operator!=(const refinementData&) const;
185 // IOstream Operators
187 friend Ostream& operator<<(Ostream&, const refinementData&);
188 friend Istream& operator>>(Istream&, refinementData&);
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 } // End namespace Foam
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 #include "refinementDataI.H"
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204 // ************************************************************************* //