All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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-2019 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 
30  Set element to -1 to denote blocked.
31 
32 SourceFiles
33  patchEdgeFaceRegionsI.H
34  patchEdgeFaceRegions.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef patchEdgeFaceRegions_H
39 #define patchEdgeFaceRegions_H
40 
41 #include "labelList.H"
42 #include "scalar.H"
43 #include "tensor.H"
44 #include "labelPair.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward declaration of classes
52 class polyMesh;
53 
54 
55 // Forward declaration of friend functions and operators
56 
57 class patchEdgeFaceRegions;
58 
59 Istream& operator>>(Istream&, patchEdgeFaceRegions&);
60 Ostream& operator<<(Ostream&, const patchEdgeFaceRegions&);
61 
62 
63 /*---------------------------------------------------------------------------*\
64  Class patchEdgeFaceRegions Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 {
69  // Private Data
70 
71  //- Region per point
72  labelList regions_;
73 
74 public:
75 
76  // Constructors
77 
78  //- Construct null
79  inline patchEdgeFaceRegions();
80 
81  //- Construct from regions
82  inline patchEdgeFaceRegions(const labelList&);
83 
84  //- Construct from regions (on edge)
85  inline patchEdgeFaceRegions(const labelPair&);
86 
87 
88  // Member Functions
89 
90  // Access
91 
92  inline const labelList& regions() const;
93 
94 
95  // Needed by meshWave
96 
97  //- Check whether origin has been changed at all or
98  // still contains original (invalid) value.
99  template<class TrackingData>
100  inline bool valid(TrackingData& td) const;
101 
102  //- Apply rotation matrix
103  template<class Patch, class TrackingData>
104  inline void transform
105  (
106  const polyMesh& mesh,
107  const Patch& patch,
108  const tensor& rotTensor,
109  const scalar tol,
110  TrackingData& td
111  );
112 
113  //- Influence of face on edge
114  template<class Patch, class TrackingData>
115  inline bool updateEdge
116  (
117  const polyMesh& mesh,
118  const Patch& patch,
119  const label edgeI,
120  const label facei,
121  const patchEdgeFaceRegions& faceInfo,
122  const scalar tol,
123  TrackingData& td
124  );
125 
126  //- New information for edge (from e.g. coupled edge)
127  template<class Patch, class TrackingData>
128  inline bool updateEdge
129  (
130  const polyMesh& mesh,
131  const Patch& patch,
132  const patchEdgeFaceRegions& edgeInfo,
133  const bool sameOrientation,
134  const scalar tol,
135  TrackingData& td
136  );
137 
138  //- Influence of edge on face.
139  template<class Patch, class TrackingData>
140  inline bool updateFace
141  (
142  const polyMesh& mesh,
143  const Patch& patch,
144  const label facei,
145  const label edgeI,
146  const patchEdgeFaceRegions& edgeInfo,
147  const scalar tol,
148  TrackingData& td
149  );
150 
151  //- Same (like operator==)
152  template<class TrackingData>
153  inline bool equal(const patchEdgeFaceRegions&, TrackingData&) const;
154 
155 
156  // Member Operators
157 
158  // Needed for List IO
159  inline bool operator==(const patchEdgeFaceRegions&) const;
160  inline bool operator!=(const patchEdgeFaceRegions&) const;
161 
162 
163  // IOstream Operators
164 
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #include "patchEdgeFaceRegionsI.H"
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
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
friend Ostream & operator<<(Ostream &, const patchEdgeFaceRegions &)
bool operator!=(const patchEdgeFaceRegions &) const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
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.
Transport of regions for use in PatchEdgeFaceWave.
patchEdgeFaceRegions()
Construct null.
dynamicFvMesh & mesh
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
Istream & operator>>(Istream &, directionInfo &)
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
bool operator==(const patchEdgeFaceRegions &) const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
const labelList & regions() const
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
Ostream & operator<<(Ostream &, const ensightPart &)
friend Istream & operator>>(Istream &, patchEdgeFaceRegions &)
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.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Namespace for OpenFOAM.