Loading...
Searching...
No Matches
Opm::PAvgDynamicSourceData< Scalar > Class Template Reference

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.

## Detailed Description

template<typename Scalar>
class Opm::PAvgDynamicSourceData< Scalar >

Dynamic source data for block-average pressure calculations.

## Constructor & Destructor Documentation

## PAvgDynamicSourceData()

template<class Scalar>

Opm::PAvgDynamicSourceData< Scalar >::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()

template<typename Scalar>

virtual Opm::PAvgDynamicSourceData< Scalar >::~PAvgDynamicSourceData | ( |  | ) |

inline virtual

Destructor.

Marked virtual because this type is intended for inheritance.

## Member Function Documentation

## numSpanItems()

template<typename Scalar>

constexpr std::size_t Opm::PAvgDynamicSourceData< Scalar >::numSpanItems | ( |  | ) |

inline static constexpr protected noexcept

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]

template<class Scalar>

Opm::PAvgDynamicSourceData< Scalar >::template SourceDataSpan< Scalar > Opm::PAvgDynamicSourceData< Scalar >::operator[] | ( | const std::size_t | source | ) |

nodiscard

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]

template<class Scalar>

Opm::PAvgDynamicSourceData< Scalar >::template SourceDataSpan< const Scalar > Opm::PAvgDynamicSourceData< Scalar >::operator[] | ( | const std::size_t | source | ) | const

nodiscard

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()

template<class Scalar>

void Opm::PAvgDynamicSourceData< Scalar >::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()

template<class Scalar>

Opm::PAvgDynamicSourceData< Scalar >::template SourceDataSpan< Scalar > Opm::PAvgDynamicSourceData< Scalar >::sourceTerm | ( | const std::size_t | ix,
|  | std::vector< Scalar > & | src )

nodiscard 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.

Parameters

  [in] | ix | Logical element index into source term backing store.
  [in,out] | src | Source term backing store.

Returns
  Mutable view into `src`.

## Member Data Documentation

## src_

template<typename Scalar>

std::vector<Scalar> Opm::PAvgDynamicSourceData< Scalar >::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:

- opm/input/eclipse/Schedule/Well/PAvgCalculator.hpp
- opm/input/eclipse/Schedule/Well/PAvgDynamicSourceData.hpp
- opm/input/eclipse/Schedule/Well/PAvgDynamicSourceData.cpp