81 const scalar cyc = this->cycle(t);
86 ((cyc - std::floor(cyc)) < posFrac ? 1.0 : -1.0)
121 squareForm(t, posFrac) * scale_->value(t) + level_->value(t)
autoPtr< Function1< scalar > > period_
Period of the function (or specify frequency).
scalar squareForm(const scalar t, const scalar posFrac) const
Calculated square value at time t.
Type squareValue(const scalar t, const scalar posFrac) const
Return value for time t, using square form.
scalar t0_
Start-time for the function.
scalar sinForm(const scalar t) const
Calculated sin value at time t.
scalar cosForm(const scalar t) const
Calculated cos value at time t.
autoPtr< Function1< scalar > > amplitude_
Scalar amplitude of the function (optional).
Type cosValue(const scalar t) const
Return value for time t, using cos form.
autoPtr< Function1< Type > > scale_
Scaling factor for the function.
Type sinValue(const scalar t) const
Return value for time t, using sin form.
autoPtr< Function1< Type > > level_
Level to add to the scaled function.
autoPtr< Function1< scalar > > frequency_
Frequency of the function (or specify period).
scalar cycle(const scalar t) const
The cycle: (freq * time) or (time / period).
constexpr scalar twoPi(2 *M_PI)
dimensionedScalar sin(const dimensionedScalar &ds)
dimensionedScalar cos(const dimensionedScalar &ds)