![]() |
Nalu
Nalu: a generalized unstructured massively parallel low Mach flow code designed to support a variety of energy applications of interest (most notably Wind ECP) built on the Sierra Toolkit and Trilinos solver Tpetra/Epetra stack. The open source BSD, clause 3 license model has been chosen for the code base. See LICENSE for more information. http://NaluCFD.org
|
Object to manage property evaluation as a function of a set of input chemical state variables. More...
#include <HDF5Table.h>
Public Types | |
| typedef std::map< std::string, std::string > | Attributes |
Public Member Functions | |
| HDF5Table () | |
| Construct an empty HDF5Table This can be filled later with read_hdf5( H5IO fileIO ). More... | |
| HDF5Table (H5IO *fileIO, std::string tablePropName, std::vector< std::string > &indVarNameVec, std::vector< std::string > &indVarTableNameVec) | |
| Construct an HDF5Table starting with the HDF5 file pointer fileIO and calling read_hdf5() method to pull data from disk. More... | |
| virtual | ~HDF5Table () |
| void | add_converter (const Converter *converter) |
| Insert the provided Converter into this HDF5Table object. More... | |
| const std::string & | name () const |
| Get the name of the variable returned by a query to this HDF5Table. More... | |
| const std::vector< std::string > & | input_names () const |
| Get the list of input variables required by calls to query(), in the order that they are to be provided. More... | |
| unsigned int | dimension () const |
| double | query (const std::vector< double > &inputs) const |
| Return the property value as a function of the provided input variables. More... | |
| double | raw_query (const std::vector< double > &inputs) const |
| Return the property value as a function of the provided input variables. More... | |
| void | set_clipping_log_size (unsigned int size) |
| Set the number of clipping events we want to log. More... | |
| unsigned int | num_clipping_events () const |
| Return the current count of clipping events that have occurred. More... | |
| const ClipEventLog & | clipping_event_log () const |
| Return the buffer of input coordinates that resulted in a clipping event. More... | |
| const std::vector< std::string > & | clipping_event_input_names () const |
| Return the list of input variables corresponding to the values in the clipping event log. More... | |
| const std::vector< double > & | clipping_event_min_bounds () const |
| Return the list of minimum internal clipping bounds. More... | |
| const std::vector< double > & | clipping_event_max_bounds () const |
| Return the list of maximum internal clipping bounds. More... | |
| void | clear_clipping_log () |
| Reset the internal clipping event logging. More... | |
| unsigned int | num_converters () const |
| Return the number of Converters. More... | |
| bool | has_attribute (const std::string &name) const |
| Query if the table contains the named attribute. More... | |
| const std::string & | attribute (const std::string &name) const |
| Request the named attribute. More... | |
| void | read_hdf5_property () |
| Read tablePropName_ entry from HDF5Table specified in fileIO_. More... | |
| void | read_hdf5_table (H5IO &io) |
| Read HDF5Table from the specified HDF5 device, an already-specified subtable. More... | |
Private Member Functions | |
| void | log_clip_event (const std::vector< double > &values) const |
| void | update_input_mapping () |
| Rewire the inputs and outputs of the Table and any optional Converters so that they talk to each other properly and inputs to the HDF5Table will be sent to the correct object. More... | |
| int | findix (const std::vector< std::string > &nameVector, const std::string &name) |
| Return the index correspondig to the variable name in nameVector. More... | |
Private Attributes | |
| H5IO * | fileIO_ |
| std::string | tablePropName_ |
| std::vector< std::string > | indVarTableNameVec_ |
| const size_t | indVarSize_ |
| unsigned int | dimension_ |
| std::string | name_ |
| std::vector< std::string > | inputNames_ |
| std::vector< const Converter * > | converters_ |
| std::vector< unsigned int > | directInputIndex_ |
| std::vector< unsigned int > | convTableIndex_ |
| std::vector< std::vector< unsigned int > > | convInputIndex_ |
| std::vector< unsigned int > | indexIndVar_ |
| std::vector< unsigned int > | inputLogScale_ |
| std::vector< double > | meshMin_ |
| std::vector< double > | meshMax_ |
| std::vector< double > | inputMin_ |
| std::vector< double > | inputMax_ |
| std::vector< std::vector< double > > | mesh_ |
| double | valueMin_ |
| double | valueMax_ |
| Attributes | attributes_ |
| BSpline * | spline_ |
| unsigned int | clipEventLogSize_ |
| unsigned int | numClipped_ |
| ClipEventLog | clipEventLog_ |
| std::vector< double > | converterBuf_ |
| std::vector< double > | lookupBuffer_ |
| std::vector< double > | lookupBufferChecked_ |
Object to manage property evaluation as a function of a set of input chemical state variables.
This class provides the public interface for performing property evaluations as a function of chemical state variables. It acts as a wrapper for a contained multidimensional lookup table and any number of (optional) input conversion operations required by the particular turbulence/chemistry interaction model being used. The internal structure does not matter to the calling routine.
| typedef std::map<std::string, std::string> sierra::nalu::HDF5Table::Attributes |
| sierra::nalu::HDF5Table::HDF5Table | ( | ) |
Construct an empty HDF5Table This can be filled later with read_hdf5( H5IO fileIO ).
| sierra::nalu::HDF5Table::HDF5Table | ( | H5IO * | fileIO, |
| std::string | tablePropName, | ||
| std::vector< std::string > & | indVarNameVec, | ||
| std::vector< std::string > & | indVarTableNameVec | ||
| ) |
Construct an HDF5Table starting with the HDF5 file pointer fileIO and calling read_hdf5() method to pull data from disk.
References indVarSize_, and read_hdf5_property().
|
virtual |
References converters_.
| void sierra::nalu::HDF5Table::add_converter | ( | const Converter * | converter | ) |
Insert the provided Converter into this HDF5Table object.
It will be automatically wired into the central Table, given synchronization of input and output variables. More than one converter may be added to a HDF5Table.
References converters_, and update_input_mapping().
| const std::string & sierra::nalu::HDF5Table::attribute | ( | const std::string & | name | ) | const |
| void sierra::nalu::HDF5Table::clear_clipping_log | ( | ) |
Reset the internal clipping event logging.
References clipEventLog_, and numClipped_.
|
inline |
Return the list of input variables corresponding to the values in the clipping event log.
This is essentially the inputs to the internal interpolation table.
| const ClipEventLog & sierra::nalu::HDF5Table::clipping_event_log | ( | ) | const |
Return the buffer of input coordinates that resulted in a clipping event.
References clipEventLog_.
| const std::vector< double > & sierra::nalu::HDF5Table::clipping_event_max_bounds | ( | ) | const |
Return the list of maximum internal clipping bounds.
References inputMax_.
| const std::vector< double > & sierra::nalu::HDF5Table::clipping_event_min_bounds | ( | ) | const |
Return the list of minimum internal clipping bounds.
References inputMin_.
|
inline |
|
private |
Return the index correspondig to the variable name in nameVector.
References name().
Referenced by update_input_mapping().
| bool sierra::nalu::HDF5Table::has_attribute | ( | const std::string & | name | ) | const |
Query if the table contains the named attribute.
References attributes_.
|
inline |
Get the list of input variables required by calls to query(), in the order that they are to be provided.
Referenced by sierra::nalu::GammaConverter::read_hdf5(), and update_input_mapping().
|
private |
References clipEventLog_, clipEventLogSize_, inputMax_, inputMin_, and sierra::nalu::ClipEvent::severity.
Referenced by query().
|
inline |
Get the name of the variable returned by a query to this HDF5Table.
Referenced by findix(), read_hdf5_table(), and update_input_mapping().
| unsigned int sierra::nalu::HDF5Table::num_clipping_events | ( | ) | const |
Return the current count of clipping events that have occurred.
References numClipped_.
|
inline |
Return the number of Converters.
If the number is zero, then the inputs to the HDF5Table will match the inputs to the internal Table, and the Table can be queried for overall HDF5Table configuration like independent variable min, max, and log scale.
References sierra::nalu::ClipEvent::values.
| double sierra::nalu::HDF5Table::query | ( | const std::vector< double > & | inputs | ) | const |
Return the property value as a function of the provided input variables.
Input bounds clipping of the internal lookup table is enforced, and a log of clipped queries is stored.
| inputs | : Array of independent variable values |
References clipEventLogSize_, converterBuf_, converters_, convInputIndex_, convTableIndex_, dimension_, directInputIndex_, indexIndVar_, inputLogScale_, inputMax_, inputMin_, log_clip_event(), lookupBuffer_, lookupBufferChecked_, numClipped_, spline_, and sierra::nalu::BSpline::value().
Referenced by sierra::nalu::HDF5TablePropAlgorithm::execute(), sierra::nalu::ChiConverter::query(), and sierra::nalu::GammaConverter::query().
| double sierra::nalu::HDF5Table::raw_query | ( | const std::vector< double > & | inputs | ) | const |
Return the property value as a function of the provided input variables.
WARNING: No input bounds clipping is enforced, and no logs are stored of out-of-bounds queries. This query method allows extrapolation, which can be dangerous! Only use this if you know what you are doing!
| inputs | : Array of independent variable values |
References converterBuf_, converters_, convInputIndex_, convTableIndex_, directInputIndex_, lookupBuffer_, spline_, and sierra::nalu::BSpline::value().
| void sierra::nalu::HDF5Table::read_hdf5_property | ( | ) |
Read tablePropName_ entry from HDF5Table specified in fileIO_.
References converters_, sierra::nalu::ConverterFactory::create(), dimension_, fileIO_, inputNames_, name_, sierra::nalu::H5IO::open_group(), sierra::nalu::H5IO::read_attribute(), sierra::nalu::Converter::read_hdf5(), read_hdf5_table(), tablePropName_, and update_input_mapping().
Referenced by HDF5Table().
| void sierra::nalu::HDF5Table::read_hdf5_table | ( | H5IO & | io | ) |
Read HDF5Table from the specified HDF5 device, an already-specified subtable.
This is also used to read Converter tables.
References attributes_, dimension_, sierra::nalu::H5IO::file_version(), inputLogScale_, inputMax_, inputMin_, inputNames_, lookupBuffer_, lookupBufferChecked_, mesh_, meshMax_, meshMin_, name(), name_, sierra::nalu::H5IO::num_attributes(), sierra::nalu::H5IO::open_group(), sierra::nalu::H5IO::read_attribute(), sierra::nalu::H5IO::read_dataset(), sierra::nalu::BSpline::read_hdf5(), spline_, valueMax_, and valueMin_.
Referenced by sierra::nalu::ChiConverter::read_hdf5(), sierra::nalu::GammaConverter::read_hdf5(), and read_hdf5_property().
| void sierra::nalu::HDF5Table::set_clipping_log_size | ( | unsigned int | size | ) |
Set the number of clipping events we want to log.
References clipEventLogSize_.
|
private |
Rewire the inputs and outputs of the Table and any optional Converters so that they talk to each other properly and inputs to the HDF5Table will be sent to the correct object.
References converterBuf_, converters_, convInputIndex_, convTableIndex_, dimension_, directInputIndex_, findix(), indexIndVar_, indVarTableNameVec_, input_names(), inputNames_, lookupBuffer_, lookupBufferChecked_, and name().
Referenced by add_converter(), and read_hdf5_property().
|
private |
Referenced by attribute(), has_attribute(), and read_hdf5_table().
|
mutableprivate |
Referenced by clear_clipping_log(), clipping_event_log(), and log_clip_event().
|
mutableprivate |
Referenced by log_clip_event(), query(), and set_clipping_log_size().
|
mutableprivate |
Referenced by query(), raw_query(), and update_input_mapping().
|
private |
Referenced by add_converter(), query(), raw_query(), read_hdf5_property(), update_input_mapping(), and ~HDF5Table().
|
private |
Referenced by query(), raw_query(), and update_input_mapping().
|
private |
Referenced by query(), raw_query(), and update_input_mapping().
|
private |
Referenced by query(), read_hdf5_property(), read_hdf5_table(), and update_input_mapping().
|
private |
Referenced by query(), raw_query(), and update_input_mapping().
|
private |
Referenced by read_hdf5_property().
|
private |
Referenced by query(), and update_input_mapping().
|
private |
Referenced by HDF5Table().
|
private |
Referenced by update_input_mapping().
|
private |
Referenced by query(), and read_hdf5_table().
|
private |
Referenced by clipping_event_max_bounds(), log_clip_event(), query(), and read_hdf5_table().
|
private |
Referenced by clipping_event_min_bounds(), log_clip_event(), query(), and read_hdf5_table().
|
private |
Referenced by read_hdf5_property(), read_hdf5_table(), and update_input_mapping().
|
mutableprivate |
Referenced by query(), raw_query(), read_hdf5_table(), and update_input_mapping().
|
mutableprivate |
Referenced by query(), read_hdf5_table(), and update_input_mapping().
|
private |
Referenced by read_hdf5_table().
|
private |
Referenced by read_hdf5_table().
|
private |
Referenced by read_hdf5_table().
|
private |
Referenced by read_hdf5_property(), and read_hdf5_table().
|
mutableprivate |
Referenced by clear_clipping_log(), num_clipping_events(), and query().
|
private |
Referenced by query(), raw_query(), and read_hdf5_table().
|
private |
Referenced by read_hdf5_property().
|
private |
Referenced by read_hdf5_table().
|
private |
Referenced by read_hdf5_table().
1.8.11