Opm::CommunicateAboveBelow Class 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 >
 
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< double > communicateAbove (double first_value, const double *current, std::size_t size)
 Creates an array of values for the perforation above. More...
 
std::vector< double > communicateBelow (double first_value, const double *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

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

Member Typedef Documentation

◆ IndexSet

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

◆ LocalIndex

using Opm::CommunicateAboveBelow::LocalIndex = Dune::ParallelLocalIndex<Attribute>

◆ RI

using Opm::CommunicateAboveBelow::RI = Dune::RemoteIndices<IndexSet>

Member Enumeration Documentation

◆ Attribute

Enumerator
owner 
overlap 
ownerAbove 
overlapAbove 

Constructor & Destructor Documentation

◆ CommunicateAboveBelow()

Opm::CommunicateAboveBelow::CommunicateAboveBelow ( const Parallel::Communication comm)
explicit

Member Function Documentation

◆ beginReset()

void Opm::CommunicateAboveBelow::beginReset ( )

Indicates that we will add the index information.

See also
pushBackEclIndex

◆ clear()

void Opm::CommunicateAboveBelow::clear ( )

Clear all the parallel information.

◆ communicateAbove()

std::vector< double > Opm::CommunicateAboveBelow::communicateAbove ( double  first_value,
const double *  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()

std::vector< double > Opm::CommunicateAboveBelow::communicateBelow ( double  first_value,
const double *  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()

int Opm::CommunicateAboveBelow::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()

const IndexSet & Opm::CommunicateAboveBelow::getIndexSet ( ) const

Get index set for the local perforations.

◆ numLocalPerfs()

int Opm::CommunicateAboveBelow::numLocalPerfs ( ) const

◆ partialSumPerfValues()

template<class RAIterator >
void Opm::CommunicateAboveBelow::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()

void Opm::CommunicateAboveBelow::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: