CoolProp  6.6.0
An open-source fluid property and humid air property database
Functions
CPnumerics.cpp File Reference
#include "CPnumerics.h"
#include "MatrixMath.h"
#include <unsupported/Eigen/Polynomials>

Go to the source code of this file.

Functions

double root_sum_square (const std::vector< double > &x)
 
double interp1d (const std::vector< double > *x, const std::vector< double > *y, double x0)
 
double powInt (double x, int y)
 
void MatInv_2 (double A[2][2], double B[2][2])
 
void solve_cubic (double a, double b, double c, double d, int &N, double &x0, double &x1, double &x2)
 Solve a cubic with coefficients in decreasing order. More...
 
void solve_quartic (double a, double b, double c, double d, double e, int &N, double &x0, double &x1, double &x2, double &x3)
 

Function Documentation

◆ interp1d()

double interp1d ( const std::vector< double > *  x,
const std::vector< double > *  y,
double  x0 
)

Definition at line 12 of file CPnumerics.cpp.

◆ MatInv_2()

void MatInv_2 ( double  A[2][2],
double  B[2][2] 
)

Definition at line 70 of file CPnumerics.cpp.

◆ powInt()

double powInt ( double  x,
int  y 
)

Definition at line 39 of file CPnumerics.cpp.

◆ root_sum_square()

double root_sum_square ( const std::vector< double > &  x)

Definition at line 5 of file CPnumerics.cpp.

◆ solve_cubic()

void solve_cubic ( double  a,
double  b,
double  c,
double  d,
int &  N,
double &  x0,
double &  x1,
double &  x2 
)

Solve a cubic with coefficients in decreasing order.

0 = ax^3 + b*x^2 + c*x + d

Parameters
aThe x^3 coefficient
bThe x^2 coefficient
cThe x^1 coefficient
dThe x^0 coefficient
NThe number of unique real solutions found
x0The first solution found
x1The second solution found
x2The third solution found

Definition at line 81 of file CPnumerics.cpp.

◆ solve_quartic()

void solve_quartic ( double  a,
double  b,
double  c,
double  d,
double  e,
int &  N,
double &  x0,
double &  x1,
double &  x2,
double &  x3 
)

Definition at line 133 of file CPnumerics.cpp.