boundaryInfo.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) 2015 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::boundaryInfo
28 
29 Description
30  Class to interrogate the polyMesh/boundary file to provide mesh patching
31  information, without the need to read the mesh.
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef boundaryInfo_H
36 #define boundaryInfo_H
37 
38 #include "boolList.H"
39 #include "wordList.H"
40 #include "HashSet.H"
41 #include "IOPtrList.H"
42 #include "entry.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class Time;
50 
51 /*---------------------------------------------------------------------------*\
52  Class boundaryInfo Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class boundaryInfo
56 {
57  // Private data
58 
59  //- Boundary dictionary
60  IOPtrList<entry> boundaryDict_;
61 
62  //- Patch names
63  wordList names_;
64 
65  //- Patch types
66  wordList types_;
67 
68  //- Constraint flag
69  boolList constraint_;
70 
71  //- Groups per patch
72  List<wordList> groups_;
73 
74  //- Set of all group names
75  wordHashSet allGroupNames_;
76 
77 
78  // Private member functions
79 
80  //- Read the boundary dict
81  IOPtrList<entry> readBoundaryDict
82  (
83  const Time& runTime,
84  const word& regionName
85  ) const;
86 
87 
88 public:
89 
90  //- Constructor
91  boundaryInfo(const Time& runTime, const word& regionName);
92 
93 
94  // Public member functions
95 
96  //- Patch names
97  const wordList& names() const;
98 
99  //- Patch types
100  const wordList& types() const;
101 
102  //- Constraint flag
103  const boolList& constraint() const;
104 
105  //- Groups
106  const List<wordList>& groups() const;
107 
108  //- Set of all group names
109  const wordHashSet& allGroupNames() const;
110 
111  //- Set the patch type based on the condition
112  void setType(const label patchI, const word& condition);
113 
114  //- Write the boundary dictionary
115  void write() const;
116 };
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 } // End namespace Foam
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 #endif
125 
126 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
boolList.H
Foam::boundaryInfo::names
const wordList & names() const
Patch names.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::IOPtrList
A PtrList of objects of type <T> with automated input and output.
Definition: IOPtrList.H:53
Foam::boundaryInfo::constraint
const boolList & constraint() const
Constraint flag.
Foam::boundaryInfo::groups
const List< wordList > & groups() const
Groups.
Foam::HashSet< word, Hash< word > >
entry.H
wordList.H
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::boundaryInfo::allGroupNames
const wordHashSet & allGroupNames() const
Set of all group names.
IOPtrList.H
Foam::boundaryInfo::setType
void setType(const label patchI, const word &condition)
Set the patch type based on the condition.
HashSet.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::boundaryInfo::boundaryInfo
boundaryInfo(const Time &runTime, const word &regionName)
Constructor.
Foam::boundaryInfo::types
const wordList & types() const
Patch types.
Foam::List< word >
Foam::boundaryInfo
Class to interrogate the polyMesh/boundary file to provide mesh patching information,...
Definition: boundaryInfo.H:54
Foam::boundaryInfo::write
void write() const
Write the boundary dictionary.