29 : exprtk::ifunction<T>(1),
_curve(curve)
31 exprtk::disable_has_side_effects(*
this);
55 std::string
const&
name,
56 std::vector<std::string>
const& vec_expression_str,
58 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
65 begin(curves), end(curves), std::back_inserter(
_curves),
66 [](
auto const& curve) -> std::pair<std::string, CurveWrapper> {
83 for (
unsigned i = 0; i < vec_expression_str.size(); i++)
89 OGS_FATAL(
"Error: {:s}\tExpression: {:s}\n",
91 vec_expression_str[i]);
114 "FunctionParameter: The spatial position has to be set by "
120 std::lock_guard lock_guard(
_mutex);
145 std::vector<std::pair<std::string, CurveWrapper>>
_curves;
150 std::string
const& name,
152 std::map<std::string,
153 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
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