Loading...
Searching...
No Matches
Opm::UniformTabulated2DFunction< Scalar > Class Template Reference

Implements a scalar function that depends on two variables and which is sampled on an uniform X-Y grid. More...

`#include <UniformTabulated2DFunction.hpp>`

## Public Member Functions

| UniformTabulated2DFunction (Scalar minX, Scalar maxX, unsigned m, Scalar minY, Scalar maxY, unsigned n)
| Constructor where the tabulation parameters are already provided.
| UniformTabulated2DFunction (Scalar minX, Scalar maxX, unsigned m, Scalar minY, Scalar maxY, unsigned n, const std::vector< std::vector< Scalar > > &vals)
void | resize (Scalar minX, Scalar maxX, unsigned m, Scalar minY, Scalar maxY, unsigned n)
| Resize the tabulation to a new range.
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.
unsigned | numX () const
| Returns the number of sampling points in X direction.
unsigned | numY () const
| Returns the number of sampling points in Y direction.
Scalar | iToX (unsigned i) const
| Return the position on the x-axis of the i-th interval.
Scalar | jToY (unsigned j) const
| Return the position on the y-axis of the j-th interval.
template<class Evaluation >
Evaluation | xToI (const Evaluation &x) const
| Return the interval index of a given position on the x-axis.
template<class Evaluation >
Evaluation | yToJ (const Evaluation &y) const
| Return the interval index of a given position on the y-axis.
template<class Evaluation >
bool | applies (const Evaluation &x, const Evaluation &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) const
| Evaluate the function at a given (x,y) position.
Scalar | getSamplePoint (unsigned i, unsigned j) const
| Get the value of the sample point which is at the intersection of the -th interval of the x-Axis and the -th of the y-Axis.
void | setSamplePoint (unsigned i, unsigned j, Scalar value)
| Set the value of the sample point which is at the intersection of the -th interval of the x-Axis and the -th of the y-Axis.
bool | operator== (const UniformTabulated2DFunction< Scalar > &data) const

## Detailed Description

template<class Scalar>
class Opm::UniformTabulated2DFunction< Scalar >

Implements a scalar function that depends on two variables and which is sampled on an uniform X-Y grid.

This class can be used when the sampling points are calculated at run time.

## Member Function Documentation

## eval()

template<class Scalar >
template<class Evaluation >

Evaluation Opm::UniformTabulated2DFunction< Scalar >::eval | ( | const Evaluation & | x,
|  | const Evaluation & | y,
|  | bool | extrapolate
| ) |  | const

inline

Evaluate the function at a given (x,y) position.

Parameters

  x | x-position
  y | y-position
  extrapolate | Whether to extrapolate for untabulated values. If false then an exception might be thrown.

## xToI()

template<class Scalar >
template<class Evaluation >

Evaluation Opm::UniformTabulated2DFunction< Scalar >::xToI | ( | const Evaluation & | x | ) | const

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.

## yToJ()

template<class Scalar >
template<class Evaluation >

Evaluation Opm::UniformTabulated2DFunction< Scalar >::yToJ | ( | const Evaluation & | y | ) | const

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.

The documentation for this class was generated from the following file:

- opm/material/common/UniformTabulated2DFunction.hpp