26 std::string referenced_parameter_name)
35 std::vector<std::unique_ptr<ParameterBase>>
const& parameters)
override
44 return _parameter->getNumberOfGlobalComponents();
53 "Coordinate system not expected to be set for curve scaled "
56 auto const& tup = (*_parameter)(t, pos);
59 auto const num_comp =
_parameter->getNumberOfGlobalComponents();
60 std::vector<T> cache(num_comp);
61 for (
int c = 0;
c < num_comp; ++
c)
63 cache[
c] = scaling * tup[
c];
75 std::string
const&
name,
78 std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
const&
Definition of the PiecewiseLinearInterpolation class.
double getValue(double pnt_to_interpolate) const
Calculates the interpolation value.
std::unique_ptr< ParameterBase > createCurveScaledParameter(std::string const &name, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation >> const &curves)
void initialize(std::vector< std::unique_ptr< ParameterBase >> const ¶meters) override
int getNumberOfGlobalComponents() const override
CurveScaledParameter(std::string const &name_, MathLib::PiecewiseLinearInterpolation const &curve, std::string referenced_parameter_name)
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.
std::string const _referenced_parameter_name
Parameter< T > const * _parameter
MathLib::PiecewiseLinearInterpolation const & _curve
MeshLib::Mesh const * _mesh
std::optional< CoordinateSystem > _coordinate_system