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