nonConformalBoundary.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) 2022-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::nonConformalBoundary
26 
27 Description
28  Mesh object that stores an all boundary patch and mapping to and from it
29  and the mesh and the individual patches
30 
31 SourceFiles
32  nonConformalBoundary.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef nonConformalBoundary_H
37 #define nonConformalBoundary_H
38 
39 #include "DemandDrivenMeshObject.H"
40 #include "polyMesh.H"
41 #include "indirectPrimitivePatch.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class nonConformalCoupledPolyPatch;
49 
50 /*---------------------------------------------------------------------------*\
51  Class nonConformalBoundary Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
57  <
58  polyMesh,
59  MoveableMeshObject,
60  nonConformalBoundary
61  >
62 {
63  // Private Data
64 
65  //- Primitive patch of the owner-orig boundary
66  indirectPrimitivePatch ownerOrigBoundary_;
67 
68  //- A map from owner-orig boundary point to mesh point
69  mutable autoPtr<labelList> meshPointOwnerOrigBoundaryPointPtr_;
70 
71  //- A map from owner-orig boundary point to mesh point
72  mutable autoPtr<labelList> ownerOrigBoundaryPointMeshPointPtr_;
73 
74  //- A map from owner-orig boundary edge to mesh edge
75  mutable autoPtr<labelList> ownerOrigBoundaryEdgeMeshEdgePtr_;
76 
77  //- Owner-orig boundary edges, referring to boundary points
78  mutable autoPtr<edgeList> ownerOrigBoundaryEdgesPtr_;
79 
80  //- Owner-orig boundary edges, referring to mesh points
81  mutable autoPtr<edgeList> ownerOrigBoundaryMeshEdgesPtr_;
82 
83  //- A map from patch point to owner-orig boundary points
84  mutable PtrList<labelList> patchPointOwnerOrigBoundaryPointsPtr_;
85 
86  //- A map from patch edge to owner-orig boundary edge
87  mutable PtrList<labelList> patchEdgeOwnerOrigBoundaryEdgesPtr_;
88 
89  //- Point normals for the owner-orig boundary
90  mutable autoPtr<vectorField> ownerOrigBoundaryPointNormalsPtr_;
91 
92  //- Old point normals for the owner-orig boundary
93  mutable autoPtr<vectorField> ownerOrigBoundaryPointNormals0Ptr_;
94 
95 
96  // Private Member Functions
97 
98  //- Construct a boundary for the given patch set
100 
101  //- Get a map from mesh point to owner-orig boundary points. Non
102  // owner-orig boundary points are indicated by the value -1.
103  const labelList& meshPointOwnerOrigBoundaryPoint() const;
104 
105  //- Get point normals for the owner-orig boundary
106  const vectorField& ownerOrigBoundaryPointNormals() const;
107 
108  //- Get old point normals for the owner-orig boundary
109  const vectorField& ownerOrigBoundaryPointNormals0() const;
110 
111 
112 protected:
113 
114  friend class DemandDrivenMeshObject
115  <
116  polyMesh,
119  >;
120 
121  // Protected Constructors
122 
123  //- Construct from mesh
124  explicit nonConformalBoundary(const polyMesh& mesh);
125 
126 
127 public:
128 
129  //- Runtime type information
130  TypeName("nonConformalBoundary");
131 
132 
133  // Constructors
134 
135  //- Disallow default bitwise copy construction
137 
138 
139  //- Destructor
141 
142 
143  // Member Functions
144 
145  //- Update for mesh motion
146  virtual bool movePoints();
147 
148  //- Return a list of non-conformal non-coupled patch indices
150  (
151  const label side,
152  label (nonConformalCoupledPolyPatch::*method)() const
153  ) const;
154 
155  //- Return a list of the orig patch indices
156  labelList allOrigPatchIDs() const;
157 
158  //- Return a list of the error patch indices
159  labelList allErrorPatchIDs() const;
160 
161  //- Return a list of the owner-orig patch indices
163 
164  //- Return a list of the owner error patch indices
166 
167  //- Get a map from owner-orig boundary point to mesh point
169 
170  //- Get a map from owner-orig boundary edge to mesh edge
172 
173  //- Get the owner-orig boundary edges, referring to boundary points
174  const edgeList& ownerOrigBoundaryEdges() const;
175 
176  //- Get the owner-orig boundary edges, referring to mesh points
177  const edgeList& ownerOrigBoundaryMeshEdges() const;
178 
179  //- Get a map from patch point to owner-orig boundary point
181  (
182  const label patchi
183  ) const;
184 
185  //- Get a map from patch edge to owner-orig boundary edge
187  (
188  const label patchi
189  ) const;
190 
191  //- Get parallel consistent point normals for the patch
193 
194  //- Get parallel consistent old-time point normals for the patch
196 
197 
198  // Member Operators
199 
200  //- Disallow default bitwise assignment
201  void operator=(const nonConformalBoundary&) = delete;
202 };
203 
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 } // End namespace Foam
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Mesh object that stores an all boundary patch and mapping to and from it and the mesh and the individ...
virtual bool movePoints()
Update for mesh motion.
labelList ownerOrigPatchIDs() const
Return a list of the owner-orig patch indices.
labelList allErrorPatchIDs() const
Return a list of the error patch indices.
labelList allOrigPatchIDs() const
Return a list of the orig patch indices.
TypeName("nonConformalBoundary")
Runtime type information.
const edgeList & ownerOrigBoundaryMeshEdges() const
Get the owner-orig boundary edges, referring to mesh points.
tmp< vectorField > patchPointNormals(const label patchi) const
Get parallel consistent point normals for the patch.
const labelList & patchEdgeOwnerOrigBoundaryEdges(const label patchi) const
Get a map from patch edge to owner-orig boundary edge.
nonConformalBoundary(const polyMesh &mesh)
Construct from mesh.
const labelList & ownerOrigBoundaryEdgeMeshEdge() const
Get a map from owner-orig boundary edge to mesh edge.
labelList ownerErrorPatchIDs() const
Return a list of the owner error patch indices.
const labelList & patchPointOwnerOrigBoundaryPoints(const label patchi) const
Get a map from patch point to owner-orig boundary point.
tmp< vectorField > patchPointNormals0(const label patchi) const
Get parallel consistent old-time point normals for the patch.
void operator=(const nonConformalBoundary &)=delete
Disallow default bitwise assignment.
labelList nonConformalNonCoupledPatchIDs(const label side, label(nonConformalCoupledPolyPatch::*method)() const) const
Return a list of non-conformal non-coupled patch indices.
const labelList & ownerOrigBoundaryPointMeshPoint() const
Get a map from owner-orig boundary point to mesh point.
const edgeList & ownerOrigBoundaryEdges() const
Get the owner-orig boundary edges, referring to boundary points.
Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch is coupled to another non-...
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A class for managing temporary objects.
Definition: tmp.H:55
label patchi
const fvPatchList & patches
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
faceListList boundary(nPatches)