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
25 \*---------------------------------------------------------------------------*/
27 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
35 // Update this with w2 if applicable
36 inline bool smoothDelta::deltaData::update
38 const smoothDelta::deltaData& w2,
43 if (!valid() || (delta_ < VSMALL))
45 // My delta not set. Take over neighbour.
46 delta_ = w2.delta()/scale;
48 // Something changed. Let caller know.
51 else if (w2.delta() > (1 + tol)*scale*delta_)
53 // Neighbour is too big for me. Up my delta.
54 delta_ = w2.delta()/scale;
56 // Something changed. Let caller know.
61 // Neighbour is not too big for me or change is too small
68 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
71 inline smoothDelta::deltaData::deltaData()
77 // Construct from components
78 inline smoothDelta::deltaData::deltaData(const scalar delta)
84 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
86 inline bool smoothDelta::deltaData::valid() const
88 return delta_ > -SMALL;
92 // Checks for cyclic faces
93 inline bool smoothDelta::deltaData::sameGeometry
104 inline void smoothDelta::deltaData::leaveDomain
114 inline void smoothDelta::deltaData::transform
122 // Update absolute geometric quantities.
123 inline void smoothDelta::deltaData::enterDomain
133 // Update this (cellI) with face information.
134 inline bool smoothDelta::deltaData::updateCell
139 const deltaData& neighbourWallInfo,
143 // Take over info from face if more than deltaRatio larger.
144 return update(neighbourWallInfo, maxDeltaRatio, tol);
148 // Update this (face) with cell information.
149 inline bool smoothDelta::deltaData::updateFace
154 const deltaData& neighbourWallInfo,
158 // Take over information from cell without any scaling (scale = 1.0)
159 return update(neighbourWallInfo, 1.0, tol);
163 // Update this (face) with coupled face information.
164 inline bool smoothDelta::deltaData::updateFace
168 const deltaData& neighbourWallInfo,
172 // Take over information from coupled face without any scaling (scale = 1.0)
173 return update(neighbourWallInfo, 1.0, tol);
177 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
179 inline bool smoothDelta::deltaData::operator==
184 return delta_ == rhs.delta();
188 inline bool smoothDelta::deltaData::operator!=
193 return !(*this == rhs);
197 // ************************************************************************* //
199 } // End namespace Foam
201 // ************************************************************************* //