CoolProp 7.0.0
An open-source fluid property and humid air property database
Public Member Functions | List of all members
CoolProp::superancillary::ChebyshevApproximation1D< ArrayType > Struct Template Reference

Detailed Description

template<typename ArrayType = Eigen::ArrayXd>
struct CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >

A set of multiple Chebyshev expansions covering an interval [xmin, xmax]. This is a 1D approximation. Practically speaking the independent variable is temperature, but the code was left generic to highlight the generiticity of the approach

At construction, the independent variable is subdivided into portions that are each monotonic in the dependent variable, to facilitate later rootfinding in domains that are therefore known to be monotonic, and therefore invertible

Definition at line 430 of file superancillary.h.

#include <superancillary.h>

Public Member Functions

 ChebyshevApproximation1D (std::vector< ChebyshevExpansion< ArrayType > > &&expansions)
 
 ChebyshevApproximation1D (const ChebyshevApproximation1D &other)
 
ChebyshevApproximation1Doperator= (ChebyshevApproximation1D &&other)=default
 
ChebyshevApproximation1Doperator= (ChebyshevApproximation1D other)
 
const auto & get_expansions () const
 Get a const view on the expansions owned by the approximation instance. More...
 
const auto & get_x_at_extrema () const
 Get a const view on values of x at the extrema. More...
 
const auto & get_monotonic_intervals () const
 Get a const view on the monotonic intervals identified. More...
 
const auto xmin () const
 Get the minimum x value. More...
 
const auto xmax () const
 Get the maximum x value. More...
 
bool is_monotonic () const
 
auto get_index (double x) const
 
double eval (double x) const
 
template<typename Container >
const auto eval_many (const Container &x, Container &y) const
 A vectorized and templated getter (for calling from python) More...
 
template<typename Container >
const auto eval_manyC (const Container x[], Container y[], std::size_t N) const
 A vectorized and templated getter without any allocation or checking. More...
 
const std::vector< IntervalMatchget_intervals_containing_y (double y) const
 Find the intervals containing the value of y. More...
 
const auto get_x_for_y (double y, unsigned int bits, std::size_t max_iter, double boundsftol) const
 
template<typename Container >
const auto count_x_for_y_many (const Container &y, unsigned int bits, std::size_t max_iter, double boundsftol, Container &x) const
 A vectorized and templated getter (for calling from python) More...
 
template<typename Container >
const auto count_x_for_y_manyC (const Container y[], size_t N, unsigned int bits, std::size_t max_iter, double boundsftol, Container x[]) const
 A vectorized and templated getter (for calling from python) More...
 

Constructor & Destructor Documentation

◆ ChebyshevApproximation1D() [1/2]

template<typename ArrayType = Eigen::ArrayXd>
CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::ChebyshevApproximation1D ( std::vector< ChebyshevExpansion< ArrayType > > &&  expansions)
inline

Definition at line 566 of file superancillary.h.

◆ ChebyshevApproximation1D() [2/2]

template<typename ArrayType = Eigen::ArrayXd>
CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::ChebyshevApproximation1D ( const ChebyshevApproximation1D< ArrayType > &  other)
inline

Definition at line 574 of file superancillary.h.

Member Function Documentation

◆ count_x_for_y_many()

template<typename ArrayType = Eigen::ArrayXd>
template<typename Container >
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::count_x_for_y_many ( const Container &  y,
unsigned int  bits,
std::size_t  max_iter,
double  boundsftol,
Container &  x 
) const
inline

A vectorized and templated getter (for calling from python)

Definition at line 701 of file superancillary.h.

◆ count_x_for_y_manyC()

template<typename ArrayType = Eigen::ArrayXd>
template<typename Container >
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::count_x_for_y_manyC ( const Container  y[],
size_t  N,
unsigned int  bits,
std::size_t  max_iter,
double  boundsftol,
Container  x[] 
) const
inline

A vectorized and templated getter (for calling from python)

Definition at line 710 of file superancillary.h.

◆ eval()

template<typename ArrayType = Eigen::ArrayXd>
double CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::eval ( double  x) const
inline

Evaluate the value from the expansion

Parameters
xThe value of the independent variable
Returns
y The evaluation of y(x) from the expansion

Definition at line 643 of file superancillary.h.

◆ eval_many()

template<typename ArrayType = Eigen::ArrayXd>
template<typename Container >
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::eval_many ( const Container &  x,
Container &  y 
) const
inline

A vectorized and templated getter (for calling from python)

Definition at line 649 of file superancillary.h.

◆ eval_manyC()

template<typename ArrayType = Eigen::ArrayXd>
template<typename Container >
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::eval_manyC ( const Container  x[],
Container  y[],
std::size_t  N 
) const
inline

A vectorized and templated getter without any allocation or checking.

Definition at line 658 of file superancillary.h.

◆ get_expansions()

template<typename ArrayType = Eigen::ArrayXd>
const auto & CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_expansions ( ) const
inline

Get a const view on the expansions owned by the approximation instance.

Definition at line 594 of file superancillary.h.

◆ get_index()

template<typename ArrayType = Eigen::ArrayXd>
auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_index ( double  x) const
inline

Return the index of the expansion that is desired

Parameters
xvalue of x
Returns
The index of the expansion in the array of expansions that the point is within

Definition at line 618 of file superancillary.h.

◆ get_intervals_containing_y()

template<typename ArrayType = Eigen::ArrayXd>
const std::vector< IntervalMatch > CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_intervals_containing_y ( double  y) const
inline

Find the intervals containing the value of y.

Definition at line 665 of file superancillary.h.

◆ get_monotonic_intervals()

template<typename ArrayType = Eigen::ArrayXd>
const auto & CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_monotonic_intervals ( ) const
inline

Get a const view on the monotonic intervals identified.

Definition at line 600 of file superancillary.h.

◆ get_x_at_extrema()

template<typename ArrayType = Eigen::ArrayXd>
const auto & CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_x_at_extrema ( ) const
inline

Get a const view on values of x at the extrema.

Definition at line 597 of file superancillary.h.

◆ get_x_for_y()

template<typename ArrayType = Eigen::ArrayXd>
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::get_x_for_y ( double  y,
unsigned int  bits,
std::size_t  max_iter,
double  boundsftol 
) const
inline

Solve for (possibly multiple) values of the independent variable x given a value of the dependent variable y

Definition at line 677 of file superancillary.h.

◆ is_monotonic()

template<typename ArrayType = Eigen::ArrayXd>
bool CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::is_monotonic ( ) const
inline

Check whether the function is monotonic, if so some simplifications can be made to rootfinding in some cases

Definition at line 610 of file superancillary.h.

◆ operator=() [1/2]

template<typename ArrayType = Eigen::ArrayXd>
ChebyshevApproximation1D & CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::operator= ( ChebyshevApproximation1D< ArrayType > &&  other)
default

◆ operator=() [2/2]

template<typename ArrayType = Eigen::ArrayXd>
ChebyshevApproximation1D & CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::operator= ( ChebyshevApproximation1D< ArrayType >  other)
inline

Definition at line 584 of file superancillary.h.

◆ xmax()

template<typename ArrayType = Eigen::ArrayXd>
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::xmax ( ) const
inline

Get the maximum x value.

Definition at line 606 of file superancillary.h.

◆ xmin()

template<typename ArrayType = Eigen::ArrayXd>
const auto CoolProp::superancillary::ChebyshevApproximation1D< ArrayType >::xmin ( ) const
inline

Get the minimum x value.

Definition at line 603 of file superancillary.h.


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