CoolProp
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

#include <TabularBackends.h>

Inheritance diagram for CoolProp::SinglePhaseGriddedTableData:
Inheritance graph
[legend]
Collaboration diagram for CoolProp::SinglePhaseGriddedTableData:
Collaboration graph
[legend]

Public Member Functions

virtual void set_limits ()=0
 
void build (shared_ptr< CoolProp::AbstractState > &AS)
 Build this table.
 
 MSGPACK_DEFINE (revision, matrices, xmin, xmax, ymin, ymax)
 
void resize (std::size_t Nx, std::size_t Ny)
 Resize all the matrices.
 
void make_axis_vectors (void)
 Make vectors for the x-axis values and the y-axis values.
 
void make_good_neighbors (void)
 Make matrices of good neighbors if the current value for i,j corresponds to a bad node.
 
void pack ()
 Take all the matrices that are in the class and pack them into the matrices map for easy unpacking using msgpack.
 
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.
 
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.
 
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)
 
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.
 
void find_native_nearest_good_neighbor (double x, double y, std::size_t &i, std::size_t &j)
 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.
 
void find_native_nearest_good_cell (double x, double y, std::size_t &i, std::size_t &j)
 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.
 
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
 

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