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 | Copyright (C) 2013-2015 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  Class patchEdgeFaceRegions Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60  // Private data
61 
62  //- Region per point
64 
65 public:
66 
67  // Constructors
68 
69  //- Construct null
70  inline patchEdgeFaceRegions();
71 
72  //- Construct from regions
73  inline patchEdgeFaceRegions(const labelList&);
74 
75  //- Construct from regions (on edge)
76  inline patchEdgeFaceRegions(const labelPair&);
77 
78 
79  // Member Functions
80 
81  // Access
82 
83  inline const labelList& regions() const;
84 
85 
86  // Needed by meshWave
87 
88  //- Check whether origin has been changed at all or
89  // still contains original (invalid) value.
90  template<class TrackingData>
91  inline bool valid(TrackingData& td) const;
92 
93  //- Apply rotation matrix
94  template<class Patch, class TrackingData>
95  inline void transform
96  (
97  const polyMesh& mesh,
98  const Patch& patch,
99  const tensor& rotTensor,
100  const scalar tol,
101  TrackingData& td
102  );
103 
104  //- Influence of face on edge
105  template<class Patch, class TrackingData>
106  inline bool updateEdge
107  (
108  const polyMesh& mesh,
109  const Patch& patch,
110  const label edgeI,
111  const label faceI,
112  const patchEdgeFaceRegions& faceInfo,
113  const scalar tol,
114  TrackingData& td
115  );
116 
117  //- New information for edge (from e.g. coupled edge)
118  template<class Patch, class TrackingData>
119  inline bool updateEdge
120  (
121  const polyMesh& mesh,
122  const Patch& patch,
123  const patchEdgeFaceRegions& edgeInfo,
124  const bool sameOrientation,
125  const scalar tol,
126  TrackingData& td
127  );
128 
129  //- Influence of edge on face.
130  template<class Patch, class TrackingData>
131  inline bool updateFace
132  (
133  const polyMesh& mesh,
134  const Patch& patch,
135  const label faceI,
136  const label edgeI,
137  const patchEdgeFaceRegions& edgeInfo,
138  const scalar tol,
139  TrackingData& td
140  );
141 
142  //- Same (like operator==)
143  template<class TrackingData>
144  inline bool equal(const patchEdgeFaceRegions&, TrackingData&) const;
145 
146 
147  // Member Operators
148 
149  // Needed for List IO
150  inline bool operator==(const patchEdgeFaceRegions&) const;
151  inline bool operator!=(const patchEdgeFaceRegions&) const;
152 
153 
154  // IOstream Operators
155 
158 };
159 
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 } // End namespace Foam
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #include "patchEdgeFaceRegionsI.H"
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::Tensor
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
Definition: complexI.H:224
patchEdgeFaceRegionsI.H
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:72
Foam::patchEdgeFaceRegions::operator==
bool operator==(const patchEdgeFaceRegions &) const
Definition: patchEdgeFaceRegionsI.H:265
Foam::patchEdgeFaceRegions::regions_
labelList regions_
Region per point.
Definition: patchEdgeFaceRegions.H:62
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:188
tensor.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::patchEdgeFaceRegions::operator!=
bool operator!=(const patchEdgeFaceRegions &) const
Definition: patchEdgeFaceRegionsI.H:274
Foam::patchEdgeFaceRegions::operator<<
friend Ostream & operator<<(Ostream &, const patchEdgeFaceRegions &)
Foam::patchEdgeFaceRegions::regions
const labelList & regions() const
Definition: patchEdgeFaceRegionsI.H:57
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:59
Foam::patchEdgeFaceRegions::valid
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
Definition: patchEdgeFaceRegionsI.H:64
labelList.H
Foam::patchEdgeFaceRegions
Transport of regions for use in PatchEdgeFaceWave.
Definition: patchEdgeFaceRegions.H:57
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::patchEdgeFaceRegions::equal
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
Definition: patchEdgeFaceRegionsI.H:253
Foam::patchEdgeFaceRegions::operator>>
friend Istream & operator>>(Istream &, patchEdgeFaceRegions &)
scalar.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::patchEdgeFaceRegions::patchEdgeFaceRegions
patchEdgeFaceRegions()
Construct null.
Definition: patchEdgeFaceRegionsI.H:30
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
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:84
labelPair.H