fvBoundaryMesh.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 | Copyright (C) 2011 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::fvBoundaryMesh
26 
27 Description
28  Foam::fvBoundaryMesh
29 
30 SourceFiles
31  fvBoundaryMesh.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef fvBoundaryMesh_H
36 #define fvBoundaryMesh_H
37 
38 #include "fvPatchList.H"
39 #include "lduInterfacePtrsList.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 class fvMesh;
47 class polyBoundaryMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class fvBoundaryMesh Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class fvBoundaryMesh
54 :
55  public fvPatchList
56 {
57  // Private data
58 
59  //- Reference to mesh
60  const fvMesh& mesh_;
61 
62 
63  // Private Member Functions
64 
65  //- Disable default copy construct
67 
68  //- Disallow assignment
69  void operator=(const fvBoundaryMesh&);
70 
71  //- Add fvPatches corresponding to the given polyBoundaryMesh
72  void addPatches(const polyBoundaryMesh&);
73 
74 
75 protected:
76 
77  //- Update boundary based on new polyBoundaryMesh
78  void readUpdate(const polyBoundaryMesh&);
79 
80 
81 public:
82 
83  friend class fvMesh;
84 
85 
86  // Constructors
87 
88  //- Construct with zero size
89  fvBoundaryMesh(const fvMesh&);
90 
91  //- Construct from polyBoundaryMesh
92  fvBoundaryMesh(const fvMesh&, const polyBoundaryMesh&);
93 
94 
95  // Member Functions
96 
97  // Access
98 
99  //- Return the mesh reference
100  const fvMesh& mesh() const
101  {
102  return mesh_;
103  }
104 
105  //- Return a list of pointers for each patch
106  // with only those pointing to interfaces being set
108 
109  //- Find patch index given a name
110  label findPatchID(const word& patchName) const;
111 
112  //- Find patch indices given a name
113  labelList findIndices(const keyType&, const bool useGroups) const;
114 
115 
116  //- Correct patches after moving points
117  void movePoints();
118 
119 
120  // Member Operators
121 
122  //- Return const and non-const reference to fvPatch by index.
123  using fvPatchList::operator[];
124 
125  //- Return const reference to fvPatch by name.
126  const fvPatch& operator[](const word&) const;
127 
128  //- Return reference to fvPatch by name.
129  fvPatch& operator[](const word&);
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
const fvPatch & operator[](const word &) const
Return const reference to fvPatch by name.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
labelList findIndices(const keyType &, const bool useGroups) const
Find patch indices given a name.
Foam::fvBoundaryMesh.
A class for handling words, derived from string.
Definition: word.H:59
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
friend Ostream & operator(Ostream &, const PtrList< T > &)
Namespace for OpenFOAM.
A class for handling keywords in dictionaries.
Definition: keyType.H:56
void movePoints()
Correct patches after moving points.
Foam::polyBoundaryMesh.
label findPatchID(const word &patchName) const
Find patch index given a name.
const fvMesh & mesh() const
Return the mesh reference.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
void readUpdate(const polyBoundaryMesh &)
Update boundary based on new polyBoundaryMesh.