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