FvWallInfoI.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 \*---------------------------------------------------------------------------*/
25 
26 #include "FvWallInfo.H"
27 #include "fvMesh.H"
28 #include "volFields.H"
29 #include "surfaceFields.H"
30 
31 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
32 
33 template<class WallLocation>
34 template<class TrackingData>
36 (
37  const fvMesh& mesh,
39  const scalar tol,
40  TrackingData& td
41 ) const
42 {
43  return WallLocation::sameGeometry(w2, tol, td);
44 }
45 
46 
47 template<class WallLocation>
48 template<class TrackingData>
50 (
51  const fvPatch& patch,
52  const label patchFacei,
53  const transformer& transform,
54  TrackingData& td
55 )
56 {
58 }
59 
60 
61 template<class WallLocation>
62 template<class TrackingData>
64 (
65  const fvMesh& mesh,
66  const label thisCelli,
67  const labelPair& neighbourPatchAndFacei,
68  const FvWallInfo<WallLocation>& neighbourWallInfo,
69  const scalar tol,
70  TrackingData& td
71 )
72 {
73  return
74  WallLocation::update
75  (
76  mesh.C()[thisCelli],
77  neighbourWallInfo,
78  tol,
79  td
80  );
81 }
82 
83 
84 template<class WallLocation>
85 template<class TrackingData>
87 (
88  const fvMesh& mesh,
89  const labelPair& thisPatchAndFacei,
90  const label neighbourCelli,
91  const FvWallInfo<WallLocation>& neighbourWallInfo,
92  const scalar tol,
93  TrackingData& td
94 )
95 {
96  const label thisPatchi = thisPatchAndFacei.first();
97  const label thisFacei = thisPatchAndFacei.second();
98 
99  return
100  WallLocation::update
101  (
102  thisPatchi == -1
103  ? mesh.Cf()[thisFacei]
104  : mesh.Cf().boundaryField()[thisPatchi][thisFacei],
105  neighbourWallInfo,
106  tol,
107  td
108  );
109 }
110 
111 
112 template<class WallLocation>
113 template<class TrackingData>
115 (
116  const fvMesh& mesh,
117  const labelPair& thisPatchAndFacei,
118  const FvWallInfo<WallLocation>& neighbourWallInfo,
119  const scalar tol,
120  TrackingData& td
121 )
122 {
123  const label thisPatchi = thisPatchAndFacei.first();
124  const label thisFacei = thisPatchAndFacei.second();
125 
126  return
127  WallLocation::update
128  (
129  thisPatchi == -1
130  ? mesh.Cf()[thisFacei]
131  : mesh.Cf().boundaryField()[thisPatchi][thisFacei],
132  neighbourWallInfo,
133  tol,
134  td
135  );
136 }
137 
138 
139 // ************************************************************************* //
#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
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Type & second() const
Return second.
Definition: Pair.H:110
const Type & first() const
Return first.
Definition: Pair.H:98
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
const volVectorField & C() const
Return cell centres.
const surfaceVectorField & Cf() const
Return face centres.
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
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
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:504
Foam::surfaceFields.