35 : exprtk::ifunction<T>(1),
_curve(curve)
37 exprtk::disable_has_side_effects(*
this);
61 std::string
const&
name,
62 std::vector<std::string>
const& vec_expression_str,
64 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
71 begin(curves), end(curves), std::back_inserter(
_curves),
72 [](
auto const& curve) -> std::pair<std::string, CurveWrapper> {
89 for (
unsigned i = 0; i < vec_expression_str.size(); i++)
95 OGS_FATAL(
"Error: {:s}\tExpression: {:s}\n",
97 vec_expression_str[i]);
120 "FunctionParameter: The spatial position has to be set by "
145 std::vector<std::pair<std::string, CurveWrapper>>
_curves;
149 std::string
const&
name,
151 std::map<std::string,
152 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::TemplatePoint< double, 3 > > 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
std::vector< T > operator()(double const t, SpatialPosition const &pos) const override
Returns the parameter value at the given time and position.
symbol_table_t _symbol_table
std::vector< std::pair< std::string, CurveWrapper > > _curves
std::vector< expression_t > _vec_expression
FunctionParameter(std::string const &name, std::vector< std::string > const &vec_expression_str, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
int getNumberOfGlobalComponents() const override
std::optional< CoordinateSystem > _coordinate_system
std::vector< double > rotateWithCoordinateSystem(std::vector< double > const &values, SpatialPosition const &pos) const