patchPatchDist.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2013 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::patchPatchDist
29
30Description
31 Like wallDist but calculates on a patch the distance to nearest neighbouring
32 patches. Uses PatchEdgeFaceWave to do actual calculation.
33
34SourceFiles
35 patchPatchDist.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef patchPatchDist_H
40#define patchPatchDist_H
41
42#include "scalarField.H"
43#include "HashSet.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50//class polyMesh;
51class polyPatch;
52
53/*---------------------------------------------------------------------------*\
54 Class patchPatchDist Declaration
55\*---------------------------------------------------------------------------*/
58:
59 public scalarField
60{
61 // Private Member Data
62
63 //- Patch to operate on
64 const polyPatch& patch_;
65
66 //- Patches to determine the distance to
67 const labelHashSet nbrPatchIDs_;
68
69 //- Number of unset faces.
70 label nUnset_;
71
72public:
73
74 // Constructors
75
76 //- Construct from patch and neighbour patches.
78 (
79 const polyPatch& pp,
80 const labelHashSet& nbrPatchIDs
81 );
82
83
84 //- Destructor
85 virtual ~patchPatchDist() = default;
86
87
88 // Member Functions
90 const scalarField& y() const
91 {
92 return *this;
93 }
95 label nUnset() const
96 {
97 return nUnset_;
98 }
99
100 //- Correct for mesh geom/topo changes
101 virtual void correct();
102};
103
104
105// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107} // End namespace Foam
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111#endif
112
113// ************************************************************************* //
Like wallDist but calculates on a patch the distance to nearest neighbouring patches....
virtual ~patchPatchDist()=default
Destructor.
const scalarField & y() const
virtual void correct()
Correct for mesh geom/topo changes.
label nUnset() const
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
Namespace for OpenFOAM.