PatchEdgeFacePointData.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) 2011-2023 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::PatchEdgeFacePointData
26 
27 Description
28  Transport of nearest point location, plus data, for use in
29  PatchEdgeFaceWave
30 
31 SourceFiles
32  PatchEdgeFacePointDataI.H
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef PatchEdgeFacePointData_H
37 #define PatchEdgeFacePointData_H
38 
39 #include "patchEdgeFacePoint.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declaration of classes
47 class polyPatch;
48 class polyMesh;
49 
50 // Forward declaration of friend functions and operators
51 template<class Type>
52 class PatchEdgeFacePointData;
53 template<class Type>
55 template<class Type>
57 
58 /*---------------------------------------------------------------------------*\
59  Class PatchEdgeFacePointData Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class Type>
64 :
65  public patchEdgeFacePoint
66 {
67  // Private Data
68 
69  //- Data at nearest wall centre
70  Type data_;
71 
72 
73 public:
74 
75  // Constructors
76 
77  //- Construct null
78  inline PatchEdgeFacePointData();
79 
80  //- Construct from data, origin, distance
81  inline PatchEdgeFacePointData(const Type&, const point&, const scalar);
82 
83 
84  // Member Functions
85 
86  // Access
87 
88  inline const Type& data() const;
89 
90  inline Type& data();
91 
92  template<class TrackingData>
93  inline const Type& data(TrackingData& td) const;
94 
95 
96  // Needed by meshWave
97 
98  //- Apply rotation matrix
99  template<class TrackingData>
100  inline void transform
101  (
102  const polyMesh& mesh,
103  const primitivePatch& patch,
104  const tensor& rotTensor,
105  const scalar tol,
106  TrackingData& td
107  );
108 
109  //- Influence of face on edge
110  template<class TrackingData>
111  inline bool updateEdge
112  (
113  const polyMesh& mesh,
114  const primitivePatch& patch,
115  const label edgei,
116  const label facei,
117  const PatchEdgeFacePointData<Type>& faceInfo,
118  const scalar tol,
119  TrackingData& td
120  );
121 
122  //- New information for edge (from e.g. coupled edge)
123  template<class TrackingData>
124  inline bool updateEdge
125  (
126  const polyMesh& mesh,
127  const primitivePatch& patch,
128  const PatchEdgeFacePointData<Type>& edgeInfo,
129  const bool sameOrientation,
130  const scalar tol,
131  TrackingData& td
132  );
133 
134  //- Influence of edge on face
135  template<class TrackingData>
136  inline bool updateFace
137  (
138  const polyMesh& mesh,
139  const primitivePatch& patch,
140  const label facei,
141  const label edgei,
142  const PatchEdgeFacePointData<Type>& edgeInfo,
143  const scalar tol,
144  TrackingData& td
145  );
146 
147 
148  // IOstream Operators
149 
150  friend Ostream& operator<< <Type>
151  (
152  Ostream&,
154  );
155  friend Istream& operator>> <Type>
156  (
157  Istream&,
159  );
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #define DefineContiguousPatchEdgeFacePointDataType(Type, nullArg) \
166  template<> \
167  inline bool contiguous<PatchEdgeFacePointData<Type>>() \
168  { \
169  return true; \
170  }
171 
175 
176 #undef DefineContiguousPatchEdgeFacePointDataType
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #include "PatchEdgeFacePointDataI.H"
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
#define DefineContiguousPatchEdgeFacePointDataType(Type, nullArg)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Transport of nearest point location, plus data, for use in PatchEdgeFaceWave.
bool updateFace(const polyMesh &mesh, const primitivePatch &patch, const label facei, const label edgei, const PatchEdgeFacePointData< Type > &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
bool updateEdge(const polyMesh &mesh, const primitivePatch &patch, const label edgei, const label facei, const PatchEdgeFacePointData< Type > &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
void transform(const polyMesh &mesh, const primitivePatch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
Transport of nearest point location for use in PatchEdgeFaceWave.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Namespace for OpenFOAM.
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
Istream & operator>>(Istream &, pistonPointEdgeData &)
Ostream & operator<<(Ostream &os, const fvConstraints &constraints)
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)