101 template<
class Function1Type>
104 public FieldFunction1<scalar, Function1Type>
117 inline scalar
end()
const 124 inline scalar
linearRamp(
const scalar t)
const 126 return max(
min((t - start_)/duration_, 1), 0);
164 virtual scalar
value(
const scalar t)
const = 0;
scalar duration_
Duration of the ramp function.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
virtual ~Ramp()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e...
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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
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.