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
54Istream& operator>>(Istream&, minData&);
55Ostream& operator<<(Ostream&, const minData&);
56
57/*---------------------------------------------------------------------------*\
58 Class minData Declaration
59\*---------------------------------------------------------------------------*/
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
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
178 // Member Operators
179
180 //- Test for equality
181 inline bool operator==(const minData&) const;
182
183 //- Test for inequality
184 inline bool operator!=(const minData&) const;
185
186
187 // IOstream Operators
189 friend inline Ostream& operator<<(Ostream&, const minData&);
190 friend inline Istream& operator>>(Istream&, minData&);
191};
192
193
194// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
195
196//- Contiguous data for minData
197template<> struct is_contiguous<minData> : std::true_type {};
198
199//- Contiguous label data for minData
200template<> struct is_contiguous_label<minData> : std::true_type {};
201
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205} // End namespace Foam
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209#include "minDataI.H"
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#endif
214
215// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Database for solution data, solver performance and other reduced data.
Definition: data.H:58
For use with FaceCellWave. Transports minimum passive data.
Definition: minData.H:61
void transform(const polyMesh &, const tensor &, TrackingData &td)
Apply rotation matrix to any coordinates.
Definition: minDataI.H:81
void enterDomain(const polyMesh &, const polyPatch &, const label patchFacei, const point &faceCentre, TrackingData &td)
Reverse of leaveDomain.
Definition: minDataI.H:91
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:56
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
Definition: minDataI.H:48
bool operator==(const minData &) const
Test for equality.
Definition: minDataI.H:179
minData()
Default construct.
Definition: minDataI.H:33
bool operator!=(const minData &) const
Test for inequality.
Definition: minDataI.H:188
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:103
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:124
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:69
label data() const
Definition: minData.H:83
bool equal(const minData &, TrackingData &td) const
Test for equality, with TrackingData.
Definition: minDataI.H:167
friend Ostream & operator<<(Ostream &, const minData &)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Istream & operator>>(Istream &, directionInfo &)
A template class to specify if a data type is composed solely of Foam::label elements.
Definition: contiguous.H:86
A template class to specify that a data type can be considered as being contiguous in memory.
Definition: contiguous.H:78