nearWallDist.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
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::nearWallDist
26 
27 Description
28  Distance calculation for cells with face on a wall.
29  Searches pointNeighbours to find closest.
30 
31 SourceFiles
32  nearWallDist.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef nearWallDist_H
37 #define nearWallDist_H
38 
39 #include "DemandDrivenMeshObject.H"
40 #include "volFields.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class fvMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class nearWallDist Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class nearWallDist
54 :
55  public DemandDrivenMeshObject<fvMesh, UpdateableMeshObject, nearWallDist>
56 {
57  // Private Data
58 
59  //- Near-well distance-to-wall boundary field
61 
62 
63  // Private Member Functions
64 
65  //- Re-size y_ following a change to the boundary mesh
66  void resize();
67 
68  //- Re-calculate y_
69  void correct();
70 
71 
72 protected:
73 
74  friend class DemandDrivenMeshObject
75  <
76  fvMesh,
79  >;
80 
81  // Protected Constructors
82 
83  //- Construct from mesh
84  explicit nearWallDist(const fvMesh& mesh);
85 
86 
87 public:
88 
89  // Declare name of the class and its debug switch
90  ClassName("nearWallDist");
91 
92 
93  // Constructors
94 
95  //- Disallow default bitwise copy construction
96  nearWallDist(const nearWallDist&) = delete;
97 
98 
99  //- Destructor
100  virtual ~nearWallDist();
101 
102 
103  // Member Functions
104 
105  //- Access to the near-wall distances
106  const volScalarField::Boundary& y() const
107  {
108  return y_;
109  }
110 
111  //- Update the y-field when the mesh moves
112  virtual bool movePoints();
113 
114  //- Update the y-field when the mesh changes
115  virtual void topoChange(const polyTopoChangeMap&);
116 
117  //- Update from another mesh using the given map
118  virtual void mapMesh(const polyMeshMap&);
119 
120  //- Redistribute or update using the given distribution map
121  virtual void distribute(const polyDistributionMap&);
122 
123 
124  // Member Operators
125 
126  //- Disallow default bitwise assignment
127  void operator=(const nearWallDist&) = delete;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
Generic GeometricBoundaryField class.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Distance calculation for cells with face on a wall. Searches pointNeighbours to find closest.
Definition: nearWallDist.H:55
ClassName("nearWallDist")
virtual bool movePoints()
Update the y-field when the mesh moves.
Definition: nearWallDist.C:113
void operator=(const nearWallDist &)=delete
Disallow default bitwise assignment.
virtual void topoChange(const polyTopoChangeMap &)
Update the y-field when the mesh changes.
Definition: nearWallDist.C:122
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
Definition: nearWallDist.C:136
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Definition: nearWallDist.C:129
virtual ~nearWallDist()
Destructor.
Definition: nearWallDist.C:107
nearWallDist(const fvMesh &mesh)
Construct from mesh.
Definition: nearWallDist.C:86
const volScalarField::Boundary & y() const
Access to the near-wall distances.
Definition: nearWallDist.H:105
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Namespace for OpenFOAM.