My Project
|
Implements a function that depends on two variables. More...
#include <IntervalTabulated2DFunction.hpp>
Public Member Functions | |
template<class DataContainer > | |
IntervalTabulated2DFunction (const std::vector< Scalar > &xPos, const std::vector< Scalar > &yPos, const DataContainer &data, const bool xExtrapolate=false, const bool yExtrapolate=false) | |
size_t | numX () const |
Returns the number of sampling points in X direction. | |
size_t | numY () const |
Returns the number of sampling points in Y direction. | |
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 | yMin () const |
Returns the minimum of the Y coordinate of the sampling points. | |
Scalar | yMax () const |
Returns the maximum of the Y coordinate of the sampling points. | |
const std::vector< Scalar > & | xPos () const |
const std::vector< Scalar > & | yPos () const |
const std::vector< std::vector< Scalar > > & | samples () const |
bool | xExtrapolate () const |
bool | yExtrapolate () const |
bool | operator== (const IntervalTabulated2DFunction< Scalar > &data) const |
Scalar | valueAt (size_t i, size_t j) const |
Returns the value of a sampling point. | |
template<class Evaluation > | |
bool | applies (const Evaluation &x, const Evaluation &y) const |
Returns true if a coordinate lies in the tabulated range. | |
template<class Evaluation > | |
bool | appliesX (const Evaluation &x) const |
Returns true if a coordinate lies in the tabulated range on the x direction. | |
template<class Evaluation > | |
bool | appliesY (const Evaluation &y) const |
Returns true if a coordinate lies in the tabulated range on the y direction. | |
template<typename Evaluation > | |
Evaluation | eval (const Evaluation &x, const Evaluation &y) const |
Evaluate the function at a given (x,y) position. | |
Implements a function that depends on two variables.
The function is sampled in regular intervals in both directions, i.e., the interpolation cells are rectangles. The table can be extrapolated in either direction.
|
inline |
Evaluate the function at a given (x,y) position.
If this method is called for a value outside of the tabulated range, and extrapolation is not allowed in the corresponding direction, a Opm::NumericalProblem
exception is thrown.