My Project
|
Manage tables of column data, possibly with sub-tables, all with equal number of rows (i.e., with padding), and possibly with multiple tables pertaining to multiple subsets (i.e., cell regions). More...
#include <LinearisedOutputTable.hpp>
Public Member Functions | |
LinearisedOutputTable (const std::size_t numTables, const std::size_t numPrimary, const std::size_t numRows, const std::size_t numCols) | |
Constructor. | |
LinearisedOutputTable (const std::size_t numTables, const std::size_t numPrimary, const std::size_t numRows, const std::size_t numCols, const double fillValue) | |
Constructor. | |
std::vector< double >::iterator | column (const std::size_t tableID, const std::size_t primID, const std::size_t colID) |
Retrieve iterator to start of numRows (contiguous) column elements of a particular sub-table of a particular main table. | |
const std::vector< double > & | getData () const |
Read-only access to internal data buffer. | |
std::vector< double > | getDataDestructively () |
Destructive access to internal data buffer. | |
Manage tables of column data, possibly with sub-tables, all with equal number of rows (i.e., with padding), and possibly with multiple tables pertaining to multiple subsets (i.e., cell regions).
Mainly intended for use with the output facility for tabular data.
Opm::LinearisedOutputTable::LinearisedOutputTable | ( | const std::size_t | numTables, |
const std::size_t | numPrimary, | ||
const std::size_t | numRows, | ||
const std::size_t | numCols | ||
) |
Constructor.
Padded table entries set to +1.0e+20.
[in] | numTables | Number of tables managed by internal buffer. Typically corresponds to maximum value of a region ID vector such as SATNUM, IMBNUM, or PVTNUM. |
[in] | numPrimary | Number of primary look-up keys for the tabular data managed by the internal buffer. Mostly relevant (i.e., greater than one) for miscible oil ("PVTO") or miscible gas ("PVTG") tables and typically corresponds to the number of Rs/Rv entries from the TABDIMS keyword. |
[in] | numRows | Number of rows in each sub-table corresponding to a single primary look-up key. Typically the number of nodes (e.g., NSSFUN or NPPVT) of the corresponding input keyword. |
[in] | numCols | Number of columns in each sub-table (and main table). Typically 5. |
Opm::LinearisedOutputTable::LinearisedOutputTable | ( | const std::size_t | numTables, |
const std::size_t | numPrimary, | ||
const std::size_t | numRows, | ||
const std::size_t | numCols, | ||
const double | fillValue | ||
) |
Constructor.
[in] | numTables | Number of tables managed by internal buffer. Typically corresponds to maximum value of a region ID vector such as SATNUM, IMBNUM, or PVTNUM. |
[in] | numPrimary | Number of primary look-up keys for the tabular data managed by the internal buffer. Mostly relevant (i.e., greater than one) for miscible oil ("PVTO") or miscible gas ("PVTG") tables and typically corresponds to the number of Rs/Rv entries from the TABDIMS keyword. |
[in] | numRows | Number of rows in each sub-table corresponding to a single primary look-up key. Typically the number of nodes (e.g., NSSFUN or NPPVT) of the corresponding input keyword. |
[in] | numCols | Number of columns in each sub-table (and main table). Typically 5. |
[in] | fillValue | Data element value for padded table entries. |
std::vector< double >::iterator Opm::LinearisedOutputTable::column | ( | const std::size_t | tableID, |
const std::size_t | primID, | ||
const std::size_t | colID | ||
) |
Retrieve iterator to start of numRows
(contiguous) column elements of a particular sub-table of a particular main table.
[in] | tableID | Numeric ID of main table for which to retrieve a column. Must be strictly less than numTables constructor argument. |
[in] | primID | Numeric ID of primary look-up key (sub-table) for which to retrieve a column. Must be strictly less than numPrimary constructor argument. |
[in] | colID | Numeric ID of column to be retrieved from particular sub-table of particular main table. Must be strictly less than numCols constructor argument. |
const std::vector< double > & Opm::LinearisedOutputTable::getData | ( | ) | const |
Read-only access to internal data buffer.
Mostly to support outputting all table data to external storage.
std::vector< double > Opm::LinearisedOutputTable::getDataDestructively | ( | ) |
Destructive access to internal data buffer.
Mostly to support outputting all table data to external storage.