Opm::CommunicateAboveBelow< Scalar > Class Template Reference

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

#include <ParallelWellInfo.hpp>

Inheritance diagram for Opm::CommunicateAboveBelow< Scalar >:
Inheritance graph

Public Types

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

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. More...
 
void clear ()
 Clear all the parallel information. More...
 
void beginReset ()
 Indicates that we will add the index information. More...
 
int endReset ()
 Indicates that the index information is complete. More...
 
std::vector< Scalar > communicateAbove (Scalar first_value, const Scalar *current, std::size_t size)
 Creates an array of values for the perforation above. More...
 
std::vector< Scalar > communicateBelow (Scalar first_value, const Scalar *current, std::size_t size)
 Creates an array of values for the perforation below. More...
 
template<class RAIterator >
void partialSumPerfValues (RAIterator begin, RAIterator end) const
 Do a (in place) partial sum on values attached to all perforations. More...
 
const IndexSetgetIndexSet () const
 Get index set for the local perforations. More...
 
int numLocalPerfs () const
 

Detailed Description

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

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

Member Typedef Documentation

◆ IndexSet

template<class Scalar >
using Opm::CommunicateAboveBelow< Scalar >::IndexSet = Dune::ParallelIndexSet<int,LocalIndex,50>

◆ LocalIndex

template<class Scalar >
using Opm::CommunicateAboveBelow< Scalar >::LocalIndex = Dune::ParallelLocalIndex<Attribute>

◆ RI

template<class Scalar >
using Opm::CommunicateAboveBelow< Scalar >::RI = Dune::RemoteIndices<IndexSet>

Member Enumeration Documentation

◆ Attribute

template<class Scalar >
enum Opm::CommunicateAboveBelow::Attribute
Enumerator
owner 
overlap 
ownerAbove 
overlapAbove 

Constructor & Destructor Documentation

◆ CommunicateAboveBelow()

template<class Scalar >
Opm::CommunicateAboveBelow< Scalar >::CommunicateAboveBelow ( const Parallel::Communication comm)
explicit

Member Function Documentation

◆ beginReset()

template<class Scalar >
void Opm::CommunicateAboveBelow< Scalar >::beginReset ( )

Indicates that we will add the index information.

See also
pushBackEclIndex

◆ clear()

template<class Scalar >
void Opm::CommunicateAboveBelow< Scalar >::clear ( )

Clear all the parallel information.

◆ 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_valueValue to use for above of the first perforation
currentC-array of the values at the perforations
sizeThe 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_valueValue to use for above of the first perforation
currentC-array of the values at the perforations
sizeThe 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

◆ getIndexSet()

template<class Scalar >
const IndexSet & Opm::CommunicateAboveBelow< Scalar >::getIndexSet ( ) const

Get index set for the local perforations.

◆ numLocalPerfs()

template<class Scalar >
int Opm::CommunicateAboveBelow< Scalar >::numLocalPerfs ( ) const

◆ 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
beginThe start of the range
ebdThe end of the range
Template Parameters
RAIteratorThe 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
aboveThe ECL index of the next open perforation above.
currentThe ECL index of the current open perforation.

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