Loading...
Searching...
No Matches
Opm::PAvgCalculator< Scalar >::Accumulator Class Reference

Accumulate weighted running averages of cell contributions to WBP. More...

`#include <PAvgCalculator.hpp>`

## Classes

class | Impl
| Implementation class for calculator's accumulator. More...

## Public Types

using | LocalRunningAverages = std::array<Scalar, 8>
| Collection of running averages and their associate weights.

## Public Member Functions

| Accumulator ()
| Constructor.
| ~Accumulator ()
| Destructor.
| Accumulator (const Accumulator &rhs)
| Copy constructor.
| Accumulator (Accumulator &&rhs)
| Move constructor.
Accumulator & | operator= (const Accumulator &rhs)
| Assignment operator.
Accumulator & | operator= (Accumulator &&rhs)
| Move assignment operator.
Accumulator & | addCentre (const Scalar weight, const Scalar press)
| Add contribution from centre/connecting cell.
Accumulator & | addRectangular (const Scalar weight, const Scalar press)
| Add contribution from direct, rectangular, level 1 neighbouring cell.
Accumulator & | addDiagonal (const Scalar weight, const Scalar press)
| Add contribution from diagonal, level 2 neighbouring cell.
Accumulator & | add (const Scalar weight, const Accumulator &other)
| Add contribution from other accumulator.
void | prepareAccumulation ()
| Zero out/clear WBP result buffer.
void | prepareContribution ()
| Zero out/clear WBP term buffer.
void | commitContribution (const Scalar innerWeight=-1.0)
| Accumulate current source term into result buffer whilst applying any user-prescribed term weighting.
LocalRunningAverages | getRunningAverages () const
| Get buffer of intermediate, local results.
void | assignRunningAverages (const LocalRunningAverages &avg)
| Assign coalesced/global contributions.
PAvgCalculatorResult< Scalar > | getFinalResult () const
| Calculate final WBP results from individual contributions.

## Detailed Description

template<class Scalar>
class Opm::PAvgCalculator< Scalar >::Accumulator

Accumulate weighted running averages of cell contributions to WBP.

## Member Typedef Documentation

## LocalRunningAverages

template<class Scalar>

using Opm::PAvgCalculator< Scalar >::Accumulator::LocalRunningAverages = std::array<Scalar, 8>

Collection of running averages and their associate weights.

Intended primarily as a means of exchanging intermediate results in a parallel run.

## Constructor & Destructor Documentation

## Accumulator() [1/2]

template<class Scalar>

Opm::PAvgCalculator< Scalar >::Accumulator::Accumulator | ( | const Accumulator & | rhs | ) |

Copy constructor.

Parameters

  [in] | rhs | Source object

## Accumulator() [2/2]

template<class Scalar>

Opm::PAvgCalculator< Scalar >::Accumulator::Accumulator | ( | Accumulator && | rhs | ) |

Move constructor.

Parameters

  [in,out] | rhs | Source object. Nullified on exit.

## Member Function Documentation

## add()

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::add | ( | const Scalar | weight,
|  | const Accumulator & | other )

Add contribution from other accumulator.

This typically incorporates a set of results from a single reservoir connection into a larger sum across all connections.

Parameters

  [in] | weight | Pressure weighting factor
  [in] | other | Contribution from other accumulation process.

Returns

## addCentre()

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::addCentre | ( | const Scalar | weight,
|  | const Scalar | press )

Add contribution from centre/connecting cell.

Parameters

  [in] | weight | Pressure weighting factor
  [in] | press | Pressure value

Returns

## addDiagonal()

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::addDiagonal | ( | const Scalar | weight,
|  | const Scalar | press )

Add contribution from diagonal, level 2 neighbouring cell.

Parameters

  [in] | weight | Pressure weighting factor
  [in] | press | Pressure value

Returns

## addRectangular()

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::addRectangular | ( | const Scalar | weight,
|  | const Scalar | press )

Add contribution from direct, rectangular, level 1 neighbouring cell.

Parameters

  [in] | weight | Pressure weighting factor
  [in] | press | Pressure value

Returns

## assignRunningAverages()

template<class Scalar>

void Opm::PAvgCalculator< Scalar >::Accumulator::assignRunningAverages | ( | const LocalRunningAverages & | avg | ) |

Assign coalesced/global contributions.

Parameters

  [in] | avg | Buffer of coalesced global contributions.

## commitContribution()

template<class Scalar>

void Opm::PAvgCalculator< Scalar >::Accumulator::commitContribution | ( | const Scalar | innerWeight = -1.0 | ) |

Accumulate current source term into result buffer whilst applying any user-prescribed term weighting.

Parameters

  [in] | innerWeight | Weighting factor for inner/connecting cell contributions. Outer cells weighted by 1-innerWeight where applicable. If inner weight factor is negative, no weighting is applied. Typically the F1 weighting factor from the WPAVE keyword. Default value (-1) mainly applicable to PV-weighted accumulations.

## getFinalResult()

template<class Scalar>

PAvgCalculatorResult< Scalar > Opm::PAvgCalculator< Scalar >::Accumulator::getFinalResult | ( |  | ) | const

Calculate final WBP results from individual contributions.

Returns
  New result object.

## operator=() [1/2]

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::operator= | ( | Accumulator && | rhs | ) |

Move assignment operator.

Parameters

  [in,out] | rhs | Source object. Nullified on exit.

## operator=() [2/2]

template<class Scalar>

PAvgCalculator< Scalar >::Accumulator & Opm::PAvgCalculator< Scalar >::Accumulator::operator= | ( | const Accumulator & | rhs | ) |

Assignment operator.

Parameters

  [in] | rhs | Source object

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

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