Loading...
Searching...
No Matches
reverseRamp.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) 2007-2019 PCOpt/NTUA
9 Copyright (C) 2013-2019 FOSS GP
10 Copyright (C) 2019 OpenCFD Ltd.
11-------------------------------------------------------------------------------
12License
13 This file is part of OpenFOAM.
14
15 OpenFOAM is free software: you can redistribute it and/or modify it
16 under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27
28Class
29 Foam::Function1Types::reverseRamp
30
31Description
32 Reverse ramp function starting from 1 and decreasing stepRamply to a min.
33 user-specified value from \c start over the \c duration and remaining
34 constant thereafter.
35
36See also
37 Foam::Function1Types::ramp
38
39SourceFiles
40 reverseRamp.C
41
42\*---------------------------------------------------------------------------*/
43
44#ifndef reverseRamp_H
45#define reverseRamp_H
46
47#include "ramp.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54namespace Function1Types
55{
57/*---------------------------------------------------------------------------*\
58 Class reverseRamp Declaration
59\*---------------------------------------------------------------------------*/
60
61class reverseRamp
62:
63 public ramp
64{
65protected:
66
67 // Protected Data Members
68
69 //- The min value
70 scalar minValue_;
71
72 //- Interval for reducing the base value
73 scalar interval_;
74
75 //- Steps to reach the min. value
76 scalar steps_;
78
79private:
80
81 // Private Data Members
82
83 //- No copy assignment
84 void operator=(const reverseRamp&) = delete;
85
86
87public:
88
89 //- Runtime type information
90 TypeName("reverseRamp");
91
92
93 // Constructors
94
95 //- Construct from entry and dictionary
97 (
98 const word& entryName,
99 const dictionary& dict,
100 const objectRegistry* obrPtr = nullptr
101 );
102
103
104 //- Destructor
105 virtual ~reverseRamp() = default;
106
107
108 // Member Functions
109
110 //- Return value for time t
111 inline virtual scalar value(const scalar t) const;
112};
113
115// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116
117} // End namespace Function1Types
118} // End namespace Foam
119
120// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121
122#include "reverseRampI.H"
123
124// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125
126#endif
127
128// ************************************************************************* //
ramp(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry name, dictionary and optional registry.
Definition ramp.C:34
TypeName("reverseRamp")
Runtime type information.
virtual scalar value(const scalar t) const
Return value for time t.
virtual ~reverseRamp()=default
Destructor.
scalar steps_
Steps to reach the min. value.
Definition reverseRamp.H:77
scalar minValue_
The min value.
Definition reverseRamp.H:67
scalar interval_
Interval for reducing the base value.
Definition reverseRamp.H:72
reverseRamp(const word &entryName, const dictionary &dict, const objectRegistry *obrPtr=nullptr)
Construct from entry and dictionary.
Definition reverseRamp.C:40
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Registry of regIOobjects.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68