82 template <
class Function1Type>
85 public FieldFunction1<scalar, Function1Type>
98 inline scalar
end()
const 105 inline scalar
linearRamp(
const scalar t)
const 107 return max(
min((t - start_)/duration_, 1), 0);
145 virtual scalar
value(
const scalar t)
const = 0;
scalar duration_
Duration of the ramp function.
const word const dictionary & dict
virtual ~Ramp()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar start_
Start-time of the ramp function.
scalar linearRamp(const scalar t) const
Simple linear ramp function which form the basis of many more.
A class for handling words, derived from string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
scalar dLinearRampDt() const
The gradient of the linear ramp within the bounds of the ramp.
virtual void writeData(Ostream &os) const
Write in dictionary format.
Ramp(const word &entryName, const dictionary &dict)
Construct from entry name and dictionary.
void operator=(const Ramp< Function1Type > &)=delete
Disallow default bitwise assignment.
virtual scalar value(const scalar t) const =0
Return value for time t.
Ramp function base class for the set of scalar functions starting from 0 and increasing monotonically...
scalar end() const
Return the end-time of the ramp function.