Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
finiteVolume
fvMesh
wallDist
wallDistData.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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
19
for more details.
20
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/>.
23
24
Class
25
Foam::wallDistData
26
27
Description
28
Wall distance calculation. Like wallDist but also transports extra
29
data (template argument).
30
31
Used for e.g reflection vector calculation or vanDriest damping.
32
33
Templated on two parameters:
34
- TransferType: type of overall data transported
35
(e.g. wallPointData<vector>)
36
37
SourceFiles
38
wallDistData.C
39
40
\*---------------------------------------------------------------------------*/
41
42
#ifndef wallDistData_H
43
#define wallDistData_H
44
45
#include <
meshTools/cellDistFuncs.H
>
46
#include <
finiteVolume/volFields.H
>
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
namespace
Foam
51
{
52
53
/*---------------------------------------------------------------------------*\
54
Class wallDistData Declaration
55
\*---------------------------------------------------------------------------*/
56
57
template
<
class
TransferType>
58
class
wallDistData
59
:
60
public
volScalarField
,
61
public
cellDistFuncs
62
{
63
64
private
:
65
66
typedef
typename
TransferType::dataType Type;
67
68
69
// Private Member Data
70
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_;
74
75
//- Do accurate distance calculation for near-wall cells.
76
bool
correctWalls_;
77
78
//- Number of unset cells and faces.
79
label nUnset_;
80
81
82
// Private Member Functions
83
84
//- Disallow default bitwise copy construct
85
wallDistData
(
const
wallDistData
&);
86
87
//- Disallow default bitwise assignment
88
void
operator=(
const
wallDistData
&);
89
90
91
public
:
92
93
// Constructors
94
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.
98
wallDistData
99
(
100
const
fvMesh
&
mesh
,
101
GeometricField<Type, fvPatchField, volMesh>
&,
102
bool
correctWalls =
true
103
);
104
105
106
// Destructor
107
108
virtual
~wallDistData
();
109
110
111
// Member Functions
112
113
const
volScalarField
&
y
()
const
114
{
115
return
*
this
;
116
}
117
118
label
nUnset
()
const
119
{
120
return
nUnset_;
121
}
122
123
//- Access field
124
const
GeometricField<Type, fvPatchField, volMesh>
&
data
()
const
125
{
126
return
field_;
127
}
128
129
//- Correct for mesh geom/topo changes
130
virtual
void
correct
();
131
};
132
133
134
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136
}
// End namespace Foam
137
138
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140
#ifdef NoRepository
141
# include <
finiteVolume/wallDistData.C
>
142
#endif
143
144
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145
146
#endif
147
148
// ************************ vim: set sw=4 sts=4 et: ************************ //