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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::patchEdgeFaceRegions
28 
29 Description
30  Transport of regions for use in PatchEdgeFaceWave.
31 
32  Set element to -1 to denote blocked.
33 
34 SourceFiles
35  patchEdgeFaceRegionsI.H
36  patchEdgeFaceRegions.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef patchEdgeFaceRegions_H
41 #define patchEdgeFaceRegions_H
42 
43 #include "labelList.H"
44 #include "scalar.H"
45 #include "tensor.H"
46 #include "labelPair.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward declaration of classes
54 class polyMesh;
55 
56 
57 // Forward declaration of friend functions and operators
58 
59 class patchEdgeFaceRegions;
60 
61 Istream& operator>>(Istream&, patchEdgeFaceRegions&);
62 Ostream& operator<<(Ostream&, const patchEdgeFaceRegions&);
63 
64 
65 /*---------------------------------------------------------------------------*\
66  Class patchEdgeFaceRegions Declaration
67 \*---------------------------------------------------------------------------*/
68 
70 {
71  // Private data
72 
73  //- Region per point
74  labelList regions_;
75 
76 public:
77 
78  // Constructors
79 
80  //- Construct null
81  inline patchEdgeFaceRegions();
82 
83  //- Construct from regions
84  inline patchEdgeFaceRegions(const labelList&);
85 
86  //- Construct from regions (on edge)
87  inline patchEdgeFaceRegions(const labelPair&);
88 
89 
90  // Member Functions
91 
92  // Access
93 
94  inline const labelList& regions() const;
95 
96 
97  // Needed by meshWave
98 
99  //- Check whether origin has been changed at all or
100  // still contains original (invalid) value.
101  template<class TrackingData>
102  inline bool valid(TrackingData& td) const;
103 
104  //- Apply rotation matrix
105  template<class Patch, class TrackingData>
106  inline void transform
107  (
108  const polyMesh& mesh,
109  const Patch& patch,
110  const tensor& rotTensor,
111  const scalar tol,
112  TrackingData& td
113  );
114 
115  //- Influence of face on edge
116  template<class Patch, class TrackingData>
117  inline bool updateEdge
118  (
119  const polyMesh& mesh,
120  const Patch& patch,
121  const label edgeI,
122  const label facei,
123  const patchEdgeFaceRegions& faceInfo,
124  const scalar tol,
125  TrackingData& td
126  );
127 
128  //- New information for edge (from e.g. coupled edge)
129  template<class Patch, class TrackingData>
130  inline bool updateEdge
131  (
132  const polyMesh& mesh,
133  const Patch& patch,
134  const patchEdgeFaceRegions& edgeInfo,
135  const bool sameOrientation,
136  const scalar tol,
137  TrackingData& td
138  );
139 
140  //- Influence of edge on face.
141  template<class Patch, class TrackingData>
142  inline bool updateFace
143  (
144  const polyMesh& mesh,
145  const Patch& patch,
146  const label facei,
147  const label edgeI,
148  const patchEdgeFaceRegions& edgeInfo,
149  const scalar tol,
150  TrackingData& td
151  );
152 
153  //- Same (like operator==)
154  template<class TrackingData>
155  inline bool equal(const patchEdgeFaceRegions&, TrackingData&) const;
156 
157 
158  // Member Operators
159 
160  // Needed for List IO
161  inline bool operator==(const patchEdgeFaceRegions&) const;
162  inline bool operator!=(const patchEdgeFaceRegions&) const;
163 
164 
165  // IOstream Operators
166 
169 };
170 
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 } // End namespace Foam
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 #include "patchEdgeFaceRegionsI.H"
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
Foam::Tensor< scalar >
patchEdgeFaceRegionsI.H
Foam::patchEdgeFaceRegions::updateFace
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.
Definition: patchEdgeFaceRegionsI.H:190
Foam::patchEdgeFaceRegions::transform
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
Definition: patchEdgeFaceRegionsI.H:74
Foam::patchEdgeFaceRegions::operator==
bool operator==(const patchEdgeFaceRegions &) const
Definition: patchEdgeFaceRegionsI.H:267
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:228
tensor.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::patchEdgeFaceRegions::operator!=
bool operator!=(const patchEdgeFaceRegions &) const
Definition: patchEdgeFaceRegionsI.H:276
Foam::patchEdgeFaceRegions::operator<<
friend Ostream & operator<<(Ostream &, const patchEdgeFaceRegions &)
Foam::patchEdgeFaceRegions::regions
const labelList & regions() const
Definition: patchEdgeFaceRegionsI.H:59
Foam::patchEdgeFaceRegions::updateEdge
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.
Definition: patchEdgeFaceRegionsI.H:86
Foam::label
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:62
Foam::patchEdgeFaceRegions::valid
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
Definition: patchEdgeFaceRegionsI.H:66
labelList.H
Foam::patchEdgeFaceRegions
Transport of regions for use in PatchEdgeFaceWave.
Definition: patchEdgeFaceRegions.H:68
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::patchEdgeFaceRegions::equal
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
Definition: patchEdgeFaceRegionsI.H:255
Foam::patchEdgeFaceRegions::operator>>
friend Istream & operator>>(Istream &, patchEdgeFaceRegions &)
scalar.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:54
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::List< label >
Foam::patchEdgeFaceRegions::patchEdgeFaceRegions
patchEdgeFaceRegions()
Construct null.
Definition: patchEdgeFaceRegionsI.H:32
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
labelPair.H