OGS
|
Class for strong monotonic curves.
Definition at line 20 of file PiecewiseLinearMonotonicCurve.h.
#include <PiecewiseLinearMonotonicCurve.h>
Public Member Functions | |
PiecewiseLinearMonotonicCurve (std::vector< double > x, std::vector< double > y) | |
~PiecewiseLinearMonotonicCurve ()=default | |
double | getInverseVariable (const double y) const |
Public Member Functions inherited from MathLib::PiecewiseLinearInterpolation | |
PiecewiseLinearInterpolation (std::vector< double > supporting_points, std::vector< double > values_at_supp_pnts, bool supp_pnts_sorted=false) | |
double | getValue (double pnt_to_interpolate) const |
Calculates the interpolation value. | |
double | getDerivative (double const pnt_to_interpolate) const |
Calculates derivative using quadratic interpolation and central difference quotient. | |
double | getSupportMax () const |
double | getSupportMin () const |
Private Member Functions | |
bool | isStrongMonotonic () const |
Additional Inherited Members | |
Protected Attributes inherited from MathLib::PiecewiseLinearInterpolation | |
std::vector< double > | supp_pnts_ |
std::vector< double > | values_at_supp_pnts_ |
MathLib::PiecewiseLinearMonotonicCurve::PiecewiseLinearMonotonicCurve | ( | std::vector< double > | x, |
std::vector< double > | y ) |
@ x x coordinates of curve points @ y y coordinates of curve points
Definition at line 23 of file PiecewiseLinearMonotonicCurve.cpp.
References isStrongMonotonic(), and OGS_FATAL.
|
default |
double MathLib::PiecewiseLinearMonotonicCurve::getInverseVariable | ( | const double | y | ) | const |
Get variable, x, or abscissa, by a given value y
, the ordinate. If this curve is not monotonic, this function gives a fatal error.
Definition at line 47 of file PiecewiseLinearMonotonicCurve.cpp.
References MathLib::PiecewiseLinearInterpolation::supp_pnts_, and MathLib::PiecewiseLinearInterpolation::values_at_supp_pnts_.
|
private |
Check monotonicity of this curve such as for any \(i\), \(y(x_{i+1})>y(x_{i})\) if \(x_{i+1}>x_{i}\) or for any \(i\) \(y(x_{i+1})<y(x_{i})\) if \(x_{i+1}>x_{i}\)
Definition at line 33 of file PiecewiseLinearMonotonicCurve.cpp.
References MathLib::PiecewiseLinearInterpolation::getDerivative(), MathLib::p, and MathLib::PiecewiseLinearInterpolation::supp_pnts_.
Referenced by PiecewiseLinearMonotonicCurve().