patchEdgeFaceRegion.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) 2012-2016 OpenFOAM Foundation
9 Copyright (C) 2019-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::patchEdgeFaceRegion
29
30Description
31 Transport of region for use in PatchEdgeFaceWave.
32
33 Set element to -2 to denote blocked.
34
35SourceFiles
36 patchEdgeFaceRegionI.H
37 patchEdgeFaceRegion.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef patchEdgeFaceRegion_H
42#define patchEdgeFaceRegion_H
43
44#include "point.H"
45#include "label.H"
46#include "scalar.H"
47#include "tensor.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54
55// Forward Declarations
56class polyPatch;
57class polyMesh;
58class patchEdgeFaceRegion;
59
60Istream& operator>>(Istream&, patchEdgeFaceRegion&);
61Ostream& operator<<(Ostream&, const patchEdgeFaceRegion&);
62
63
64/*---------------------------------------------------------------------------*\
65 Class patchEdgeFaceRegion Declaration
66\*---------------------------------------------------------------------------*/
69{
70 // Private Data
71
72 //- The region
73 label region_;
74
75
76 // Private Member Functions
77
78 //- Combine current with w2.
79 // Update region_ if w2 has smaller quantities and return true.
80 template<class TrackingData>
81 inline bool update
82 (
84 const scalar tol,
85 TrackingData& td
86 );
87
88
89public:
90
91 // Constructors
92
93 //- Default construct
94 inline patchEdgeFaceRegion();
95
96 //- Construct from region
97 inline patchEdgeFaceRegion(const label regioni);
98
99
100 // Member Functions
101
102 // Access
104 label region() const
105 {
106 return region_;
107 }
108
109
110 // Needed by MeshWave
111
112 //- Changed or contains original (invalid) value
113 template<class TrackingData>
114 inline bool valid(TrackingData& td) const;
115
116 //- Apply rotation matrix
117 template<class TrackingData>
118 inline void transform
119 (
120 const polyMesh& mesh,
121 const indirectPrimitivePatch& patch,
122 const tensor& rotTensor,
123 const scalar tol,
124 TrackingData& td
125 );
126
127 //- Influence of face on edge
128 template<class TrackingData>
129 inline bool updateEdge
130 (
131 const polyMesh& mesh,
132 const indirectPrimitivePatch& patch,
133 const label edgeI,
134 const label facei,
135 const patchEdgeFaceRegion& faceInfo,
136 const scalar tol,
137 TrackingData& td
138 );
139
140 //- New information for edge (from e.g. coupled edge)
141 template<class TrackingData>
142 inline bool updateEdge
143 (
144 const polyMesh& mesh,
145 const indirectPrimitivePatch& patch,
146 const patchEdgeFaceRegion& edgeInfo,
147 const bool sameOrientation,
148 const scalar tol,
149 TrackingData& td
150 );
151
152 //- Influence of edge on face.
153 template<class TrackingData>
154 inline bool updateFace
155 (
156 const polyMesh& mesh,
157 const indirectPrimitivePatch& patch,
158 const label facei,
159 const label edgeI,
160 const patchEdgeFaceRegion& edgeInfo,
161 const scalar tol,
162 TrackingData& td
163 );
164
165 //- Test for equality, with TrackingData
166 template<class TrackingData>
167 inline bool equal(const patchEdgeFaceRegion&, TrackingData&) const;
168
169
170 // Member Operators
171
172 //- Test for equality
173 inline bool operator==(const patchEdgeFaceRegion&) const;
174
175 //- Test for inequality
176 inline bool operator!=(const patchEdgeFaceRegion&) const;
177
178
179 // IOstream Operators
183};
184
185
186// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
187
188//- Contiguous data for patchEdgeFaceRegion
189template<> struct is_contiguous<patchEdgeFaceRegion> : std::true_type {};
190
191//- Contiguous label data for patchEdgeFaceRegion
192template<> struct is_contiguous_label<patchEdgeFaceRegion> : std::true_type {};
193
194
195// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196
197} // End namespace Foam
198
199// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200
201#include "patchEdgeFaceRegionI.H"
202
203// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
204
205#endif
206
207// ************************************************************************* //
#define w2
Definition: blockCreate.C:35
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
A list of faces which address into the list of points.
Transport of region for use in PatchEdgeFaceWave.
bool equal(const patchEdgeFaceRegion &, TrackingData &) const
Test for equality, with TrackingData.
bool operator!=(const patchEdgeFaceRegion &) const
Test for inequality.
bool updateFace(const polyMesh &mesh, const indirectPrimitivePatch &patch, const label facei, const label edgeI, const patchEdgeFaceRegion &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
patchEdgeFaceRegion()
Default construct.
friend Ostream & operator<<(Ostream &, const patchEdgeFaceRegion &)
friend Istream & operator>>(Istream &, patchEdgeFaceRegion &)
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
void transform(const polyMesh &mesh, const indirectPrimitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
bool updateEdge(const polyMesh &mesh, const indirectPrimitivePatch &patch, const label edgeI, const label facei, const patchEdgeFaceRegion &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
bool operator==(const patchEdgeFaceRegion &) const
Test for equality.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
mesh update()
dynamicFvMesh & mesh
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