1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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 Wall distance calculation. Like wallDist but also transports extra
29 data (template argument).
31 Used for e.g reflection vector calculation or vanDriest damping.
33 Templated on two parameters:
34 - TransferType: type of overall data transported
35 (e.g. wallPointData\<vector\>)
40 \*---------------------------------------------------------------------------*/
42 #ifndef wallDistData_H
43 #define wallDistData_H
45 #include "cellDistFuncs.H"
46 #include "volFields.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 /*---------------------------------------------------------------------------*\
54 Class wallDistData Declaration
55 \*---------------------------------------------------------------------------*/
57 template<class TransferType>
60 public volScalarField,
66 typedef typename TransferType::dataType Type;
69 // Private Member Data
71 //- Reference to field whose data to use (on walls) and update
72 // (every cell and non-wall face)
73 GeometricField<Type, fvPatchField, volMesh>& field_;
75 //- Do accurate distance calculation for near-wall cells.
78 //- Number of unset cells and faces.
82 // Private Member Functions
84 //- Disallow default bitwise copy construct
85 wallDistData(const wallDistData&);
87 //- Disallow default bitwise assignment
88 void operator=(const wallDistData&);
95 //- Construct from mesh and flag whether or not to correct wall.
96 // Calculate for all cells. correctWalls : correct wall (face&point)
97 // cells for correct distance, searching neighbours.
101 GeometricField<Type, fvPatchField, volMesh>&,
102 bool correctWalls = true
107 virtual ~wallDistData();
112 const volScalarField& y() const
123 const GeometricField<Type, fvPatchField, volMesh>& data() const
128 //- Correct for mesh geom/topo changes
129 virtual void correct();
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 } // End namespace Foam
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 # include "wallDistData.C"
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 // ************************************************************************* //