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

Class to facilitate getting values associated with the above/below perforation. More...

`#include <ParallelWellInfo.hpp>`

## Public Types

enum | Attribute { owner =1 , overlap =2 , ownerAbove = 3 , overlapAbove = 4 }
using | LocalIndex = Dune::ParallelLocalIndex<Attribute>
using | IndexSet = Dune::ParallelIndexSet<int,LocalIndex,50>

## Public Member Functions

| CommunicateAboveBelow (const Parallel::Communication &comm)
void | pushBackEclIndex (int above, int current, bool owner=true)
| Adds information about original index of the perforations in ECL Schedule.
void | clear ()
| Clear all the parallel information.
void | beginReset ()
| Indicates that we will add the index information.
int | endReset ()
| Indicates that the index information is complete.
std::vector< Scalar > | communicateAbove (Scalar first_value, const Scalar *current, std::size_t size)
| Creates an array of values for the perforation above.
std::vector< Scalar > | communicateBelow (Scalar first_value, const Scalar *current, std::size_t size)
| Creates an array of values for the perforation below.
template<class RAIterator>
void | partialSumPerfValues (RAIterator begin, RAIterator end) const
| Do a (in place) partial sum on values attached to all perforations.
const IndexSet & | getIndexSet () const
| Get index set for the local perforations.
int | numLocalPerfs () const

## Detailed Description

template<class Scalar>
class Opm::CommunicateAboveBelow< Scalar >

Class to facilitate getting values associated with the above/below perforation.

## Member Function Documentation

## beginReset()

template<class Scalar>

void Opm::CommunicateAboveBelow< Scalar >::beginReset | ( |  | ) |

Indicates that we will add the index information.

See also
  pushBackEclIndex

## communicateAbove()

template<class Scalar>

std::vector< Scalar > Opm::CommunicateAboveBelow< Scalar >::communicateAbove | ( | Scalar | first_value,
|  | const Scalar * | current,
|  | std::size_t | size )

Creates an array of values for the perforation above.

Parameters

  first_value | Value to use for above of the first perforation
  current | C-array of the values at the perforations
  size | The size of the C-array and the returned vector

Returns
  a vector containing the values for the perforation above.

## communicateBelow()

template<class Scalar>

std::vector< Scalar > Opm::CommunicateAboveBelow< Scalar >::communicateBelow | ( | Scalar | first_value,
|  | const Scalar * | current,
|  | std::size_t | size )

Creates an array of values for the perforation below.

Parameters

  first_value | Value to use for above of the first perforation
  current | C-array of the values at the perforations
  size | The size of the C-array and the returned vector

Returns
  a vector containing the values for the perforation above.

## endReset()

template<class Scalar>

int Opm::CommunicateAboveBelow< Scalar >::endReset | ( |  | ) |

Indicates that the index information is complete.

Sets up the commmunication structures to be used by communicate()

Returns
  The number of local perforations

## partialSumPerfValues()

template<class Scalar>
template<class RAIterator>

void Opm::CommunicateAboveBelow< Scalar >::partialSumPerfValues | ( | RAIterator | begin,
|  | RAIterator | end ) const

Do a (in place) partial sum on values attached to all perforations.

For distributed wells this may include perforations stored elsewhere. The result is stored in ther range given as the parameters

Parameters

  begin | The start of the range
  end | The end of the range

Template Parameters

  RAIterator | The type og random access iterator

## pushBackEclIndex()

template<class Scalar>

void Opm::CommunicateAboveBelow< Scalar >::pushBackEclIndex | ( | int | above,
|  | int | current,
|  | bool | owner = true )

Adds information about original index of the perforations in ECL Schedule.

Warning
  Theses indices need to be push in the same order as they appear in the ECL well specifiation. Use -1 if there is no perforation above.

Parameters

  above | The ECL index of the next open perforation above.
  current | The ECL index of the current open perforation.
  owner | True if process is owner

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

- opm/simulators/wells/ParallelWellInfo.hpp
- opm/simulators/wells/ParallelWellInfo.cpp