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-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::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 "wallPoint.H"
40 #include "wallFace.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 FvWallInfoBase Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class WallInfo, class Derived>
57 class FvWallInfoBase
58 :
59  public WallInfo::template type<Derived>
60 {
61 public:
62 
63  // Constructors
64 
65  //- Inherit constructors
66  using WallInfo::template type<Derived>::type;
67 
68 
69  // Member Functions
70 
71  // Needed by FvFaceCellWave
72 
73  //- Transform across an interface
74  template<class TrackingData>
75  inline void transform
76  (
77  const fvPatch& patch,
78  const label patchFacei,
79  const transformer& transform,
80  TrackingData& td
81  );
82 
83  //- Influence of neighbouring face.
84  template<class TrackingData>
85  inline bool updateCell
86  (
87  const fvMesh&,
88  const label thisCelli,
89  const labelPair& neighbourPatchAndFacei,
90  const FvWallInfoBase<WallInfo, Derived>& neighbourInfo,
91  const scalar tol,
92  TrackingData& td
93  );
94 
95  //- Influence of neighbouring cell.
96  template<class TrackingData>
97  inline bool updateFace
98  (
99  const fvMesh&,
100  const labelPair& thisPatchAndFacei,
101  const label neighbourCelli,
102  const FvWallInfoBase<WallInfo, Derived>& neighbourInfo,
103  const scalar tol,
104  TrackingData& td
105  );
106 
107  //- Influence of different value on same face.
108  template<class TrackingData>
109  inline bool updateFace
110  (
111  const fvMesh&,
112  const labelPair& thisPatchAndFacei,
113  const FvWallInfoBase<WallInfo, Derived>& neighbourInfo,
114  const scalar tol,
115  TrackingData& td
116  );
117 };
118 
119 /*---------------------------------------------------------------------------*\
120  Class FvWallInfo Declaration
121 \*---------------------------------------------------------------------------*/
122 
123 template<class WallInfo>
124 class FvWallInfo
125 :
126  public FvWallInfoBase<WallInfo, FvWallInfo<WallInfo>>
127 {
128  public:
129 
130  using
132  FvWallInfoBase;
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #include "FvWallInfoI.H"
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
bool updateCell(const fvMesh &, const label thisCelli, const labelPair &neighbourPatchAndFacei, const FvWallInfoBase< WallInfo, Derived > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
Definition: FvWallInfoI.H:56
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space...
Definition: transformer.H:83
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Holds information regarding nearest wall point. Used in wall distance calculation.
Definition: FvWallInfo.H:123
bool updateFace(const fvMesh &, const labelPair &thisPatchAndFacei, const label neighbourCelli, const FvWallInfoBase< WallInfo, Derived > &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
Definition: FvWallInfoI.H:79
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
void transform(const fvPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
Definition: FvWallInfoI.H:36
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
Namespace for OpenFOAM.