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 Smoothed delta which takes a given simple geometric delta and applies
30 smoothing to it such that the ratio of deltas between two cells is no
31 larger than a specified amount, typically 1.15.
36 \*---------------------------------------------------------------------------*/
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class smoothDelta Declaration
50 \*---------------------------------------------------------------------------*/
58 autoPtr<LESdelta> geometricDelta_;
59 scalar maxDeltaRatio_;
62 // Private Member Functions
64 //- Disallow default bitwise copy construct and assignment
65 smoothDelta(const smoothDelta&);
66 void operator=(const smoothDelta&);
68 // Calculate the delta values
71 //- Private member class used by mesh-wave to propagate the delta-ratio
76 // Private Member Functions
78 //- Update. Gets information from neighbouring face/cell and
79 // uses this to update itself (if nessecary) and return true.
90 // Static data members
93 static scalar maxDeltaRatio;
101 //- Construct from origin, yStar, distance
102 inline deltaData(const scalar delta);
115 // Needed by FaceCellWave
117 //- Check whether origin has been changed at all or
118 // still contains original (invalid) value.
119 inline bool valid() const;
121 //- Check for identical geometrical data.
122 // Used for cyclics checking.
123 inline bool sameGeometry
130 //- Convert any absolute coordinates into relative to
131 // (patch)face centre
132 inline void leaveDomain
136 const label patchFaceI,
137 const point& faceCentre
140 //- Reverse of leaveDomain
141 inline void enterDomain
145 const label patchFaceI,
146 const point& faceCentre
149 //- Apply rotation matrix to any coordinates
150 inline void transform
156 //- Influence of neighbouring face.
157 inline bool updateCell
160 const label thisCellI,
161 const label neighbourFaceI,
162 const deltaData& neighbourInfo,
166 //- Influence of neighbouring cell.
167 inline bool updateFace
170 const label thisFaceI,
171 const label neighbourCellI,
172 const deltaData& neighbourInfo,
176 //- Influence of different value on same face.
177 inline bool updateFace
180 const label thisFaceI,
181 const deltaData& neighbourInfo,
187 // Needed for List IO
188 inline bool operator==(const deltaData&) const;
190 inline bool operator!=(const deltaData&) const;
192 // IOstream Operators
194 friend Ostream& operator<<
197 const deltaData& wDist
200 return os << wDist.delta_;
203 friend Istream& operator>>(Istream& is, deltaData& wDist)
205 return is >> wDist.delta_;
212 const polyMesh& mesh,
213 const volScalarField& delta,
214 DynamicList<label>& changedFaces,
215 DynamicList<deltaData>& changedFacesInfo
221 //- Runtime type information
227 //- Construct from name, mesh and IOdictionary
237 virtual ~smoothDelta()
243 //- Read the LESdelta dictionary
244 virtual void read(const dictionary&);
247 virtual void correct();
251 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
253 } // End namespace Foam
255 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
257 #include "smoothDeltaDeltaDataI.H"
259 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
263 // ************************************************************************* //