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 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 "MeshObject.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 :
56  public MeshObject<polyMesh, MoveableMeshObject, nonConformalBoundary>
57 {
58  // Private Data
59 
60  //- Primitive patch of the owner-orig boundary
61  indirectPrimitivePatch ownerOrigBoundary_;
62 
63  //- A map from owner-orig boundary point to mesh point
64  mutable autoPtr<labelList> meshPointOwnerOrigBoundaryPointPtr_;
65 
66  //- A map from owner-orig boundary point to mesh point
67  mutable autoPtr<labelList> ownerOrigBoundaryPointMeshPointPtr_;
68 
69  //- A map from owner-orig boundary edge to mesh edge
70  mutable autoPtr<labelList> ownerOrigBoundaryEdgeMeshEdgePtr_;
71 
72  //- Owner-orig boundary edges, referring to boundary points
73  mutable autoPtr<edgeList> ownerOrigBoundaryEdgesPtr_;
74 
75  //- Owner-orig boundary edges, referring to mesh points
76  mutable autoPtr<edgeList> ownerOrigBoundaryMeshEdgesPtr_;
77 
78  //- A map from patch point to owner-orig boundary points
79  mutable PtrList<labelList> patchPointOwnerOrigBoundaryPointsPtr_;
80 
81  //- A map from patch edge to owner-orig boundary edge
82  mutable PtrList<labelList> patchEdgeOwnerOrigBoundaryEdgesPtr_;
83 
84  //- Point normals for the owner-orig boundary
85  mutable autoPtr<vectorField> ownerOrigBoundaryPointNormalsPtr_;
86 
87  //- Old point normals for the owner-orig boundary
88  mutable autoPtr<vectorField> ownerOrigBoundaryPointNormals0Ptr_;
89 
90 
91  // Private Member Functions
92 
93  //- Construct a boundary for the given patch set
94  indirectPrimitivePatch boundary(const labelList& patches) const;
95 
96  //- Get a map from mesh point to owner-orig boundary points. Non
97  // owner-orig boundary points are indicated by the value -1.
98  const labelList& meshPointOwnerOrigBoundaryPoint() const;
99 
100  //- Get point normals for the owner-orig boundary
101  const vectorField& ownerOrigBoundaryPointNormals() const;
102 
103  //- Get old point normals for the owner-orig boundary
104  const vectorField& ownerOrigBoundaryPointNormals0() const;
105 
106 
107 public:
108 
109  //- Runtime type information
110  TypeName("nonConformalBoundary");
111 
112 
113  // Constructors
114 
115  //- Construct from a mesh
117 
118  //- Disallow default bitwise copy construction
120 
121 
122  //- Destructor
124 
125 
126  // Member Functions
127 
128  //- Update for mesh motion
129  virtual bool movePoints();
130 
131  //- Return a list of non-conformal non-coupled patch indices
133  (
134  const label side,
135  label (nonConformalCoupledPolyPatch::*method)() const
136  ) const;
137 
138  //- Return a list of the orig patch indices
139  labelList allOrigPatchIDs() const;
140 
141  //- Return a list of the error patch indices
142  labelList allErrorPatchIDs() const;
143 
144  //- Return a list of the owner-orig patch indices
146 
147  //- Return a list of the owner error patch indices
149 
150  //- Get a map from owner-orig boundary point to mesh point
152 
153  //- Get a map from owner-orig boundary edge to mesh edge
155 
156  //- Get the owner-orig boundary edges, referring to boundary points
157  const edgeList& ownerOrigBoundaryEdges() const;
158 
159  //- Get the owner-orig boundary edges, referring to mesh points
160  const edgeList& ownerOrigBoundaryMeshEdges() const;
161 
162  //- Get a map from patch point to owner-orig boundary point
164  (
165  const label patchi
166  ) const;
167 
168  //- Get a map from patch edge to owner-orig boundary edge
170  (
171  const label patchi
172  ) const;
173 
174  //- Get parallel consistent point normals for the patch
175  tmp<vectorField> patchPointNormals(const label patchi) const;
176 
177  //- Get parallel consistent old-time point normals for the patch
178  tmp<vectorField> patchPointNormals0(const label patchi) const;
179 
180 
181  // Member Operators
182 
183  //- Disallow default bitwise assignment
184  void operator=(const nonConformalBoundary&) = delete;
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
const fvPatchList & patches
virtual bool movePoints()
Update for mesh motion.
TypeName("nonConformalBoundary")
Runtime type information.
Non-conformal coupled poly patch. As nonConformalPolyPatch, but this patch is coupled to another non-...
Mesh object that stores an all boundary patch and mapping to and from it and the mesh and the individ...
tmp< vectorField > patchPointNormals0(const label patchi) const
Get parallel consistent old-time point normals for the patch.
labelList allErrorPatchIDs() const
Return a list of the error patch indices.
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 & patchEdgeOwnerOrigBoundaryEdges(const label patchi) const
Get a map from patch edge to owner-orig boundary edge.
const edgeList & ownerOrigBoundaryEdges() const
Get the owner-orig boundary edges, referring to boundary points.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:87
A list of faces which address into the list of points.
labelList allOrigPatchIDs() const
Return a list of the orig patch indices.
const labelList & patchPointOwnerOrigBoundaryPoints(const label patchi) const
Get a map from patch point to owner-orig boundary point.
nonConformalBoundary(const polyMesh &mesh)
Construct from a mesh.
const labelList & ownerOrigBoundaryPointMeshPoint() const
Get a map from owner-orig boundary point to mesh point.
const edgeList & ownerOrigBoundaryMeshEdges() const
Get the owner-orig boundary edges, referring to mesh points.
label patchi
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
labelList nonConformalNonCoupledPatchIDs(const label side, label(nonConformalCoupledPolyPatch::*method)() const) const
Return a list of non-conformal non-coupled patch indices.
labelList ownerOrigPatchIDs() const
Return a list of the owner-orig patch indices.
tmp< vectorField > patchPointNormals(const label patchi) const
Get parallel consistent point normals for the patch.
A class for managing temporary objects.
Definition: PtrList.H:53
void operator=(const nonConformalBoundary &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.