OGS
TimeDependentHeterogeneousParameter.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <algorithm>
14
15#include "Parameter.h"
16
20namespace ParameterLib
21{
23{
24public:
25 using PairTimeParameterName = std::pair<double, std::string>;
26 using PairTimeParameter = std::pair<double, Parameter<double> const* const>;
27
29 std::vector<PairTimeParameterName>
30 time_parameter_name_mapping);
31
33 int getNumberOfGlobalComponents() const override;
34
35 bool isTimeDependent() const override;
36
38 std::vector<double> operator()(double const t,
39 SpatialPosition const& pos) const override;
40
46 void initialize(
47 std::vector<std::unique_ptr<ParameterBase>> const& parameters) override;
48
49private:
50 std::vector<PairTimeParameterName> _time_parameter_name_mapping;
51 std::vector<PairTimeParameter> _time_parameter_mapping;
52};
53
54std::unique_ptr<ParameterBase> createTimeDependentHeterogeneousParameter(
55 std::string const& name, BaseLib::ConfigTree const& config);
56} // namespace ParameterLib
std::vector< double > operator()(double const t, SpatialPosition const &pos) const override
Returns the parameter value at the given time and position.
TimeDependentHeterogeneousParameter(std::string name, std::vector< PairTimeParameterName > time_parameter_name_mapping)
std::pair< double, Parameter< double > const *const > PairTimeParameter
void initialize(std::vector< std::unique_ptr< ParameterBase > > const &parameters) override
std::unique_ptr< ParameterBase > createTimeDependentHeterogeneousParameter(std::string const &name, BaseLib::ConfigTree const &config)
std::string const name
Definition Parameter.h:73