Dynamic source data for block-average pressure calculations.
More...
#include <PAvgDynamicSourceData.hpp>
|
class | SourceDataSpan |
| Ad hoc implementation of fixed-width span/view of an underlying contiguous range of elements. More...
|
|
|
SourceDataSpan< double > | sourceTerm (const std::size_t ix, std::vector< double > &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 constexpr std::size_t | numSpanItems () noexcept |
| Provide number of span items using function syntax.
|
|
|
std::vector< double > | src_ {} |
| Contiguous array of data items for all source locations.
|
|
Dynamic source data for block-average pressure calculations.
◆ PAvgDynamicSourceData()
Opm::PAvgDynamicSourceData::PAvgDynamicSourceData |
( |
const std::vector< std::size_t > & |
sourceLocations | ) |
|
|
explicit |
Constructor.
- Parameters
-
[in] | sourceLocations | Known locations, typically linearised global call IDs, for which to enable collecting/reporting dynamic source data. |
◆ ~PAvgDynamicSourceData()
virtual Opm::PAvgDynamicSourceData::~PAvgDynamicSourceData |
( |
| ) |
|
|
inlinevirtual |
Destructor.
Marked virtual because this type is intended for inheritance.
◆ numSpanItems()
static constexpr std::size_t Opm::PAvgDynamicSourceData::numSpanItems |
( |
| ) |
|
|
inlinestaticconstexprprotectednoexcept |
Provide number of span items using function syntax.
Marked 'protected' because derived classes might need this information too.
- Returns
- Number of span items.
◆ operator[]() [1/2]
Acquire read/write span of data items corresponding to a single source location.
Mostly intended for assigning values.
- Parameters
-
[in] | source | Source location. Function will throw if source is not one of the known locations registered in the object constructor. |
- Returns
- Read/write span of data items.
◆ operator[]() [2/2]
Acquire read-only span of data items corresponding to a single source location.
Intended for extracting previously assigned data items.
- Parameters
-
[in] | source | Source location. Function will throw if source is not one of the known locations registered in the object constructor. |
- Returns
- Read-only span of data items.
◆ reconstruct()
void Opm::PAvgDynamicSourceData::reconstruct |
( |
const std::vector< std::size_t > & |
sourceLocations | ) |
|
|
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.
- Parameters
-
[in] | sourceLocations | Known locations, typically linearised global call IDs, for which to enable collecting/reporting dynamic source data. |
◆ sourceTerm()
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.
- Parameters
-
[in] | ix | Logical element index into source term backing store. |
[in,out] | src | Source term backing store. |
- Returns
- Mutable view into
src
.
◆ src_
std::vector<double> Opm::PAvgDynamicSourceData::src_ {} |
|
protected |
Contiguous array of data items for all source locations.
Intentionally accessible to derived classes for use in parallel runs.
The documentation for this class was generated from the following files: