PiecewiseLinear

class PiecewiseLinear : public godzilla::Function

User-defined piecewise linear function.

The independent variable ‘x’ has to be increasing. User have to specify at least 2 points

Public Functions

virtual void register_callback(mu::Parser &parser) override

Register this function with the function parser.

Parameters:

parser – The mu::Parser object we register this function with

Real evaluate(Real x)

Evaluate this function at point ‘x’.