All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "MeshObject.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 MeshObject<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 public:
73 
74  // Declare name of the class and its debug switch
75  ClassName("nearWallDist");
76 
77 
78  // Constructors
79 
80  //- Construct from components
81  nearWallDist(const fvMesh& mesh);
82 
83  //- Disallow default bitwise copy construction
84  nearWallDist(const nearWallDist&) = delete;
85 
86 
87  //- Destructor
88  virtual ~nearWallDist();
89 
90 
91  // Member Functions
92 
93  //- Access to the near-wall distances
94  const volScalarField::Boundary& y() const
95  {
96  return y_;
97  }
98 
99  //- Update the y-field when the mesh moves
100  virtual bool movePoints();
101 
102  //- Update the y-field when the mesh changes
103  virtual void topoChange(const polyTopoChangeMap&);
104 
105  //- Update from another mesh using the given map
106  virtual void mapMesh(const polyMeshMap&);
107 
108  //- Redistribute or update using the given distribution map
109  virtual void distribute(const polyDistributionMap&);
110 
111 
112  // Member Operators
113 
114  //- Disallow default bitwise assignment
115  void operator=(const nearWallDist&) = delete;
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
ClassName("nearWallDist")
virtual bool movePoints()
Update the y-field when the mesh moves.
Definition: nearWallDist.C:108
void operator=(const nearWallDist &)=delete
Disallow default bitwise assignment.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:87
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Distance calculation for cells with face on a wall. Searches pointNeighbours to find closest...
Definition: nearWallDist.H:52
virtual ~nearWallDist()
Destructor.
Definition: nearWallDist.C:102
virtual void topoChange(const polyTopoChangeMap &)
Update the y-field when the mesh changes.
Definition: nearWallDist.C:117
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
Definition: nearWallDist.C:124
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:50
const volScalarField::Boundary & y() const
Access to the near-wall distances.
Definition: nearWallDist.H:93
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
Definition: nearWallDist.C:131
Namespace for OpenFOAM.
nearWallDist(const fvMesh &mesh)
Construct from components.
Definition: nearWallDist.C:86