CoolProp 8.0.0
An open-source fluid property and humid air property database
Functions
CoolProp::superancillary::detail Namespace Reference

Functions

double toms748 (const std::function< double(double)> &f, double a, double b, double fa, double fb, unsigned int bits, std::size_t max_iter)
 
template<typename Matrix >
void balance_matrix (const Matrix &A, Matrix &Aprime, Matrix &D)
 
void companion_matrix_transposed (const Eigen::ArrayXd &coeffs, Eigen::MatrixXd &A)
 
void companion_matrix_transposed (const std::vector< double > &coeffs, Eigen::MatrixXd &A)
 
auto get_LU_matrices (std::size_t N)
 Get the L and U matrices needed for transformations between nodes and function values in a Chebyshev expansion. More...
 
double M_element_norm (const std::vector< double > &x, Eigen::Index M)
 
double M_element_norm (const Eigen::ArrayXd &x, Eigen::Index M)
 
template<typename Function , typename Container >
auto dyadic_splitting (const std::size_t N, const Function &func, const double xmin, const double xmax, const int M=3, const double tol=1e-12, const int max_refine_passes=8, const std::optional< std::function< void(int, const Container &)> > &callback=std::nullopt) -> Container
 

Function Documentation

◆ balance_matrix()

template<typename Matrix >
void CoolProp::superancillary::detail::balance_matrix ( const Matrix &  A,
Matrix &  Aprime,
Matrix &  D 
)
inline

Definition at line 69 of file superancillary.h.

◆ companion_matrix_transposed() [1/2]

void CoolProp::superancillary::detail::companion_matrix_transposed ( const Eigen::ArrayXd &  coeffs,
Eigen::MatrixXd &  A 
)
inline

Definition at line 121 of file superancillary.h.

◆ companion_matrix_transposed() [2/2]

void CoolProp::superancillary::detail::companion_matrix_transposed ( const std::vector< double > &  coeffs,
Eigen::MatrixXd &  A 
)
inline

Definition at line 138 of file superancillary.h.

◆ dyadic_splitting()

template<typename Function , typename Container >
auto CoolProp::superancillary::detail::dyadic_splitting ( const std::size_t  N,
const Function &  func,
const double  xmin,
const double  xmax,
const int  M = 3,
const double  tol = 1e-12,
const int  max_refine_passes = 8,
const std::optional< std::function< void(int, const Container &)> > &  callback = std::nullopt 
) -> Container
inline

std::function<double(double)>

Definition at line 185 of file superancillary.h.

◆ get_LU_matrices()

auto CoolProp::superancillary::detail::get_LU_matrices ( std::size_t  N)
inline

Get the L and U matrices needed for transformations between nodes and function values in a Chebyshev expansion.

The L matrix is used to convert from functional values to coefficients, as in

\[ \vec{c} = \mathbf{L}\vec{f} \]

The U matrix is used to convert from coefficients to functional values, as in

\[ \vec{f} = \mathbf{U}\vec{c} \]

Parameters
Nthe degree of the expansion (one less than the number of coefficients)

< Matrix of coefficients

< Matrix of coefficients

Definition at line 151 of file superancillary.h.

◆ M_element_norm() [1/2]

double CoolProp::superancillary::detail::M_element_norm ( const Eigen::ArrayXd &  x,
Eigen::Index  M 
)
inline

Definition at line 176 of file superancillary.h.

◆ M_element_norm() [2/2]

double CoolProp::superancillary::detail::M_element_norm ( const std::vector< double > &  x,
Eigen::Index  M 
)
inline

Definition at line 171 of file superancillary.h.

◆ toms748()

double CoolProp::superancillary::detail::toms748 ( const std::function< double(double)> &  f,
double  a,
double  b,
double  fa,
double  fb,
unsigned int  bits,
std::size_t  max_iter 
)

Bracketing rootfinder (Boost's TOMS 748). Declared here but DEFINED out-of-line in src/superancillary.cpp so the boost dependency stays internal to the compiled CoolProp library – consumers of this installed header do not need boost on their include path. f is the residual function and [a, b] a bracket with fa = f(a), fb = f(b); bits is the TOMS 748 bit tolerance and max_iter the function-call cap. Returns the midpoint of the final bracket.

Definition at line 31 of file superancillary.cpp.