1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 //- Raw geometric delta, to be used in smoothing
59 autoPtr<LESdelta> geometricDelta_;
62 scalar maxDeltaRatio_;
65 // Private Member Functions
67 //- Disallow default bitwise copy construct and assignment
68 smoothDelta(const smoothDelta&);
69 void operator=(const smoothDelta&);
71 // Calculate the delta values
74 //- Private member class used by mesh-wave to propagate the delta-ratio
79 // Private Member Functions
81 //- Update. Gets information from neighbouring face/cell and
82 // uses this to update itself (if nessecary) and return true.
93 // Static data members
96 static scalar maxDeltaRatio;
104 //- Construct from origin, yStar, distance
105 inline deltaData(const scalar delta);
118 // Needed by FaceCellWave
120 //- Check whether origin has been changed at all or
121 // still contains original (invalid) value.
122 inline bool valid() const;
124 //- Check for identical geometrical data.
125 // Used for cyclics checking.
126 inline bool sameGeometry
133 //- Convert any absolute coordinates into relative to
134 // (patch)face centre
135 inline void leaveDomain
139 const label patchFaceI,
140 const point& faceCentre
143 //- Reverse of leaveDomain
144 inline void enterDomain
148 const label patchFaceI,
149 const point& faceCentre
152 //- Apply rotation matrix to any coordinates
153 inline void transform
159 //- Influence of neighbouring face.
160 inline bool updateCell
163 const label thisCellI,
164 const label neighbourFaceI,
165 const deltaData& neighbourInfo,
169 //- Influence of neighbouring cell.
170 inline bool updateFace
173 const label thisFaceI,
174 const label neighbourCellI,
175 const deltaData& neighbourInfo,
179 //- Influence of different value on same face.
180 inline bool updateFace
183 const label thisFaceI,
184 const deltaData& neighbourInfo,
190 // Needed for List IO
191 inline bool operator==(const deltaData&) const;
193 inline bool operator!=(const deltaData&) const;
195 // IOstream Operators
197 friend Ostream& operator<<
200 const deltaData& wDist
203 return os << wDist.delta_;
206 friend Istream& operator>>(Istream& is, deltaData& wDist)
208 return is >> wDist.delta_;
215 const polyMesh& mesh,
216 const volScalarField& delta,
217 DynamicList<label>& changedFaces,
218 DynamicList<deltaData>& changedFacesInfo
224 //- Runtime type information
230 //- Construct from name, mesh and IOdictionary
240 virtual ~smoothDelta()
246 //- Read the LESdelta dictionary
247 virtual void read(const dictionary&);
250 virtual void correct();
254 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
256 } // End namespace Foam
258 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
260 #include "smoothDeltaDeltaDataI.H"
262 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
266 // ************************************************************************* //