1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 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
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 Smoothed delta which takes a given simple geometric delta and applies
29 smoothing to it such that the ratio of deltas between two cells is no
30 larger than a specified amount, typically 1.15.
35 \*---------------------------------------------------------------------------*/
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class smoothDelta Declaration
49 \*---------------------------------------------------------------------------*/
57 autoPtr<LESdelta> geometricDelta_;
58 scalar maxDeltaRatio_;
61 // Private Member Functions
63 //- Disallow default bitwise copy construct and assignment
64 smoothDelta(const smoothDelta&);
65 void operator=(const smoothDelta&);
67 // Calculate the delta values
70 //- Private member class used by mesh-wave to propagate the delta-ratio
75 // Private Member Functions
77 //- Update. Gets information from neighbouring face/cell and
78 // uses this to update itself (if nessecary) and return true.
89 // Static data members
92 static scalar maxDeltaRatio;
100 //- Construct from origin, yStar, distance
101 inline deltaData(const scalar delta);
114 // Needed by FaceCellWave
116 //- Check whether origin has been changed at all or
117 // still contains original (invalid) value.
118 inline bool valid() const;
120 //- Check for identical geometrical data.
121 // Used for cyclics checking.
122 inline bool sameGeometry
129 //- Convert any absolute coordinates into relative to
130 // (patch)face centre
131 inline void leaveDomain
135 const label patchFaceI,
136 const point& faceCentre
139 //- Reverse of leaveDomain
140 inline void enterDomain
144 const label patchFaceI,
145 const point& faceCentre
148 //- Apply rotation matrix to any coordinates
149 inline void transform
155 //- Influence of neighbouring face.
156 inline bool updateCell
159 const label thisCellI,
160 const label neighbourFaceI,
161 const deltaData& neighbourInfo,
165 //- Influence of neighbouring cell.
166 inline bool updateFace
169 const label thisFaceI,
170 const label neighbourCellI,
171 const deltaData& neighbourInfo,
175 //- Influence of different value on same face.
176 inline bool updateFace
179 const label thisFaceI,
180 const deltaData& neighbourInfo,
186 // Needed for List IO
187 inline bool operator==(const deltaData&) const;
189 inline bool operator!=(const deltaData&) const;
191 // IOstream Operators
193 friend Ostream& operator<<
196 const deltaData& wDist
199 return os << wDist.delta_;
202 friend Istream& operator>>(Istream& is, deltaData& wDist)
204 return is >> wDist.delta_;
211 const polyMesh& mesh,
212 const volScalarField& delta,
213 DynamicList<label>& changedFaces,
214 DynamicList<deltaData>& changedFacesInfo
220 //- Runtime type information
226 //- Construct from name, mesh and IOdictionary
236 virtual ~smoothDelta()
242 //- Read the LESdelta dictionary
243 virtual void read(const dictionary&);
246 virtual void correct();
250 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
252 } // End namespace Foam
254 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
256 #include "smoothDeltaDeltaDataI.H"
258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
262 // ************************************************************************* //