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-2020 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  // A no-op (returns empty list) for an empty key
104  labelList indices(const keyType& key, const bool useGroups) const;
105 
106  //- Find patch index given a name
107  // A no-op (returns -1) for an empty patchName
108  label findPatchID(const word& patchName) const;
109 
110  //- Correct polyBoundaryMesh after moving points
111  void movePoints(const pointField&);
112 
113  //- Correct polyBoundaryMesh after topology update
114  void updateMesh();
115 
116 
117  // Housekeeping
118 
119  //- Identical to the indices() method (AUG-2018)
120  FOAM_DEPRECATED_FOR(2018-08, "indices() method")
121  labelList findIndices(const keyType& key, const bool useGroups) const
122  {
123  return indices(key, useGroups);
124  }
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
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:126
Foam::pointBoundaryMesh::findPatchID
label findPatchID(const word &patchName) const
Find patch index given a name.
Definition: pointBoundaryMesh.C:74
Foam::pointBoundaryMesh::updateMesh
void updateMesh()
Correct polyBoundaryMesh after topology update.
Definition: pointBoundaryMesh.C:172
Foam::keyType
A class for handling keywords in dictionaries.
Definition: keyType.H:60
Foam::Field< vector >
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:62
Foam::pointBoundaryMesh::findIndices
labelList findIndices(const keyType &key, const bool useGroups) const
Identical to the indices() method (AUG-2018)
Definition: pointBoundaryMesh.H:120
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:65
Foam::pointBoundaryMesh
Foam::pointBoundaryMesh.
Definition: pointBoundaryMesh.H:55
Foam::List< label >
Foam::FOAM_DEPRECATED_FOR
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
Definition: NamedEnum.H:69
pointPatchList.H