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 | Copyright (C) 2015 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::boundaryInfo
26 
27 Description
28  Class to interrogate the polyMesh/boundary file to provide mesh patching
29  information, without the need to read the mesh.
30 
31 \*---------------------------------------------------------------------------*/
32 
33 #ifndef boundaryInfo_H
34 #define boundaryInfo_H
35 
36 #include "boolList.H"
37 #include "wordList.H"
38 #include "HashSet.H"
39 #include "IOPtrList.H"
40 #include "entry.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class Time;
48 
49 /*---------------------------------------------------------------------------*\
50  Class boundaryInfo Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class boundaryInfo
54 {
55  // Private data
56 
57  //- Boundary dictionary
59 
60  //- Patch names
62 
63  //- Patch types
65 
66  //- Constraint flag
68 
69  //- Groups per patch
71 
72  //- Set of all group names
74 
75 
76  // Private member functions
77 
78  //- Read the boundary dict
80  (
81  const Time& runTime,
82  const word& regionName
83  ) const;
84 
85 
86 public:
87 
88  //- Constructor
89  boundaryInfo(const Time& runTime, const word& regionName);
90 
91 
92  // Public member functions
93 
94  //- Patch names
95  const wordList& names() const;
96 
97  //- Patch types
98  const wordList& types() const;
99 
100  //- Constraint flag
101  const boolList& constraint() const;
102 
103  //- Groups
104  const List<wordList>& groups() const;
105 
106  //- Set of all group names
107  const wordHashSet& allGroupNames() const;
108 
109  //- Set the patch type based on the condition
110  void setType(const label patchI, const word& condition);
111 
112  //- Write the boundary dictionary
113  void write() const;
114 };
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
Foam::boundaryInfo::constraint_
boolList constraint_
Constraint flag.
Definition: boundaryInfo.H:66
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
boolList.H
Foam::boundaryInfo::names
const wordList & names() const
Patch names.
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::IOPtrList
A PtrList of objects of type <T> with automated input and output.
Definition: IOPtrList.H:50
Foam::boundaryInfo::boundaryDict_
IOPtrList< entry > boundaryDict_
Boundary dictionary.
Definition: boundaryInfo.H:57
Foam::boundaryInfo::constraint
const boolList & constraint() const
Constraint flag.
Foam::boundaryInfo::allGroupNames_
wordHashSet allGroupNames_
Set of all group names.
Definition: boundaryInfo.H:72
Foam::boundaryInfo::groups
const List< wordList > & groups() const
Groups.
Foam::HashSet
A HashTable with keys but without contents.
Definition: HashSet.H:59
entry.H
wordList.H
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
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:59
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.
Foam::boundaryInfo::readBoundaryDict
IOPtrList< entry > readBoundaryDict(const Time &runTime, const word &regionName) const
Read the boundary dict.
Foam::boundaryInfo::names_
wordList names_
Patch names.
Definition: boundaryInfo.H:60
HashSet.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::boundaryInfo::boundaryInfo
boundaryInfo(const Time &runTime, const word &regionName)
Constructor.
Foam::boundaryInfo::types_
wordList types_
Patch types.
Definition: boundaryInfo.H:63
Foam::boundaryInfo::types
const wordList & types() const
Patch types.
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::boundaryInfo
Class to interrogate the polyMesh/boundary file to provide mesh patching information,...
Definition: boundaryInfo.H:52
Foam::boundaryInfo::groups_
List< wordList > groups_
Groups per patch.
Definition: boundaryInfo.H:69
Foam::boundaryInfo::write
void write() const
Write the boundary dictionary.