meshPhiPreCorrectInfo.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::meshPhiPreCorrectInfo
26 
27 SourceFiles
28  meshPhiPreCorrectInfoI.H
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef meshPhiPreCorrectInfo_H
33 #define meshPhiPreCorrectInfo_H
34 
35 #include "labelPair.H"
36 #include "pointField.H"
37 #include "face.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 // Forward declaration of classes
45 class fvPatch;
46 class fvMesh;
47 class transformer;
48 
49 // Forward declaration of friend functions and operators
50 class meshPhiPreCorrectInfo;
51 Ostream& operator<<(Ostream&, const meshPhiPreCorrectInfo&);
52 Istream& operator>>(Istream&, meshPhiPreCorrectInfo&);
53 
54 /*---------------------------------------------------------------------------*\
55  Class meshPhiPreCorrectInfo Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60  // Private Data
61 
62  //- Layer index
63  label layer_;
64 
65  //- Weight
66  scalar weight_;
67 
68 
69 public:
70 
71  // Constructors
72 
73  //- Construct null
74  inline meshPhiPreCorrectInfo();
75 
76  //- Construct given the layer index and weight
78  (
79  const label layer,
80  const scalar weight
81  );
82 
83 
84  // Member Functions
85 
86  // Access
87 
88  //- Return the layer index
89  inline label layer() const;
90 
91  //- Return the weight
92  inline scalar weight() const;
93 
94 
95  // Needed by FaceCellWave
96 
97  //- Check whether the meshPhiPreCorrectInfo has been changed at all
98  // or still contains original (invalid) value.
99  template<class TrackingData>
100  inline bool valid(TrackingData& td) const;
101 
102  //- Check for identical geometrical data. Used for checking
103  // consistency across cyclics.
104  template<class TrackingData>
105  inline bool sameGeometry
106  (
107  const fvMesh& mesh,
108  const meshPhiPreCorrectInfo&,
109  const scalar,
110  TrackingData& td
111  ) const;
112 
113  //- Transform across an interface
114  template<class TrackingData>
115  inline void transform
116  (
117  const fvPatch& patch,
118  const label patchFacei,
119  const transformer& transform,
120  TrackingData& td
121  );
122 
123  //- Influence of neighbouring face
124  template<class TrackingData>
125  inline bool updateCell
126  (
127  const fvMesh& mesh,
128  const label thisCelli,
129  const labelPair& neighbourPatchAndFacei,
130  const meshPhiPreCorrectInfo& neighbourInfo,
131  const scalar tol,
132  TrackingData& td
133  );
134 
135  //- Influence of neighbouring cell
136  template<class TrackingData>
137  inline bool updateFace
138  (
139  const fvMesh& mesh,
140  const labelPair& thisPatchAndFacei,
141  const label neighbourCelli,
142  const meshPhiPreCorrectInfo& neighbourInfo,
143  const scalar tol,
144  TrackingData& td
145  );
146 
147  //- Influence of different value on same face
148  template<class TrackingData>
149  inline bool updateFace
150  (
151  const fvMesh& mesh,
152  const labelPair& thisPatchAndFacei,
153  const meshPhiPreCorrectInfo& neighbourInfo,
154  const scalar tol,
155  TrackingData& td
156  );
157 
158  //- Test equality
159  template<class TrackingData>
160  inline bool equal
161  (
162  const meshPhiPreCorrectInfo&,
163  TrackingData& td
164  ) const;
165 
166 
167  // Member Operators
168 
169  inline bool operator==(const meshPhiPreCorrectInfo&) const;
170  inline bool operator!=(const meshPhiPreCorrectInfo&) const;
171 
172 
173  // IOstream Operators
174 
177 };
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #include "meshPhiPreCorrectInfoI.H"
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
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
bool updateCell(const fvMesh &mesh, const label thisCelli, const labelPair &neighbourPatchAndFacei, const meshPhiPreCorrectInfo &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
bool operator==(const meshPhiPreCorrectInfo &) const
friend Istream & operator>>(Istream &, meshPhiPreCorrectInfo &)
bool equal(const meshPhiPreCorrectInfo &, TrackingData &td) const
Test equality.
bool operator!=(const meshPhiPreCorrectInfo &) const
scalar weight() const
Return the weight.
bool valid(TrackingData &td) const
Check whether the meshPhiPreCorrectInfo has been changed at all.
label layer() const
Return the layer index.
bool updateFace(const fvMesh &mesh, const labelPair &thisPatchAndFacei, const label neighbourCelli, const meshPhiPreCorrectInfo &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
bool sameGeometry(const fvMesh &mesh, const meshPhiPreCorrectInfo &, const scalar, TrackingData &td) const
Check for identical geometrical data. Used for checking.
friend Ostream & operator<<(Ostream &, const meshPhiPreCorrectInfo &)
void transform(const fvPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
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
Istream & operator>>(Istream &, directionInfo &)
Ostream & operator<<(Ostream &, const ensightPart &)