36 : exprtk::ifunction<T>(1),
_curve(curve)
38 exprtk::disable_has_side_effects(*
this);
62 std::string
const&
name,
63 std::vector<std::string>
const& vec_expression_str,
65 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
72 begin(curves), end(curves), std::back_inserter(
_curves),
73 [](
auto const& curve) -> std::pair<std::string, CurveWrapper> {
90 for (
unsigned i = 0; i < vec_expression_str.size(); i++)
96 OGS_FATAL(
"Error: {:s}\tExpression: {:s}\n",
98 vec_expression_str[i]);
121 "FunctionParameter: The spatial position has to be set by "
127 std::lock_guard lock_guard(
_mutex);
152 std::vector<std::pair<std::string, CurveWrapper>>
_curves;
157 std::string
const& name,
159 std::map<std::string,
160 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
Definition of the PiecewiseLinearInterpolation class.
double getValue(double pnt_to_interpolate) const
Calculates the interpolation value.
MathLib::PiecewiseLinearInterpolation const & _curve
CurveWrapper(MathLib::PiecewiseLinearInterpolation const &curve)
double operator()(double const &t) override
std::optional< MathLib::Point3d > const & getCoordinates() const
std::unique_ptr< ParameterBase > createFunctionParameter(std::string const &name, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
exprtk::symbol_table< T > symbol_table_t
exprtk::expression< T > expression_t
exprtk::parser< T > parser_t
bool isTimeDependent() const override
symbol_table_t _symbol_table
std::vector< T > operator()(double const t, SpatialPosition const &pos) const override
Returns the parameter value at the given time and position.
std::vector< std::pair< std::string, CurveWrapper > > _curves
FunctionParameter(std::string const &name, std::vector< std::string > const &vec_expression_str, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
std::vector< expression_t > _vec_expression
int getNumberOfGlobalComponents() const override
std::vector< double > rotateWithCoordinateSystem(std::vector< double > const &values, SpatialPosition const &pos) const
std::optional< CoordinateSystem > _coordinate_system