caseInfo.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::caseInfo
26 
27 Description
28  Class to hold information related to the simaulation case.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef caseInfo_H
33 #define caseInfo_H
34 
35 #include "boolList.H"
36 #include "labelList.H"
37 #include "wordList.H"
38 #include "HashSet.H"
39 #include "wordReList.H"
40 #include "IOdictionary.H"
41 #include "boundaryInfo.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class Time;
49 class boundaryTemplates;
50 
51 /*---------------------------------------------------------------------------*\
52  Class caseInfo Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class caseInfo
56 {
57  // Private data
58 
59  //- Properties dictionary
61 
62  //- Mesh boundary information (read from mesh boundary file)
64 
65  //- Boundary conditions dictionary
66  const dictionary& bcDict_;
67 
68  //- List of condition names
70 
71 
72  // Per-condition information
73 
74  //- List of patch names
76 
77  //- Patch category
79 
80  //- Patch type
82 
83 
84  // Private member functions
85 
86  //- Update the polyMesh boundary based on the patch categories
88 
89 
90 public:
91 
92  //- Constructor
93  caseInfo(const Time& runTime, const word& regionName);
94 
95 
96  // Public member functions
97 
98  //- Check patches
99  void checkPatches
100  (
101  const word& regionPrefix,
102  const boundaryTemplates& bcTemplates
103  ) const;
104 
105  //- Return the list of patch names
106  const List<wordReList>& patchNames() const;
107 
108  //- Return the condition name for patch with index patchI
109  const word& conditionName(const label patchI) const;
110 
111  //- Return the category name for patch with index patchI
112  const word& patchCategory(const label patchI) const;
113 
114  //- Return the type name for patch with index patchI
115  const word& patchType(const label patchI) const;
116 
117  //- Return the condition ID for a boundary patch
119  (
120  const label patchI,
121  const word& patchName
122  ) const;
123 
124  //- Generate boundary field (dictionary)
126  (
127  const word& regionPrefix,
128  const word& fieldName,
129  const boundaryTemplates& bcTemplates
130  ) const;
131 };
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
Foam::caseInfo::patchNames_
List< wordReList > patchNames_
List of patch names.
Definition: caseInfo.H:74
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::caseInfo::boundaryInfo_
boundaryInfo boundaryInfo_
Mesh boundary information (read from mesh boundary file)
Definition: caseInfo.H:62
boolList.H
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::caseInfo::patchTypes_
wordList patchTypes_
Patch type.
Definition: caseInfo.H:80
Foam::caseInfo::conditionName
const word & conditionName(const label patchI) const
Return the condition name for patch with index patchI.
Foam::caseInfo::patchNames
const List< wordReList > & patchNames() const
Return the list of patch names.
Foam::caseInfo::findPatchConditionID
label findPatchConditionID(const label patchI, const word &patchName) const
Return the condition ID for a boundary patch.
wordList.H
Foam::caseInfo::patchType
const word & patchType(const label patchI) const
Return the type name for patch with index patchI.
boundaryInfo.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
labelList.H
Foam::caseInfo::generateBoundaryField
dictionary generateBoundaryField(const word &regionPrefix, const word &fieldName, const boundaryTemplates &bcTemplates) const
Generate boundary field (dictionary)
Foam::caseInfo::bcDict_
const dictionary & bcDict_
Boundary conditions dictionary.
Definition: caseInfo.H:65
Foam::caseInfo::patchCategories_
wordList patchCategories_
Patch category.
Definition: caseInfo.H:77
Foam::caseInfo::caseInfo
caseInfo(const Time &runTime, const word &regionName)
Constructor.
Foam::caseInfo::updateGeometricBoundaryField
void updateGeometricBoundaryField()
Update the polyMesh boundary based on the patch categories.
Foam::caseInfo::conditionNames_
wordList conditionNames_
List of condition names.
Definition: caseInfo.H:68
HashSet.H
Foam::caseInfo::checkPatches
void checkPatches(const word &regionPrefix, const boundaryTemplates &bcTemplates) const
Check patches.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::caseInfo
Class to hold information related to the simaulation case.
Definition: caseInfo.H:54
IOdictionary.H
wordReList.H
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::caseInfo::properties_
IOdictionary properties_
Properties dictionary.
Definition: caseInfo.H:59
Foam::boundaryTemplates
Class to store boundary template specifications.
Definition: boundaryTemplates.H:53
Foam::caseInfo::patchCategory
const word & patchCategory(const label patchI) const
Return the category name for patch with index patchI.