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.
OGS_NO_DANGLING Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase > > const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
std::unique_ptr< ParameterBase > createCurveScaledParameter(std::string const &name, BaseLib::ConfigTree const &config, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves)
int getNumberOfGlobalComponents() const override
CurveScaledParameter(std::string const &name_, MathLib::PiecewiseLinearInterpolation const &curve, std::string referenced_parameter_name)
void initialize(std::vector< std::unique_ptr< ParameterBase > > const ¶meters) override
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