Implements a scalar function that depends on two variables and which is sampled uniformly in the X direction, but non-uniformly on the Y axis-. More...
#include <UniformXTabulated2DFunction.hpp>
Public Member Functions | |
Scalar | xMin () const |
Returns the minimum of the X coordinate of the sampling points. | |
Scalar | xMax () const |
Returns the maximum of the X coordinate of the sampling points. | |
Scalar | xAt (size_t i) const |
Returns the value of the X coordinate of the sampling points. | |
Scalar | yAt (size_t i, size_t j) const |
Returns the value of the Y coordinate of a sampling point. | |
Scalar | valueAt (size_t i, size_t j) const |
Returns the value of a sampling point. | |
size_t | numX () const |
Returns the number of sampling points in X direction. | |
Scalar | yMin (size_t i) const |
Returns the minimum of the Y coordinate of the sampling points for a given column. | |
Scalar | yMax (size_t i) const |
Returns the maximum of the Y coordinate of the sampling points for a given column. | |
size_t | numY (size_t i) const |
Returns the number of sampling points in Y direction a given column. | |
Scalar | iToX (size_t i) const |
Return the position on the x-axis of the i-th interval. | |
Scalar | jToY (size_t i, size_t j) const |
Return the position on the y-axis of the j-th interval. | |
template<class Evaluation > | |
Evaluation | xToI (const Evaluation &x, bool extrapolate OPM_OPTIM_UNUSED=false) const |
Return the interval index of a given position on the x-axis. More... | |
template<class Evaluation > | |
Evaluation | yToJ (size_t i, const Evaluation &y, bool extrapolate OPM_OPTIM_UNUSED=false) const |
Return the interval index of a given position on the y-axis. More... | |
bool | applies (Scalar x, Scalar y) const |
Returns true iff a coordinate lies in the tabulated range. | |
template<class Evaluation > | |
Evaluation | eval (const Evaluation &x, const Evaluation &y, bool extrapolate=false) const |
Evaluate the function at a given (x,y) position. More... | |
size_t | appendXPos (Scalar nextX) |
Set the x-position of a vertical line. More... | |
size_t | appendSamplePoint (size_t i, Scalar y, Scalar value) |
Append a sample point. More... | |
void | print (std::ostream &os=std::cout) const |
Print the table for debugging purposes. More... | |
Implements a scalar function that depends on two variables and which is sampled uniformly in the X direction, but non-uniformly on the Y axis-.
"Uniform on the X-axis" means that all Y sampling points must be located along a line for this value. This class can be used when the sampling points are calculated at run time.
|
inline |
Append a sample point.
Returns the i index of that line.
|
inline |
Set the x-position of a vertical line.
Returns the i index of that line.
|
inline |
Evaluate the function at a given (x,y) position.
If this method is called for a value outside of the tabulated range, a Opm::NumericalProblem
exception is thrown.
|
inline |
Print the table for debugging purposes.
It will produce the data in CSV format on stdout, so that it can be visualized using e.g. gnuplot.
|
inline |
Return the interval index of a given position on the x-axis.
This method returns a floating point number. The integer part should be interpreted as interval, the decimal places are the position of the x value between the i-th and the (i+1)-th sample point.
|
inline |
Return the interval index of a given position on the y-axis.
This method returns a floating point number. The integer part should be interpreted as interval, the decimal places are the position of the y value between the j-th and the (j+1)-th sample point.