regionProperties.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) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2018 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::regionProperties
29 
30 Description
31  Simple class to hold region information for coupled region simulations.
32 
33  Gives per physics ('fluid', 'solid') the names of the regions. There
34  is no assumption on this level that a region should only have a single
35  set of physics.
36 
37 SourceFiles
38  regionProperties.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef regionProperties_H
43 #define regionProperties_H
44 
45 #include "HashTable.H"
46 #include "wordList.H"
47 #include "IOobject.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 // Forward Declarations
55 class Time;
56 
57 /*---------------------------------------------------------------------------*\
58  Class regionProperties Declaration
59 \*---------------------------------------------------------------------------*/
60 
61 class regionProperties
62 :
63  public HashTable<wordList>
64 {
65 public:
66 
67  // Constructors
68 
69  //- Construct from Time
70  explicit regionProperties(const Time& runTime);
71 
72  //- Construct from Time with specified read options
74  (
75  const Time& runTime,
77  );
78 
79 
80  //- Destructor
81  ~regionProperties() = default;
82 
83 
84  // Member Functions
85 
86  //- Total count of all region names.
87  label count() const;
88 
89  //- The region names. Sorted by region type.
90  wordList names() const;
91 
92  //- The region names in sorted order.
93  wordList sortedNames() const;
94 
95 };
96 
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 } // End namespace Foam
101 
102 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103 
104 #endif
105 
106 // ************************************************************************* //
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
Foam::regionProperties::count
label count() const
Total count of all region names.
Definition: regionProperties.C:74
HashTable.H
Foam::regionProperties::names
wordList names() const
The region names. Sorted by region type.
Definition: regionProperties.C:89
wordList.H
Foam::regionProperties::~regionProperties
~regionProperties()=default
Destructor.
Foam::regionProperties
Simple class to hold region information for coupled region simulations.
Definition: regionProperties.H:60
IOobject.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::List< word >
Foam::regionProperties::sortedNames
wordList sortedNames() const
The region names in sorted order.
Definition: regionProperties.C:110
Foam::IOobject::readOption
readOption
Enumeration defining the read options.
Definition: IOobject.H:183
Foam::regionProperties::regionProperties
regionProperties(const Time &runTime)
Construct from Time.
Definition: regionProperties.C:35