minData.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) 2014-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::minData
26 
27 Description
28  For use with FaceCellWave. Transports minimum passive data
29 
30 SourceFiles
31  minDataI.H
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef minData_H
36 #define minData_H
37 
38 #include "point.H"
39 #include "tensor.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 // Forward declaration of friend functions and operators
53 
54 class minData;
55 
56 Istream& operator>>(Istream&, minData&);
57 Ostream& operator<<(Ostream&, const minData&);
58 
59 
60 /*---------------------------------------------------------------------------*\
61  Class minData Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 class minData
65 {
66  // Private Data
67 
68  //- Starting data
69  label data_;
70 
71 
72 public:
73 
74  // Constructors
75 
76  //- Construct null
77  inline minData();
78 
79  //- Construct from count
80  inline minData(const label data);
81 
82 
83  // Member Functions
84 
85  // Access
86 
87  inline label data() const
88  {
89  return data_;
90  }
91 
92 
93  // Needed by FaceCellWave
94 
95  //- Check whether origin has been changed at all or
96  // still contains original (invalid) value.
97  template<class TrackingData>
98  inline bool valid(TrackingData& td) const;
99 
100  //- Check for identical geometrical data. Used for cyclics checking.
101  template<class TrackingData>
102  inline bool sameGeometry
103  (
104  const polyMesh&,
105  const minData&,
106  const scalar,
107  TrackingData& td
108  ) const;
109 
110  //- Transform across an interface
111  template<class TrackingData>
112  inline void transform
113  (
114  const polyPatch& patch,
115  const label patchFacei,
116  const transformer& transform,
117  TrackingData& td
118  );
119 
120  //- Influence of neighbouring face.
121  template<class TrackingData>
122  inline bool updateCell
123  (
124  const polyMesh&,
125  const label thisCelli,
126  const label neighbourFacei,
127  const minData& neighbourInfo,
128  const scalar tol,
129  TrackingData& td
130  );
131 
132  //- Influence of neighbouring cell.
133  template<class TrackingData>
134  inline bool updateFace
135  (
136  const polyMesh&,
137  const label thisFacei,
138  const label neighbourCelli,
139  const minData& neighbourInfo,
140  const scalar tol,
141  TrackingData& td
142  );
143 
144  //- Influence of different value on same face.
145  template<class TrackingData>
146  inline bool updateFace
147  (
148  const polyMesh&,
149  const label thisFacei,
150  const minData& neighbourInfo,
151  const scalar tol,
152  TrackingData& td
153  );
154 
155  //- Same (like operator==)
156  template<class TrackingData>
157  inline bool equal(const minData&, TrackingData& td) const;
158 
159  // Member Operators
160 
161  // Needed for List IO
162  inline bool operator==(const minData&) const;
163 
164  inline bool operator!=(const minData&) const;
165 
166 
167  // IOstream Operators
168 
169  friend Ostream& operator<<(Ostream&, const minData&);
170  friend Istream& operator>>(Istream&, minData&);
171 };
172 
173 
174 //- Data associated with minData type are contiguous
175 template<>
176 inline bool contiguous<minData>()
177 {
178  return true;
179 }
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #include "minDataI.H"
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space...
Definition: transformer.H:83
friend Ostream & operator<<(Ostream &, const minData &)
bool operator!=(const minData &) const
Definition: minDataI.H:169
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
bool sameGeometry(const polyMesh &, const minData &, const scalar, TrackingData &td) const
Check for identical geometrical data. Used for cyclics checking.
Definition: minDataI.H:53
bool operator==(const minData &) const
Definition: minDataI.H:160
bool updateFace(const polyMesh &, const label thisFacei, const label neighbourCelli, const minData &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring cell.
Definition: minDataI.H:100
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Database for solution and other reduced data.
Definition: data.H:51
minData()
Construct null.
Definition: minDataI.H:30
label data() const
Definition: minData.H:86
void transform(const polyPatch &patch, const label patchFacei, const transformer &transform, TrackingData &td)
Transform across an interface.
Definition: minDataI.H:66
friend Istream & operator>>(Istream &, minData &)
Ostream & operator<<(Ostream &, const ensightPart &)
bool contiguous< minData >()
Data associated with minData type are contiguous.
Definition: minData.H:175
bool equal(const minData &, TrackingData &td) const
Same (like operator==)
Definition: minDataI.H:148
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
Definition: minDataI.H:45
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
bool updateCell(const polyMesh &, const label thisCelli, const label neighbourFacei, const minData &neighbourInfo, const scalar tol, TrackingData &td)
Influence of neighbouring face.
Definition: minDataI.H:77
For use with FaceCellWave. Transports minimum passive data.
Definition: minData.H:63
Namespace for OpenFOAM.