rizer.cantera_ext
C++ Cantera 1-D plasma extension (custom Domain1D models and solvers)
Loading...
Searching...
No Matches
rizer::PropertyTable Class Reference

#include <PropertyTable.h>

Public Member Functions

 PropertyTable ()=default
 PropertyTable (std::vector< double > T, std::vector< double > values)
 Construct from parallel T (strictly increasing, [K]) and value arrays.
bool empty () const
 True for a default-constructed (empty) table; eval() returns 0.0.
double eval (double T) const
 Linearly interpolated value at T; clamped to the table endpoints.

Static Public Member Functions

static PropertyTable constant (double value)
 A two-point constant table returning value for any T.
static PropertyTable fromTableOrScalar (const std::vector< double > &x, const std::vector< double > &v)
 Build a table from a grid/value pair, a single scalar, or neither.

Detailed Description

Definition at line 31 of file PropertyTable.h.

Constructor & Destructor Documentation

◆ PropertyTable() [1/2]

rizer::PropertyTable::PropertyTable ( )
default

◆ PropertyTable() [2/2]

rizer::PropertyTable::PropertyTable ( std::vector< double > T,
std::vector< double > values )
inline

Construct from parallel T (strictly increasing, [K]) and value arrays.

Parameters
TTemperature knots [K], strictly increasing
valuesProperty value at each knot, same units as eval()'s return
Exceptions
std::invalid_argumentif sizes differ or fewer than 2 points.

Definition at line 39 of file PropertyTable.h.

Member Function Documentation

◆ constant()

PropertyTable rizer::PropertyTable::constant ( double value)
inlinestatic

A two-point constant table returning value for any T.

Convenience factory used to set P_rad = 0 when radiation is disabled.

Parameters
valueConstant value to return for any T, same units as eval()'s return

Definition at line 51 of file PropertyTable.h.

◆ empty()

bool rizer::PropertyTable::empty ( ) const
inline

True for a default-constructed (empty) table; eval() returns 0.0.

Definition at line 68 of file PropertyTable.h.

◆ eval()

double rizer::PropertyTable::eval ( double T) const
inline

Linearly interpolated value at T; clamped to the table endpoints.

Safe to call with T below or above the tabulated range — never NaN.

Parameters
TTemperature [K] to evaluate the table at

Definition at line 73 of file PropertyTable.h.

◆ fromTableOrScalar()

PropertyTable rizer::PropertyTable::fromTableOrScalar ( const std::vector< double > & x,
const std::vector< double > & v )
inlinestatic

Build a table from a grid/value pair, a single scalar, or neither.

Parameters
xGrid points (independent variable), strictly increasing, or empty/scalar
vValues at x, or a single scalar value, or empty
Returns
A real table if x/v are >= 2 matching points, a constant table if v has exactly one value, or an empty table (eval() -> 0) otherwise.

Definition at line 60 of file PropertyTable.h.


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