Opm::IntervalTabulated2DFunction< Scalar > Class Template Reference

Implements a function that depends on two variables. More...

#include <IntervalTabulated2DFunction.hpp>

Public Member Functions

 IntervalTabulated2DFunction ()
 
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. More...
 
size_t numY () const
 Returns the number of sampling points in Y direction. More...
 
Scalar xMin () const
 Returns the minimum of the X coordinate of the sampling points. More...
 
Scalar xMax () const
 Returns the maximum of the X coordinate of the sampling points. More...
 
Scalar yMin () const
 Returns the minimum of the Y coordinate of the sampling points. More...
 
Scalar yMax () const
 Returns the maximum of the Y coordinate of the sampling points. More...
 
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. More...
 
template<class Evaluation >
bool applies (const Evaluation &x, const Evaluation &y) const
 Returns true if a coordinate lies in the tabulated range. More...
 
template<class Evaluation >
bool appliesX (const Evaluation &x) const
 Returns true if a coordinate lies in the tabulated range on the x direction. More...
 
template<class Evaluation >
bool appliesY (const Evaluation &y) const
 Returns true if a coordinate lies in the tabulated range on the y direction. More...
 
template<typename Evaluation >
Evaluation eval (const Evaluation &x, const Evaluation &y) const
 Evaluate the function at a given (x,y) position. More...
 

Detailed Description

template<class Scalar>
class Opm::IntervalTabulated2DFunction< Scalar >

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.

Constructor & Destructor Documentation

◆ IntervalTabulated2DFunction() [1/2]

template<class Scalar >
Opm::IntervalTabulated2DFunction< Scalar >::IntervalTabulated2DFunction ( )
inline

◆ IntervalTabulated2DFunction() [2/2]

template<class Scalar >
template<class DataContainer >
Opm::IntervalTabulated2DFunction< Scalar >::IntervalTabulated2DFunction ( const std::vector< Scalar > &  xPos,
const std::vector< Scalar > &  yPos,
const DataContainer &  data,
const bool  xExtrapolate = false,
const bool  yExtrapolate = false 
)
inline

Member Function Documentation

◆ applies()

template<class Scalar >
template<class Evaluation >
bool Opm::IntervalTabulated2DFunction< Scalar >::applies ( const Evaluation &  x,
const Evaluation &  y 
) const
inline

Returns true if a coordinate lies in the tabulated range.

References Opm::IntervalTabulated2DFunction< Scalar >::appliesX(), and Opm::IntervalTabulated2DFunction< Scalar >::appliesY().

◆ appliesX()

template<class Scalar >
template<class Evaluation >
bool Opm::IntervalTabulated2DFunction< Scalar >::appliesX ( const Evaluation &  x) const
inline

◆ appliesY()

template<class Scalar >
template<class Evaluation >
bool Opm::IntervalTabulated2DFunction< Scalar >::appliesY ( const Evaluation &  y) const
inline

◆ eval()

template<class Scalar >
template<typename Evaluation >
Evaluation Opm::IntervalTabulated2DFunction< Scalar >::eval ( const Evaluation &  x,
const Evaluation &  y 
) const
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::NumericalIssue exception is thrown.

References Opm::IntervalTabulated2DFunction< Scalar >::appliesX(), Opm::IntervalTabulated2DFunction< Scalar >::appliesY(), Opm::Valgrind::CheckDefined(), and Opm::IntervalTabulated2DFunction< Scalar >::valueAt().

◆ numX()

template<class Scalar >
size_t Opm::IntervalTabulated2DFunction< Scalar >::numX ( ) const
inline

Returns the number of sampling points in X direction.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::IntervalTabulated2DFunction().

◆ numY()

template<class Scalar >
size_t Opm::IntervalTabulated2DFunction< Scalar >::numY ( ) const
inline

Returns the number of sampling points in Y direction.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::IntervalTabulated2DFunction().

◆ operator==()

◆ samples()

template<class Scalar >
const std::vector< std::vector< Scalar > > & Opm::IntervalTabulated2DFunction< Scalar >::samples ( ) const
inline

◆ valueAt()

template<class Scalar >
Scalar Opm::IntervalTabulated2DFunction< Scalar >::valueAt ( size_t  i,
size_t  j 
) const
inline

Returns the value of a sampling point.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::eval().

◆ xExtrapolate()

template<class Scalar >
bool Opm::IntervalTabulated2DFunction< Scalar >::xExtrapolate ( ) const
inline

◆ xMax()

template<class Scalar >
Scalar Opm::IntervalTabulated2DFunction< Scalar >::xMax ( ) const
inline

Returns the maximum of the X coordinate of the sampling points.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::appliesX().

◆ xMin()

template<class Scalar >
Scalar Opm::IntervalTabulated2DFunction< Scalar >::xMin ( ) const
inline

Returns the minimum of the X coordinate of the sampling points.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::appliesX().

◆ xPos()

template<class Scalar >
const std::vector< Scalar > & Opm::IntervalTabulated2DFunction< Scalar >::xPos ( ) const
inline

◆ yExtrapolate()

template<class Scalar >
bool Opm::IntervalTabulated2DFunction< Scalar >::yExtrapolate ( ) const
inline

◆ yMax()

template<class Scalar >
Scalar Opm::IntervalTabulated2DFunction< Scalar >::yMax ( ) const
inline

Returns the maximum of the Y coordinate of the sampling points.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::appliesY().

◆ yMin()

template<class Scalar >
Scalar Opm::IntervalTabulated2DFunction< Scalar >::yMin ( ) const
inline

Returns the minimum of the Y coordinate of the sampling points.

Referenced by Opm::IntervalTabulated2DFunction< Scalar >::appliesY().

◆ yPos()

template<class Scalar >
const std::vector< Scalar > & Opm::IntervalTabulated2DFunction< Scalar >::yPos ( ) const
inline

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