patchEdgeFaceRegions.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) 2013-2016 OpenFOAM Foundation
9 Copyright (C) 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::patchEdgeFaceRegions
29
30Description
31 Transport of regions for use in PatchEdgeFaceWave.
32
33 Set element to -1 to denote blocked.
34
35SourceFiles
36 patchEdgeFaceRegionsI.H
37 patchEdgeFaceRegions.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef patchEdgeFaceRegions_H
42#define patchEdgeFaceRegions_H
43
44#include "labelList.H"
45#include "scalar.H"
46#include "tensor.H"
47#include "labelPair.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54// Forward Declarations
55class polyMesh;
56class patchEdgeFaceRegions;
57Istream& operator>>(Istream&, patchEdgeFaceRegions&);
58Ostream& operator<<(Ostream&, const patchEdgeFaceRegions&);
59
60/*---------------------------------------------------------------------------*\
61 Class patchEdgeFaceRegions Declaration
62\*---------------------------------------------------------------------------*/
65{
66 // Private Data
67
68 //- Region per point
69 labelList regions_;
70
71public:
72
73 // Constructors
74
75 //- Default construct
76 inline patchEdgeFaceRegions();
77
78 //- Construct from regions
80
81 //- Construct from regions (on edge)
83
84
85 // Member Functions
86
87 // Access
89 const labelList& regions() const
90 {
91 return regions_;
92 }
94 {
95 return regions_;
96 }
97
98
99 // Needed by MeshWave
100
101 //- Changed or contains original (invalid) value
102 template<class TrackingData>
103 inline bool valid(TrackingData& td) const;
104
105 //- Apply rotation matrix
106 template<class Patch, class TrackingData>
107 inline void transform
108 (
109 const polyMesh& mesh,
110 const Patch& patch,
111 const tensor& rotTensor,
112 const scalar tol,
113 TrackingData& td
114 );
115
116 //- Influence of face on edge
117 template<class Patch, class TrackingData>
118 inline bool updateEdge
119 (
120 const polyMesh& mesh,
121 const Patch& patch,
122 const label edgeI,
123 const label facei,
124 const patchEdgeFaceRegions& faceInfo,
125 const scalar tol,
126 TrackingData& td
127 );
128
129 //- New information for edge (from e.g. coupled edge)
130 template<class Patch, class TrackingData>
131 inline bool updateEdge
132 (
133 const polyMesh& mesh,
134 const Patch& patch,
135 const patchEdgeFaceRegions& edgeInfo,
136 const bool sameOrientation,
137 const scalar tol,
138 TrackingData& td
139 );
140
141 //- Influence of edge on face.
142 template<class Patch, class TrackingData>
143 inline bool updateFace
144 (
145 const polyMesh& mesh,
146 const Patch& patch,
147 const label facei,
148 const label edgeI,
149 const patchEdgeFaceRegions& edgeInfo,
150 const scalar tol,
151 TrackingData& td
152 );
153
154 //- Test for equality, with TrackingData
155 template<class TrackingData>
156 inline bool equal(const patchEdgeFaceRegions&, TrackingData&) const;
157
158
159 // Member Operators
160
161 //- Test for equality
162 inline bool operator==(const patchEdgeFaceRegions&) const;
163
164 //- Test for inequality
165 inline bool operator!=(const patchEdgeFaceRegions&) const;
166
167
168 // IOstream Operators
172};
173
174
175// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176
177} // End namespace Foam
178
179// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180
182
183// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184
185#endif
186
187// ************************************************************************* //
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
Transport of regions for use in PatchEdgeFaceWave.
friend Ostream & operator<<(Ostream &, const patchEdgeFaceRegions &)
bool operator!=(const patchEdgeFaceRegions &) const
Test for inequality.
bool updateEdge(const polyMesh &mesh, const Patch &patch, const label edgeI, const label facei, const patchEdgeFaceRegions &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
friend Istream & operator>>(Istream &, patchEdgeFaceRegions &)
patchEdgeFaceRegions()
Default construct.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
bool updateFace(const polyMesh &mesh, const Patch &patch, const label facei, const label edgeI, const patchEdgeFaceRegions &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
const labelList & regions() const
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Test for equality, with TrackingData.
bool operator==(const patchEdgeFaceRegions &) const
Test for equality.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Tensor of scalars, i.e. Tensor<scalar>.
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 &)