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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2015 OpenFOAM Foundation
9 Copyright (C) 2019-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::patchFaceOrientation
29
30Description
31 Transport of orientation for use in PatchEdgeFaceWave.
32
33SourceFiles
34 patchFaceOrientationI.H
35 patchFaceOrientation.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef patchFaceOrientation_H
40#define patchFaceOrientation_H
41
42#include "tensor.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50// Forward Declarations
51class polyMesh;
52class patchFaceOrientation;
53
54Istream& operator>>(Istream&, patchFaceOrientation&);
55Ostream& operator<<(Ostream&, const patchFaceOrientation&);
56
57/*---------------------------------------------------------------------------*\
58 Class patchFaceOrientation Declaration
59\*---------------------------------------------------------------------------*/
62{
63 // Private Data
64
65 //- Flip status
66 label flipStatus_;
67
68public:
69
70 // Constructors
71
72 //- Default construct
73 inline patchFaceOrientation();
74
75 //- Construct from components
76 inline patchFaceOrientation(const label);
77
78
79 // Member Functions
80
81 // Access
82
83 //- Orientation
84 label flipStatus() const
85 {
86 return flipStatus_;
87 }
88
89 //- Reverse the orientation
90 inline void flip();
91
92
93 // Needed by MeshWave
94
95 //- Changed or contains original (invalid) value
96 template<class TrackingData>
97 inline bool valid(TrackingData& td) const;
98
99 //- Apply rotation matrix
100 template<class TrackingData>
101 inline void transform
102 (
103 const polyMesh& mesh,
104 const indirectPrimitivePatch& patch,
105 const tensor& rotTensor,
106 const scalar tol,
107 TrackingData& td
108 );
109
110 //- Influence of face on edge
111 template<class TrackingData>
112 inline bool updateEdge
113 (
114 const polyMesh& mesh,
115 const indirectPrimitivePatch& patch,
116 const label edgeI,
117 const label facei,
118 const patchFaceOrientation& faceInfo,
119 const scalar tol,
120 TrackingData& td
121 );
122
123 //- New information for edge (from e.g. coupled edge)
124 template<class TrackingData>
125 inline bool updateEdge
126 (
127 const polyMesh& mesh,
128 const indirectPrimitivePatch& patch,
129 const patchFaceOrientation& edgeInfo,
130 const bool sameOrientation,
131 const scalar tol,
132 TrackingData& td
133 );
134
135 //- Influence of edge on face.
136 template<class TrackingData>
137 inline bool updateFace
138 (
139 const polyMesh& mesh,
140 const indirectPrimitivePatch& patch,
141 const label facei,
142 const label edgeI,
143 const patchFaceOrientation& edgeInfo,
144 const scalar tol,
145 TrackingData& td
146 );
147
148 //- Test for equality, with TrackingData
149 template<class TrackingData>
150 inline bool equal(const patchFaceOrientation&, TrackingData&) const;
151
152
153 // Member Operators
154
155 //- Test for equality
156 inline bool operator==(const patchFaceOrientation&) const;
157
158 //- Test for equality
159 inline bool operator!=(const patchFaceOrientation&) const;
160
161
162 // IOstream Operators
166};
167
168
169// * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
170
171//- Contiguous data for patchFaceOrientation
172template<> struct is_contiguous<patchFaceOrientation> : std::true_type {};
173
174//- Contiguous label data for patchFaceOrientation
175template<> struct is_contiguous_label<patchFaceOrientation> : std::true_type {};
176
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180} // End namespace Foam
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A list of faces which address into the list of points.
Transport of orientation for use in PatchEdgeFaceWave.
void flip()
Reverse the orientation.
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.
bool operator!=(const patchFaceOrientation &) const
Test for equality.
bool operator==(const patchFaceOrientation &) const
Test for equality.
friend Ostream & operator<<(Ostream &, const patchFaceOrientation &)
patchFaceOrientation()
Default construct.
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.
label flipStatus() const
Orientation.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
bool equal(const patchFaceOrientation &, TrackingData &) const
Test for equality, with TrackingData.
void transform(const polyMesh &mesh, const indirectPrimitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
friend Istream & operator>>(Istream &, patchFaceOrientation &)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Istream & operator>>(Istream &, directionInfo &)
A template class to specify if a data type is composed solely of Foam::label elements.
Definition: contiguous.H:86
A template class to specify that a data type can be considered as being contiguous in memory.
Definition: contiguous.H:78