timeIOdictionary.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2021-2024 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::timeIOdictionary
26 
27 Description
28  timeIOdictionary derived from IOdictionary with globalFile set false to
29  enable writing to processor time directories.
30 
31  Used for time-dependent global data written to the <time>/uniform
32  directories.
33 
34 SourceFiles
35  timeIOdictionary.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef timeIOdictionary_H
40 #define timeIOdictionary_H
41 
42 #include "IOdictionary.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class timeIOdictionary Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class timeIOdictionary
54 :
55  public IOdictionary
56 {
57 
58 public:
59 
60  // Constructors
61 
62  //- Construct given an IOobject and actual type name
63  timeIOdictionary(const IOobject& io);
64 
65  //- Construct given an IOobject and dictionary
66  timeIOdictionary(const IOobject&, const dictionary&);
67 
68 
69  // Member Functions
70 
71  //- Return false as the object is global, i.e. same for all processors
72  // but written to the processor time directory
73  virtual bool globalFile() const
74  {
75  return false;
76  }
77 };
78 
79 
80 //- Trait for obtaining global write status
81 template<>
83 {
84  static const bool global = false;
85 };
86 
87 
88 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89 
90 } // End namespace Foam
91 
92 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93 
94 #endif
95 
96 // ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
virtual bool globalFile() const
Return false as the object is global, i.e. same for all processors.
timeIOdictionary(const IOobject &io)
Construct given an IOobject and actual type name.
Namespace for OpenFOAM.
Trait for obtaining global write status.
Definition: IOobject.H:511
static const bool global
Definition: IOobject.H:512