Loading...
Searching...
No Matches
minData.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2014-2016 OpenFOAM Foundation
9 Copyright (C) 2015-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::minData
29
30Description
31 For use with FaceCellWave. Transports minimum passive data
32
33SourceFiles
34 minDataI.H
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef minData_H
39#define minData_H
40
41#include "point.H"
42#include "tensor.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49// Forward Declarations
50class polyPatch;
51class polyMesh;
52class minData;
53
57/*---------------------------------------------------------------------------*\
58 Class minData Declaration
59\*---------------------------------------------------------------------------*/
60
61class minData
62{
63 // Private Data
64
65 //- Starting data
66 label data_;
67
68
69public:
70
71 // Constructors
72
73 //- Default construct
74 inline minData();
75
76 //- Construct from min value
77 inline minData(const label data);
78
79
80 // Member Functions
81
82 // Access
83
84 label data() const
85 {
86 return data_;
87 }
88
89
90 // Needed by FaceCellWave
91
92 //- Changed or contains original (invalid) value
93 template<class TrackingData>
94 inline bool valid(TrackingData& td) const;
95
96 //- Check for identical geometrical data (eg, cyclics checking)
97 template<class TrackingData>
98 inline bool sameGeometry
99 (
100 const polyMesh&,
101 const minData&,
102 const scalar,
103 TrackingData& td
104 ) const;
105
106 //- Convert any absolute coordinates into relative to (patch)face
107 // centre
108 template<class TrackingData>
109 inline void leaveDomain
110 (
111 const polyMesh&,
112 const polyPatch&,
113 const label patchFacei,
114 const point& faceCentre,
115 TrackingData& td
116 );
117
118 //- Reverse of leaveDomain
119 template<class TrackingData>
120 inline void enterDomain
121 (
122 const polyMesh&,
123 const polyPatch&,
124 const label patchFacei,
125 const point& faceCentre,
126 TrackingData& td
127 );
128
129 //- Apply rotation matrix to any coordinates
130 template<class TrackingData>
131 inline void transform
132 (
133 const polyMesh&,
134 const tensor&,
135 TrackingData& td
136 );
137
138 //- Influence of neighbouring face.
139 template<class TrackingData>
140 inline bool updateCell
141 (
142 const polyMesh&,
143 const label thisCelli,
144 const label neighbourFacei,
145 const minData& neighbourInfo,
146 const scalar tol,
147 TrackingData& td
148 );
149
150 //- Influence of neighbouring cell.
151 template<class TrackingData>
152 inline bool updateFace
153 (
154 const polyMesh&,
155 const label thisFacei,
156 const label neighbourCelli,
157 const minData& neighbourInfo,
158 const scalar tol,
159 TrackingData& td
160 );
161
162 //- Influence of different value on same face.
163 template<class TrackingData>
164 inline bool updateFace
165 (
166 const polyMesh&,
167 const label thisFacei,
168 const minData& neighbourInfo,
169 const scalar tol,
170 TrackingData& td
171 );
172
173 //- Test for equality, with TrackingData
174 template<class TrackingData>
175 inline bool equal(const minData&, TrackingData& td) const;
176
177 //- Interpolate between two values (lerp). Returns true if
178 //- causes changes. Not sure if needs to be specialised between
179 //- face and cell and what index is needed...
180 template<class TrackingData>
181 inline bool interpolate
182 (
183 const polyMesh&,
184 const point& pt,
185 const label i0,
186 const minData& f0,
187 const label i1,
188 const minData& f1,
189 const scalar weight,
190 const scalar tol,
191 TrackingData& td
192 );
193
194
195 // Member Operators
196
197 //- Test for equality
198 inline bool operator==(const minData&) const;
199
200 //- Test for inequality
201 inline bool operator!=(const minData&) const;
202
203
204 // IOstream Operators
205
206 friend inline Ostream& operator<<(Ostream&, const minData&);
207 friend inline Istream& operator>>(Istream&, minData&);
208};
209
210
211// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
212
213//- Contiguous data for minData
214template<> struct is_contiguous<minData> : std::true_type {};
215
216//- Contiguous label data for minData
217template<> struct is_contiguous_label<minData> : std::true_type {};
218
219
220// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221
222} // End namespace Foam
223
224// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225
226#include "minDataI.H"
227
228// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229
230#endif
231
232// ************************************************************************* //
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:59
For use with FaceCellWave. Transports minimum passive data.
Definition minData.H:57
bool interpolate(const polyMesh &, const point &pt, const label i0, const minData &f0, const label i1, const minData &f1, const scalar weight, const scalar tol, TrackingData &td)
Interpolate between two values (lerp). Returns true if causes changes. Not sure if needs to be specia...
Definition minDataI.H:171
void transform(const polyMesh &, const tensor &, TrackingData &td)
Apply rotation matrix to any coordinates.
Definition minDataI.H:74
void enterDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Reverse of leaveDomain.
Definition minDataI.H:84
friend Istream & operator>>(Istream &, minData &)
bool sameGeometry(const polyMesh &, const minData &, const scalar, TrackingData &td) const
Check for identical geometrical data (eg, cyclics checking).
Definition minDataI.H:49
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
Definition minDataI.H:41
bool operator==(const minData &) const
Test for equality.
Definition minDataI.H:201
minData()
Default construct.
Definition minDataI.H:26
bool operator!=(const minData &) const
Test for inequality.
Definition minDataI.H:210
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:96
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:117
void leaveDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Convert any absolute coordinates into relative to (patch)face.
Definition minDataI.H:62
label data() const
Definition minData.H:85
bool equal(const minData &, TrackingData &td) const
Test for equality, with TrackingData.
Definition minDataI.H:160
friend Ostream & operator<<(Ostream &, const minData &)
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
A patch is a list of labels that address the faces in the global face list.
Definition polyPatch.H:73
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
Tensor< scalar > tensor
Definition symmTensor.H:57
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
vector point
Point is a vector.
Definition point.H:37
A template class to specify if a data type is composed solely of Foam::label elements.
Definition contiguous.H:82
A template class to specify that a data type can be considered as being contiguous in memory.
Definition contiguous.H:70