Opm::LinearisedOutputTable Class Reference

#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)
 
 LinearisedOutputTable (const std::size_t numTables, const std::size_t numPrimary, const std::size_t numRows, const std::size_t numCols, const double fillValue)
 
std::vector< double >::iterator column (const std::size_t tableID, const std::size_t primID, const std::size_t colID)
 
const std::vector< double > & getData () const
 
std::vector< double > getDataDestructively ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LinearisedOutputTable() [1/2]

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.

Parameters
[in]numTablesNumber of tables managed by internal buffer. Typically corresponds to maximum value of a region ID vector such as SATNUM, IMBNUM, or PVTNUM.
[in]numPrimaryNumber 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]numRowsNumber 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]numColsNumber of columns in each sub-table (and main table). Typically 5.

◆ LinearisedOutputTable() [2/2]

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.

Parameters
[in]numTablesNumber of tables managed by internal buffer. Typically corresponds to maximum value of a region ID vector such as SATNUM, IMBNUM, or PVTNUM.
[in]numPrimaryNumber 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]numRowsNumber 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]numColsNumber of columns in each sub-table (and main table). Typically 5.
[in]fillValueData element value for padded table entries.

Member Function Documentation

◆ column()

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.

Parameters
[in]tableIDNumeric ID of main table for which to retrieve a column. Must be strictly less than numTables constructor argument.
[in]primIDNumeric ID of primary look-up key (sub-table) for which to retrieve a column. Must be strictly less than numPrimary constructor argument.
[in]colIDNumeric ID of column to be retrieved from particular sub-table of particular main table. Must be strictly less than numCols constructor argument.
Returns
Iterator to start of contiguous column elements.

◆ getData()

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.

◆ getDataDestructively()

std::vector< double > Opm::LinearisedOutputTable::getDataDestructively ( )

Destructive access to internal data buffer.

Mostly to support outputting all table data to external storage.

Returns
std::move()
of the internal data buffer.

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