My Project
|
Dynamic source data for block-average pressure calculations. More...
#include <PAvgDynamicSourceData.hpp>
Classes | |
class | SourceDataSpan |
Ad hoc implementation of fixed-width span/view of an underlying contiguous range of elements. More... | |
Public Member Functions | |
PAvgDynamicSourceData (const std::vector< std::size_t > &sourceLocations) | |
Constructor. | |
virtual | ~PAvgDynamicSourceData () |
Destructor. | |
SourceDataSpan< Scalar > | operator[] (const std::size_t source) |
Acquire read/write span of data items corresponding to a single source location. | |
SourceDataSpan< const Scalar > | operator[] (const std::size_t source) const |
Acquire read-only span of data items corresponding to a single source location. | |
Protected Member Functions | |
SourceDataSpan< Scalar > | sourceTerm (const std::size_t ix, std::vector< Scalar > &src) |
Form mutable data span into non-default backing store. | |
void | reconstruct (const std::vector< std::size_t > &sourceLocations) |
Reconstruct Source Data backing storage and internal mapping tables. | |
Static Protected Member Functions | |
static constexpr std::size_t | numSpanItems () noexcept |
Provide number of span items using function syntax. | |
Protected Attributes | |
std::vector< Scalar > | src_ {} |
Contiguous array of data items for all source locations. | |
Dynamic source data for block-average pressure calculations.
|
explicit |
Constructor.
[in] | sourceLocations | Known locations, typically linearised global call IDs, for which to enable collecting/reporting dynamic source data. |
|
inlinevirtual |
Destructor.
Marked virtual because this type is intended for inheritance.
|
inlinestaticconstexprprotectednoexcept |
Provide number of span items using function syntax.
Marked 'protected' because derived classes might need this information too.
Opm::PAvgDynamicSourceData< Scalar >::template SourceDataSpan< Scalar > Opm::PAvgDynamicSourceData< Scalar >::operator[] | ( | const std::size_t | source | ) |
Acquire read/write span of data items corresponding to a single source location.
Mostly intended for assigning values.
[in] | source | Source location. Function will throw if source is not one of the known locations registered in the object constructor. |
Opm::PAvgDynamicSourceData< Scalar >::template SourceDataSpan< const Scalar > Opm::PAvgDynamicSourceData< Scalar >::operator[] | ( | const std::size_t | source | ) | const |
Acquire read-only span of data items corresponding to a single source location.
Intended for extracting previously assigned data items.
[in] | source | Source location. Function will throw if source is not one of the known locations registered in the object constructor. |
|
protected |
Reconstruct Source Data backing storage and internal mapping tables.
Effectively replaces the original object formed by the constructor. Mainly intended for updating objects as new wells and/or new reservoir connections are introduced.
[in] | sourceLocations | Known locations, typically linearised global call IDs, for which to enable collecting/reporting dynamic source data. |
|
protected |
Form mutable data span into non-default backing store.
Mainly intended for constructing span objects in backing store for local (on-rank) sources in parallel runs.
[in] | ix | Logical element index into source term backing store. |
[in,out] | src | Source term backing store. |
src
.
|
protected |
Contiguous array of data items for all source locations.
Intentionally accessible to derived classes for use in parallel runs.