WallInfo.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) 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::WallInfo
26 
27 Description
28  Holds information regarding nearest wall point. Used in wall distance
29  calculation.
30 
31 SourceFiles
32  WallInfoI.H
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef WallInfo_H
37 #define WallInfo_H
38 
39 #include "fieldTypes.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declaration of classes
47 class polyPatch;
48 class polyMesh;
49 class transformer;
50 
51 /*---------------------------------------------------------------------------*\
52  Class WallInfo Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class WallLocation>
56 class WallInfo
57 :
58  public WallLocation
59 {
60 public:
61 
62  // Constructors
63 
64  //- Inherit constructors
65  using WallLocation::WallLocation;
66 
67 
68  // Member Functions
69 
70  // Needed by FaceCellWave
71 
72  //- Check for identical geometrical data. Used for cyclics checking.
73  template<class TrackingData>
74  inline bool sameGeometry
75  (
76  const polyMesh& mesh,
78  const scalar tol,
79  TrackingData& td
80  ) const;
81 
82  //- Transform across an interface
83  template<class TrackingData>
84  inline void transform
85  (
86  const polyPatch& patch,
87  const label patchFacei,
88  const transformer& transform,
89  TrackingData& td
90  );
91 
92  //- Influence of neighbouring face.
93  template<class TrackingData>
94  inline bool updateCell
95  (
96  const polyMesh&,
97  const label thisCelli,
98  const label neighbourFacei,
99  const WallInfo<WallLocation>& neighbourInfo,
100  const scalar tol,
101  TrackingData& td
102  );
103 
104  //- Influence of neighbouring cell.
105  template<class TrackingData>
106  inline bool updateFace
107  (
108  const polyMesh&,
109  const label thisFacei,
110  const label neighbourCelli,
111  const WallInfo<WallLocation>& neighbourInfo,
112  const scalar tol,
113  TrackingData& td
114  );
115 
116  //- Influence of different value on same face.
117  template<class TrackingData>
118  inline bool updateFace
119  (
120  const polyMesh&,
121  const label thisFacei,
122  const WallInfo<WallLocation>& neighbourInfo,
123  const scalar tol,
124  TrackingData& td
125  );
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 class wallPoint;
132 
133 template<>
134 inline bool contiguous<WallInfo<wallPoint>>()
135 {
136  return true;
137 }
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 template<class WallLocation, class Type>
143 class WallLocationData;
144 
145 #define DefineContiguousWallLocationDataType(Type, nullArg) \
146  template<> \
147  inline bool contiguous<WallInfo<WallLocationData<wallPoint, Type>>>() \
148  { \
149  return true; \
150  }
151 
155 
156 #undef DefineContiguousWallLocationDataType
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #include "WallInfoI.H"
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
#define DefineContiguousWallLocationDataType(Type, nullArg)
Definition: WallInfo.H:144
#define w2
Definition: blockCreate.C:32
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: WallInfo.H:58
bool sameGeometry(const polyMesh &mesh, const WallInfo< WallLocation > &w2, const scalar tol, TrackingData &td) const
Check for identical geometrical data. Used for cyclics checking.
Definition: WallInfoI.H:34
bool updateFace(const polyMesh &, const label thisFacei, const label neighbourCelli, const WallInfo< WallLocation > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
Definition: WallInfoI.H:85
bool updateCell(const polyMesh &, const label thisCelli, const label neighbourFacei, const WallInfo< WallLocation > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
Definition: WallInfoI.H:62
void transform(const polyPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
Definition: WallInfoI.H:48
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
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)