FvWallInfo.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-2023 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::FvWallInfo
26 
27 Description
28  Holds information regarding nearest wall point. Used in wall distance
29  calculation.
30 
31 SourceFiles
32  FvWallInfoI.H
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef FvWallInfo_H
37 #define FvWallInfo_H
38 
39 #include "fieldTypes.H"
40 #include "labelPair.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 class fvPatch;
49 class fvMesh;
50 class transformer;
51 
52 /*---------------------------------------------------------------------------*\
53  Class FvWallInfo Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class WallLocation>
57 class FvWallInfo
58 :
59  public WallLocation
60 {
61 public:
62 
63  // Constructors
64 
65  //- Inherit constructors
66  using WallLocation::WallLocation;
67 
68 
69  // Member Functions
70 
71  // Needed by FvFaceCellWave
72 
73  //- Check for identical geometrical data. Used for cyclics checking.
74  template<class TrackingData>
75  inline bool sameGeometry
76  (
77  const fvMesh& mesh,
79  const scalar tol,
80  TrackingData& td
81  ) const;
82 
83  //- Transform across an interface
84  template<class TrackingData>
85  inline void transform
86  (
87  const fvPatch& patch,
88  const label patchFacei,
89  const transformer& transform,
90  TrackingData& td
91  );
92 
93  //- Influence of neighbouring face.
94  template<class TrackingData>
95  inline bool updateCell
96  (
97  const fvMesh&,
98  const label thisCelli,
99  const labelPair& neighbourPatchAndFacei,
100  const FvWallInfo<WallLocation>& neighbourInfo,
101  const scalar tol,
102  TrackingData& td
103  );
104 
105  //- Influence of neighbouring cell.
106  template<class TrackingData>
107  inline bool updateFace
108  (
109  const fvMesh&,
110  const labelPair& thisPatchAndFacei,
111  const label neighbourCelli,
112  const FvWallInfo<WallLocation>& neighbourInfo,
113  const scalar tol,
114  TrackingData& td
115  );
116 
117  //- Influence of different value on same face.
118  template<class TrackingData>
119  inline bool updateFace
120  (
121  const fvMesh&,
122  const labelPair& thisPatchAndFacei,
123  const FvWallInfo<WallLocation>& neighbourInfo,
124  const scalar tol,
125  TrackingData& td
126  );
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 class wallPoint;
133 
134 template<>
135 inline bool contiguous<FvWallInfo<wallPoint>>()
136 {
137  return true;
138 }
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 template<class WallLocation, class Type>
144 class WallLocationData;
145 
146 #define DefineContiguousFvWallLocationDataType(Type, nullArg) \
147  template<> \
148  inline bool contiguous<FvWallInfo<WallLocationData<wallPoint, Type>>>() \
149  { \
150  return true; \
151  }
152 
156 
157 #undef DefineContiguousFvWallLocationDataType
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #include "FvWallInfoI.H"
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
#define DefineContiguousFvWallLocationDataType(Type, nullArg)
Definition: FvWallInfo.H:145
#define w2
Definition: blockCreate.C:32
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: FvWallInfo.H:59
bool sameGeometry(const fvMesh &mesh, const FvWallInfo< WallLocation > &w2, const scalar tol, TrackingData &td) const
Check for identical geometrical data. Used for cyclics checking.
Definition: FvWallInfoI.H:36
bool updateFace(const fvMesh &, const labelPair &thisPatchAndFacei, const label neighbourCelli, const FvWallInfo< WallLocation > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
Definition: FvWallInfoI.H:87
void transform(const fvPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
Definition: FvWallInfoI.H:50
bool updateCell(const fvMesh &, const label thisCelli, const labelPair &neighbourPatchAndFacei, const FvWallInfo< WallLocation > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
Definition: FvWallInfoI.H:64
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: wallPoint.H:59
Include the header files for all the primitive types that Fields are instantiated for.
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
FOR_ALL_FIELD_TYPES(DefineContiguousFvWallLocationDataType)