patchEdgeFaceRegions.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) 2013-2023 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::patchEdgeFaceRegions
26 
27 Description
28  Transport of regions for use in PatchEdgeFaceWave.
29  Set element to -1 to denote blocked.
30 
31 SourceFiles
32  patchEdgeFaceRegionsI.H
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef patchEdgeFaceRegions_H
37 #define patchEdgeFaceRegions_H
38 
39 #include "labelList.H"
40 #include "scalar.H"
41 #include "tensor.H"
42 #include "labelPair.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class polyMesh;
51 
52 
53 // Forward declaration of friend functions and operators
54 
55 class patchEdgeFaceRegions;
56 
57 Istream& operator>>(Istream&, patchEdgeFaceRegions&);
58 Ostream& operator<<(Ostream&, const patchEdgeFaceRegions&);
59 
60 
61 /*---------------------------------------------------------------------------*\
62  Class patchEdgeFaceRegions Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 {
67  // Private Data
68 
69  //- Region per point
70  labelList regions_;
71 
72 public:
73 
74  // Constructors
75 
76  //- Construct null
77  inline patchEdgeFaceRegions();
78 
79  //- Construct from regions
80  inline patchEdgeFaceRegions(const labelList&);
81 
82  //- Construct from regions (on edge)
83  inline patchEdgeFaceRegions(const labelPair&);
84 
85 
86  // Member Functions
87 
88  // Access
89 
90  inline const labelList& regions() const;
91 
92 
93  // Needed by meshWave
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  //- Apply rotation matrix
101  template<class Patch, class TrackingData>
102  inline void transform
103  (
104  const polyMesh& mesh,
105  const Patch& patch,
106  const tensor& rotTensor,
107  const scalar tol,
108  TrackingData& td
109  );
110 
111  //- Influence of face on edge
112  template<class Patch, class TrackingData>
113  inline bool updateEdge
114  (
115  const polyMesh& mesh,
116  const Patch& patch,
117  const label edgei,
118  const label facei,
119  const patchEdgeFaceRegions& faceInfo,
120  const scalar tol,
121  TrackingData& td
122  );
123 
124  //- New information for edge (from e.g. coupled edge)
125  template<class Patch, class TrackingData>
126  inline bool updateEdge
127  (
128  const polyMesh& mesh,
129  const Patch& patch,
130  const patchEdgeFaceRegions& edgeInfo,
131  const bool sameOrientation,
132  const scalar tol,
133  TrackingData& td
134  );
135 
136  //- Influence of edge on face.
137  template<class Patch, class TrackingData>
138  inline bool updateFace
139  (
140  const polyMesh& mesh,
141  const Patch& patch,
142  const label facei,
143  const label edgei,
144  const patchEdgeFaceRegions& edgeInfo,
145  const scalar tol,
146  TrackingData& td
147  );
148 
149  //- Same (like operator==)
150  template<class TrackingData>
151  inline bool equal(const patchEdgeFaceRegions&, TrackingData&) const;
152 
153 
154  // Member Operators
155 
156  // Needed for List IO
157  inline bool operator==(const patchEdgeFaceRegions&) const;
158  inline bool operator!=(const patchEdgeFaceRegions&) const;
159 
160 
161  // IOstream Operators
162 
163  inline friend Ostream& operator<<
164  (
165  Ostream&,
166  const patchEdgeFaceRegions&
167  );
168  inline friend Istream& operator>>
169  (
170  Istream&,
172  );
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #include "patchEdgeFaceRegionsI.H"
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
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:57
Transport of regions for use in PatchEdgeFaceWave. Set element to -1 to denote blocked.
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.
bool operator!=(const patchEdgeFaceRegions &) const
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.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
const labelList & regions() const
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
bool operator==(const patchEdgeFaceRegions &) const
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)