function1Base.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) 2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::function1Base
28 
29 Description
30  Top level data entry class for use in dictionaries. Provides a mechanism
31  to specify a variable as a certain type, e.g. constant or time varying, and
32  provide functions to return the (interpolated) value, and integral between
33  limits.
34 
35  Extends the Function1 class by adding autoMap and rMap functions
36 
37 SourceFiles
38  function1Base.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef function1Base_H
43 #define function1Base_H
44 
45 #include "dictionary.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward Declarations
53 class Time;
54 
55 /*---------------------------------------------------------------------------*\
56  Class function1Base Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class function1Base
60 :
61  public refCount
62 {
63 protected:
64 
65  // Protected Data
66 
67  //- Name of entry
68  const word name_;
69 
70 
71  // Protected Member Functions
72 
73  //- No copy assignment
74  void operator=(const function1Base&) = delete;
75 
76 
77 public:
78 
79  // Constructors
80 
81  //- Construct from entry name
82  explicit function1Base(const word& entryName);
83 
84  //- Construct from entry name and dictionary
85  function1Base(const word& entryName, const dictionary& dict);
86 
87  //- Copy construct
88  explicit function1Base(const function1Base& rhs);
89 
90 
91  //- Destructor
92  virtual ~function1Base() = default;
93 
94 
95  // Member Functions
96 
97  // Access
98 
99  //- The name of the entry
100  const word& name() const
101  {
102  return name_;
103  }
104 
105 
106  // Manipulation
107 
108  //- Convert time
109  virtual void convertTimeBase(const Time& t);
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace Foam
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 #endif
120 
121 // ************************************************************************* //
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::function1Base::~function1Base
virtual ~function1Base()=default
Destructor.
Foam::refCount
Reference counter for various OpenFOAM components.
Definition: refCount.H:50
Foam::function1Base::name
const word & name() const
The name of the entry.
Definition: function1Base.H:99
Foam::function1Base::function1Base
function1Base(const word &entryName)
Construct from entry name.
Definition: function1Base.C:33
Foam::function1Base::name_
const word name_
Name of entry.
Definition: function1Base.H:67
Foam::function1Base
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
Definition: function1Base.H:58
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::function1Base::operator=
void operator=(const function1Base &)=delete
No copy assignment.
dictionary.H
Foam::function1Base::convertTimeBase
virtual void convertTimeBase(const Time &t)
Convert time.
Definition: function1Base.C:60