22 #ifndef NANDRAD_LinearSplineParameterH 23 #define NANDRAD_LinearSplineParameterH 27 #include <IBK_LinearSpline.h> 31 #include "NANDRAD_CodeGenMacros.h" 70 const std::vector<double> &xVals,
const std::vector<double> yVals,
71 const IBK::Unit &xUnit,
const IBK::Unit &yUnit):
83 const IBK::Path &tsvFilePath):
90 void readXML(
const TiXmlElement * element);
91 TiXmlElement * writeXML(TiXmlElement * parent)
const;
111 const IBK::Unit & targetXUnit,
const IBK::Unit & targetYUnit,
112 const IBK::Unit & limitYUnit,
double minYVal,
bool isGreaterEqual,
113 double maxYVal,
bool isLessEqual,
const char *
const errmsg,
bool skipUnitChecks=
false);
159 #endif // NANDRAD_LinearSplineParameterH IBK::Unit m_yUnit
Unit of the y-values.
wrapMethod_t
How to treat the values in multi-year simulations.
IBK::Unit m_xUnit
Unit of the x-values.
LinearSplineParameter(const std::string &name, const interpolationMethod_t intPol, const IBK::Path &tsvFilePath)
Constructor with data file .
IBK::Path m_tsvFile
Path to tsv-file, the file will be read during checkAndInitialize() call.
void checkAndInitialize(const std::string &expectedName, const IBK::Unit &targetXUnit, const IBK::Unit &targetYUnit, const IBK::Unit &limitYUnit, double minYVal, bool isGreaterEqual, double maxYVal, bool isLessEqual, const char *const errmsg, bool skipUnitChecks=false)
Function to check for correct parametrization of linear spline parameters.
LinearSplineParameter()
Default Constructor.
Class LinearSplineParameter stores a linear spline curve, the corresponding parameter name and a unit...
std::string m_name
Parameter name (in context of schedules used as scheduled quantity).
void readTsv()
Reads externally referenced tsv-file.
interpolationMethod_t m_interpolationMethod
Interpolation method to be used when computing values of this spline.
wrapMethod_t m_wrapMethod
Whether to wrap time around in multi-year simulations (cyclic use) or to assume continuous data...
IBK::LinearSpline m_values
Data vectors including linear spline functionality (i.e.
interpolationMethod_t
Interpolation method to be used for this linear spline parameter.
LinearSplineParameter(const std::string &name, const interpolationMethod_t intPol, const std::vector< double > &xVals, const std::vector< double > yVals, const IBK::Unit &xUnit, const IBK::Unit &yUnit)
Constructor with values.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
void convert2BaseUnits()
Converts x and y values from display/input/output units (m_xUnit and m_yUnit) to their respective bas...