pointBoundaryMesh.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) 2011-2013 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::pointBoundaryMesh
29 
30 Description
31  Foam::pointBoundaryMesh
32 
33 SourceFiles
34  pointBoundaryMesh.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef pointBoundaryMesh_H
39 #define pointBoundaryMesh_H
40 
41 #include "pointPatchList.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 // Forward declarations
49 class pointMesh;
50 class polyBoundaryMesh;
51 
52 /*---------------------------------------------------------------------------*\
53  Class pointBoundaryMesh Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public pointPatchList
59 {
60  // Private data
61 
62  //- Reference to mesh
63  const pointMesh& mesh_;
64 
65 
66  // Private Member Functions
67 
68  //- Calculate geometry for the patches (transformation tensors etc.)
69  void calcGeometry();
70 
71  //- No copy construct
72  pointBoundaryMesh(const pointBoundaryMesh&) = delete;
73 
74  //- No copy assignment
75  void operator=(const pointBoundaryMesh&) = delete;
76 
77 
78 public:
79 
80  //- Declare friendship with pointMesh
81  friend class pointMesh;
82 
83 
84  // Constructors
85 
86  //- Construct from polyBoundaryMesh
88  (
89  const pointMesh&,
90  const polyBoundaryMesh&
91  );
92 
93 
94  // Member Functions
95 
96  //- Return the mesh reference
97  const pointMesh& mesh() const
98  {
99  return mesh_;
100  }
101 
102  //- Find patch indices given a name
103  labelList indices(const keyType& key, const bool useGroups) const;
104 
105  //- Find patch index given a name
106  label findPatchID(const word& patchName) const;
107 
108  //- Correct polyBoundaryMesh after moving points
109  void movePoints(const pointField&);
110 
111  //- Correct polyBoundaryMesh after topology update
112  void updateMesh();
113 
114 
115  // Housekeeping
116 
117  //- Identical to the indices() method (AUG-2018)
118  labelList findIndices(const keyType& key, const bool useGroups) const
119  {
120  return indices(key, useGroups);
121  }
122 
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::pointBoundaryMesh::movePoints
void movePoints(const pointField &)
Correct polyBoundaryMesh after moving points.
Definition: pointBoundaryMesh.C:127
Foam::pointBoundaryMesh::findPatchID
label findPatchID(const word &patchName) const
Find patch index given a name.
Definition: pointBoundaryMesh.C:75
Foam::pointBoundaryMesh::updateMesh
void updateMesh()
Correct polyBoundaryMesh after topology update.
Definition: pointBoundaryMesh.C:173
Foam::keyType
A class for handling keywords in dictionaries.
Definition: keyType.H:60
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:62
Foam::Field< vector >
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:65
Foam::pointBoundaryMesh::findIndices
labelList findIndices(const keyType &key, const bool useGroups) const
Identical to the indices() method (AUG-2018)
Definition: pointBoundaryMesh.H:117
Foam::pointBoundaryMesh::mesh
const pointMesh & mesh() const
Return the mesh reference.
Definition: pointBoundaryMesh.H:96
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:50
Foam::pointBoundaryMesh::indices
labelList indices(const keyType &key, const bool useGroups) const
Find patch indices given a name.
Definition: pointBoundaryMesh.C:66
Foam::pointBoundaryMesh
Foam::pointBoundaryMesh.
Definition: pointBoundaryMesh.H:55
Foam::List< label >
pointPatchList.H