CoolProp  6.6.0
An open-source fluid property and humid air property database
Public Member Functions | Public Attributes | List of all members
CoolProp::SinglePhaseGriddedTableData Class Referenceabstract

Detailed Description

This class holds the data for a single-phase interpolation table that is regularly spaced.

It contains very few members or methods, mostly it just holds the data

Definition at line 600 of file TabularBackends.h.

#include <TabularBackends.h>

Inheritance diagram for CoolProp::SinglePhaseGriddedTableData:
CoolProp::LogPHTable CoolProp::LogPTTable

Public Member Functions

virtual void set_limits ()=0
 
 SinglePhaseGriddedTableData ()
 
void build (shared_ptr< CoolProp::AbstractState > &AS)
 Build this table. More...
 
 MSGPACK_DEFINE (revision, matrices, xmin, xmax, ymin, ymax)
 
void resize (std::size_t Nx, std::size_t Ny)
 Resize all the matrices. More...
 
void make_axis_vectors (void)
 Make vectors for the x-axis values and the y-axis values. More...
 
void make_good_neighbors (void)
 Make matrices of good neighbors if the current value for i,j corresponds to a bad node. More...
 
void pack ()
 Take all the matrices that are in the class and pack them into the matrices map for easy unpacking using msgpack. More...
 
std::map< std::string, std::vector< std::vector< double > > >::iterator get_matrices_iterator (const std::string &name)
 
void unpack ()
 Take all the matrices that are in the class and pack them into the matrices map for easy unpacking using msgpack. More...
 
bool native_inputs_are_in_range (double x, double y)
 Check that the native inputs (the inputs the table is based on) are in range. More...
 
void find_native_nearest_neighbor (double x, double y, std::size_t &i, std::size_t &j)
 Find the nearest neighbor for native inputs (the inputs the table is based on) Does not check whether this corresponds to a valid node or not Use bisection since it is faster than calling a logarithm (surprising, but true) More...
 
void find_nearest_neighbor (parameters givenkey, double givenval, parameters otherkey, double otherval, std::size_t &i, std::size_t &j)
 Find the nearest neighbor for one (given) variable native, one variable non-native. More...
 
void find_native_nearest_good_neighbor (double x, double y, std::size_t &i, std::size_t &j)
 
void find_native_nearest_good_cell (double x, double y, std::size_t &i, std::size_t &j)
 
const std::vector< std::vector< double > > & get (parameters key)
 

Public Attributes

std::size_t Nx
 
std::size_t Ny
 
CoolProp::parameters xkey
 
CoolProp::parameters ykey
 
shared_ptr< CoolProp::AbstractStateAS
 
std::vector< double > xvec
 
std::vector< double > yvec
 
std::vector< std::vector< std::size_t > > nearest_neighbor_i
 
std::vector< std::vector< std::size_t > > nearest_neighbor_j
 
bool logx
 
bool logy
 
double xmin
 
double ymin
 
double xmax
 
double ymax
 
LIST_OF_MATRICES int revision
 
std::map< std::string, std::vector< std::vector< double > > > matrices
 

Constructor & Destructor Documentation

◆ SinglePhaseGriddedTableData()

CoolProp::SinglePhaseGriddedTableData::SinglePhaseGriddedTableData ( )
inline

Definition at line 614 of file TabularBackends.h.

Member Function Documentation

◆ build()

void CoolProp::SinglePhaseGriddedTableData::build ( shared_ptr< CoolProp::AbstractState > &  AS)

Build this table.

Definition at line 224 of file TabularBackends.cpp.

◆ find_native_nearest_good_cell()

void CoolProp::SinglePhaseGriddedTableData::find_native_nearest_good_cell ( double  x,
double  y,
std::size_t &  i,
std::size_t &  j 
)
inline

Find the nearest cell with lower left coordinate (i,j) where (i,j) is a good node, and so are (i+1,j), (i,j+1), (i+1,j+1) This is needed for bicubic interpolation

Definition at line 790 of file TabularBackends.h.

◆ find_native_nearest_good_neighbor()

void CoolProp::SinglePhaseGriddedTableData::find_native_nearest_good_neighbor ( double  x,
double  y,
std::size_t &  i,
std::size_t &  j 
)
inline

Find the nearest good neighbor node for inputs that are the same as the grid inputs If the straightforward node (i,j) obtained by bisection is no good, find its nearest good node

Definition at line 775 of file TabularBackends.h.

◆ find_native_nearest_neighbor()

void CoolProp::SinglePhaseGriddedTableData::find_native_nearest_neighbor ( double  x,
double  y,
std::size_t &  i,
std::size_t &  j 
)
inline

Find the nearest neighbor for native inputs (the inputs the table is based on) Does not check whether this corresponds to a valid node or not Use bisection since it is faster than calling a logarithm (surprising, but true)

Definition at line 718 of file TabularBackends.h.

◆ find_nearest_neighbor()

void CoolProp::SinglePhaseGriddedTableData::find_nearest_neighbor ( parameters  givenkey,
double  givenval,
parameters  otherkey,
double  otherval,
std::size_t &  i,
std::size_t &  j 
)
inline

