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 > &)
const word & name() const
Return the name of the entry.
virtual void write(Ostream &os) const
Write data to dictionary stream.
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.
Ramp(const word &name, const dictionary &dict)
Construct from name and dictionary.
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.
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.