CoolProp
6.6.0
An open-source fluid property and humid air property database
|
A spline is a curve given by the form y = ax^3 + bx^2 + c*x + d As there are 4 constants, 4 constraints are needed to create the spline. These constraints could be the derivative or value at a point Often, the value and derivative of the value are known at two points.
Definition at line 436 of file CPnumerics.h.
#include <CPnumerics.h>
Public Member Functions | |
SplineClass () | |
bool | build (void) |
bool | add_value_constraint (double x, double y) |
void | add_4value_constraints (double x1, double x2, double x3, double x4, double y1, double y2, double y3, double y4) |
bool | add_derivative_constraint (double x, double dydx) |
double | evaluate (double x) |
Public Attributes | |
double | a |
double | b |
double | c |
double | d |
Protected Attributes | |
int | Nconstraints |
std::vector< std::vector< double > > | A |
std::vector< double > | B |
|
inline |
Definition at line 445 of file CPnumerics.h.
void SplineClass::add_4value_constraints | ( | double | x1, |
double | x2, | ||
double | x3, | ||
double | x4, | ||
double | y1, | ||
double | y2, | ||
double | y3, | ||
double | y4 | ||
) |
Definition at line 183 of file CPnumerics.cpp.
bool SplineClass::add_derivative_constraint | ( | double | x, |
double | dydx | ||
) |
Definition at line 189 of file CPnumerics.cpp.
bool SplineClass::add_value_constraint | ( | double | x, |
double | y | ||
) |
Definition at line 172 of file CPnumerics.cpp.
bool SplineClass::build | ( | void | ) |
Definition at line 160 of file CPnumerics.cpp.
double SplineClass::evaluate | ( | double | x | ) |
Definition at line 200 of file CPnumerics.cpp.
|
protected |
Definition at line 440 of file CPnumerics.h.
double SplineClass::a |
Definition at line 444 of file CPnumerics.h.
|
protected |
Definition at line 441 of file CPnumerics.h.
double SplineClass::b |
Definition at line 444 of file CPnumerics.h.
double SplineClass::c |
Definition at line 444 of file CPnumerics.h.
double SplineClass::d |
Definition at line 444 of file CPnumerics.h.
|
protected |
Definition at line 439 of file CPnumerics.h.