Find the nearest neighbor for one (given) variable native, one variable non-native.

Definition at line 745 of file TabularBackends.h.

◆ get()

const std::vector<std::vector<double> >& CoolProp::SinglePhaseGriddedTableData::get ( parameters  key)
inline

Definition at line 794 of file TabularBackends.h.

◆ get_matrices_iterator()

std::map<std::string, std::vector<std::vector<double> > >::iterator CoolProp::SinglePhaseGriddedTableData::get_matrices_iterator ( const std::string &  name)
inline

Definition at line 692 of file TabularBackends.h.

◆ make_axis_vectors()

void CoolProp::SinglePhaseGriddedTableData::make_axis_vectors ( void  )
inline

Make vectors for the x-axis values and the y-axis values.

Definition at line 647 of file TabularBackends.h.

◆ make_good_neighbors()

void CoolProp::SinglePhaseGriddedTableData::make_good_neighbors ( void  )
inline

Make matrices of good neighbors if the current value for i,j corresponds to a bad node.

Definition at line 660 of file TabularBackends.h.

◆ MSGPACK_DEFINE()

CoolProp::SinglePhaseGriddedTableData::MSGPACK_DEFINE ( revision  ,
matrices  ,
xmin  ,
xmax  ,
ymin  ,
ymax   
)

◆ native_inputs_are_in_range()

bool CoolProp::SinglePhaseGriddedTableData::native_inputs_are_in_range ( double  x,
double  y 
)
inline

Check that the native inputs (the inputs the table is based on) are in range.

Definition at line 711 of file TabularBackends.h.

◆ pack()

void CoolProp::SinglePhaseGriddedTableData::pack ( )
inline

Take all the matrices that are in the class and pack them into the matrices map for easy unpacking using msgpack.

Definition at line 686 of file TabularBackends.h.

◆ resize()

void CoolProp::SinglePhaseGriddedTableData::resize ( std::size_t  Nx,
std::size_t  Ny 
)
inline

Resize all the matrices.

Definition at line 639 of file TabularBackends.h.

◆ set_limits()

virtual void CoolProp::SinglePhaseGriddedTableData::set_limits ( )
pure virtual

◆ unpack()

void CoolProp::SinglePhaseGriddedTableData::unpack ( )
inline

Take all the matrices that are in the class and pack them into the matrices map for easy unpacking using msgpack.

Definition at line 700 of file TabularBackends.h.

Member Data Documentation

◆ AS

shared_ptr<CoolProp::AbstractState> CoolProp::SinglePhaseGriddedTableData::AS

Definition at line 606 of file TabularBackends.h.

◆ logx

bool CoolProp::SinglePhaseGriddedTableData::logx

Definition at line 609 of file TabularBackends.h.

◆ logy

bool CoolProp::SinglePhaseGriddedTableData::logy

Definition at line 609 of file TabularBackends.h.

◆ matrices

std::map<std::string, std::vector<std::vector<double> > > CoolProp::SinglePhaseGriddedTableData::matrices

Definition at line 633 of file TabularBackends.h.

◆ nearest_neighbor_i

std::vector<std::vector<std::size_t> > CoolProp::SinglePhaseGriddedTableData::nearest_neighbor_i

Definition at line 608 of file TabularBackends.h.

◆ nearest_neighbor_j

std::vector<std::vector<std::size_t> > CoolProp::SinglePhaseGriddedTableData::nearest_neighbor_j

Definition at line 608 of file TabularBackends.h.

◆ Nx

std::size_t CoolProp::SinglePhaseGriddedTableData::Nx

Definition at line 604 of file TabularBackends.h.

◆ Ny

std::size_t CoolProp::SinglePhaseGriddedTableData::Ny

Definition at line 604 of file TabularBackends.h.

◆ revision

LIST_OF_MATRICES int CoolProp::SinglePhaseGriddedTableData::revision

Definition at line 632 of file TabularBackends.h.

◆ xkey

CoolProp::parameters CoolProp::SinglePhaseGriddedTableData::xkey

Definition at line 605 of file TabularBackends.h.

◆ xmax

double CoolProp::SinglePhaseGriddedTableData::xmax

Definition at line 610 of file TabularBackends.h.

◆ xmin

double CoolProp::SinglePhaseGriddedTableData::xmin

Definition at line 610 of file TabularBackends.h.

◆ xvec

std::vector<double> CoolProp::SinglePhaseGriddedTableData::xvec

Definition at line 607 of file TabularBackends.h.

◆ ykey

CoolProp::parameters CoolProp::SinglePhaseGriddedTableData::ykey

Definition at line 605 of file TabularBackends.h.

◆ ymax

double CoolProp::SinglePhaseGriddedTableData::ymax

Definition at line 610 of file TabularBackends.h.

◆ ymin

double CoolProp::SinglePhaseGriddedTableData::ymin

Definition at line 610 of file TabularBackends.h.

◆ yvec

std::vector<double> CoolProp::SinglePhaseGriddedTableData::yvec

Definition at line 607 of file TabularBackends.h.


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