patchFaceOrientation.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::patchFaceOrientation
26 
27 Description
28  Transport of orientation for use in PatchEdgeFaceWave.
29 
30 SourceFiles
31  patchFaceOrientationI.H
32  patchFaceOrientation.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef patchFaceOrientation_H
37 #define patchFaceOrientation_H
38 
39 #include "tensor.H"
40 #include "indirectPrimitivePatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 class polyMesh;
49 
50 /*---------------------------------------------------------------------------*\
51  Class patchFaceOrientation Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
58  //- Flip status
60 
61 public:
62 
63  // Constructors
64 
65  //- Construct null
66  inline patchFaceOrientation();
67 
68  //- Construct from components
69  inline patchFaceOrientation(const label);
70 
71 
72  // Member Functions
73 
74  //- Orientation
75  inline label flipStatus() const;
76 
77  //- Reverse orientation
78  inline void flip();
79 
80 
81  // Needed by meshWave
82 
83  //- Check whether origin has been changed at all or
84  // still contains original (invalid) value.
85  template<class TrackingData>
86  inline bool valid(TrackingData& td) const;
87 
88  //- Apply rotation matrix
89  template<class TrackingData>
90  inline void transform
91  (
92  const polyMesh& mesh,
93  const indirectPrimitivePatch& patch,
94  const tensor& rotTensor,
95  const scalar tol,
96  TrackingData& td
97  );
98 
99  //- Influence of face on edge
100  template<class TrackingData>
101  inline bool updateEdge
102  (
103  const polyMesh& mesh,
104  const indirectPrimitivePatch& patch,
105  const label edgeI,
106  const label faceI,
107  const patchFaceOrientation& faceInfo,
108  const scalar tol,
109  TrackingData& td
110  );
111 
112  //- New information for edge (from e.g. coupled edge)
113  template<class TrackingData>
114  inline bool updateEdge
115  (
116  const polyMesh& mesh,
117  const indirectPrimitivePatch& patch,
118  const patchFaceOrientation& edgeInfo,
119  const bool sameOrientation,
120  const scalar tol,
121  TrackingData& td
122  );
123 
124  //- Influence of edge on face.
125  template<class TrackingData>
126  inline bool updateFace
127  (
128  const polyMesh& mesh,
129  const indirectPrimitivePatch& patch,
130  const label faceI,
131  const label edgeI,
132  const patchFaceOrientation& edgeInfo,
133  const scalar tol,
134  TrackingData& td
135  );
136 
137  //- Same (like operator==)
138  template<class TrackingData>
139  inline bool equal(const patchFaceOrientation&, TrackingData&) const;
140 
141 
142  // Member Operators
143 
144  // Needed for List IO
145  inline bool operator==(const patchFaceOrientation&) const;
146  inline bool operator!=(const patchFaceOrientation&) const;
147 
148 
149  // IOstream Operators
150 
153 };
154 
155 
156 //- Data associated with patchFaceOrientation type are contiguous
157 template<>
159 {
160  return true;
161 }
162 
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 } // End namespace Foam
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #include "patchFaceOrientationI.H"
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
Foam::Tensor
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
Definition: complexI.H:224
Foam::patchFaceOrientation
Transport of orientation for use in PatchEdgeFaceWave.
Definition: patchFaceOrientation.H:53
Foam::patchFaceOrientation::operator==
bool operator==(const patchFaceOrientation &) const
Definition: patchFaceOrientationI.H:210
Foam::patchFaceOrientation::transform
void transform(const polyMesh &mesh, const indirectPrimitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
Definition: patchFaceOrientationI.H:77
Foam::patchFaceOrientation::flip
void flip()
Reverse orientation.
Definition: patchFaceOrientationI.H:55
tensor.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
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::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::patchFaceOrientation::updateEdge
bool updateEdge(const polyMesh &mesh, const indirectPrimitivePatch &patch, const label edgeI, const label faceI, const patchFaceOrientation &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
Definition: patchFaceOrientationI.H:89
Foam::patchFaceOrientation::updateFace
bool updateFace(const polyMesh &mesh, const indirectPrimitivePatch &patch, const label faceI, const label edgeI, const patchFaceOrientation &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
Definition: patchFaceOrientationI.H:156
Foam::patchFaceOrientation::patchFaceOrientation
patchFaceOrientation()
Construct null.
Definition: patchFaceOrientationI.H:32
Foam::patchFaceOrientation::valid
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
Definition: patchFaceOrientationI.H:69
Foam::patchFaceOrientation::operator!=
bool operator!=(const patchFaceOrientation &) const
Definition: patchFaceOrientationI.H:219
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::patchFaceOrientation::operator>>
friend Istream & operator>>(Istream &, patchFaceOrientation &)
Foam::patchFaceOrientation::equal
bool equal(const patchFaceOrientation &, TrackingData &) const
Same (like operator==)
Definition: patchFaceOrientationI.H:198
Foam::patchFaceOrientation::flipStatus_
label flipStatus_
Flip status.
Definition: patchFaceOrientation.H:58
patchFaceOrientationI.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::patchFaceOrientation::operator<<
friend Ostream & operator<<(Ostream &, const patchFaceOrientation &)
Foam::contiguous< patchFaceOrientation >
bool contiguous< patchFaceOrientation >()
Data associated with patchFaceOrientation type are contiguous.
Definition: patchFaceOrientation.H:157
Foam::patchFaceOrientation::flipStatus
label flipStatus() const
Orientation.
Definition: patchFaceOrientationI.H:49
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatchTemplate.H:88