Class encapsulating some information about parallel wells.
More...
#include <ParallelWellInfo.hpp>
|
| ParallelWellInfo (const std::string &name={""}, bool hasLocalCells=true) |
| Constructs object using MPI_COMM_SELF. More...
|
|
| ParallelWellInfo (const std::pair< std::string, bool > &well_info, Parallel::Communication allComm) |
| Constructs object with communication between all rank sharing a well. More...
|
|
const Parallel::Communication & | communication () const |
|
void | communicateFirstPerforation (bool hasFirst) |
| Collectively decide which rank has first perforation. More...
|
|
template<class T > |
T | broadcastFirstPerforationValue (const T &t) const |
|
std::vector< double > | communicateAboveValues (double first_value, const double *current, std::size_t size) const |
| Creates an array of values for the perforation above. More...
|
|
std::vector< double > | communicateAboveValues (double first_value, const std::vector< double > ¤t) const |
| Creates an array of values for the perforation above. More...
|
|
std::vector< double > | communicateBelowValues (double last_value, const double *current, std::size_t size) const |
| Creates an array of values for the perforation below. More...
|
|
std::vector< double > | communicateBelowValues (double last_value, const std::vector< double > ¤t) const |
| Creates an array of values for the perforation above. More...
|
|
void | pushBackEclIndex (int above, int current) |
| Adds information about the ecl indices of the perforations. More...
|
|
const std::string & | name () const |
| Name of the well. More...
|
|
bool | hasLocalCells () const |
| Whether local cells are perforated somewhen. More...
|
|
bool | isOwner () const |
|
void | beginReset () |
| Inidicate that we will reset the ecl index information. More...
|
|
void | endReset () |
| Inidicate completion of reset of the ecl index information. More...
|
|
template<typename It > |
It::value_type | sumPerfValues (It begin, It end) const |
| Sum all the values of the perforations. More...
|
|
template<class RAIterator > |
void | partialSumPerfValues (RAIterator begin, RAIterator end) const |
| Do a (in place) partial sum on values attached to all perforations. More...
|
|
void | clear () |
| Free data of communication data structures. More...
|
|
const GlobalPerfContainerFactory & | getGlobalPerfContainerFactory () const |
| Get a factor to create a global representation of peforation data. More...
|
|
Class encapsulating some information about parallel wells.
e.g. It provides a communicator for well information
◆ ParallelWellInfo() [1/2]
Opm::ParallelWellInfo::ParallelWellInfo |
( |
const std::string & |
name = {""} , |
|
|
bool |
hasLocalCells = true |
|
) |
| |
Constructs object using MPI_COMM_SELF.
◆ ParallelWellInfo() [2/2]
Opm::ParallelWellInfo::ParallelWellInfo |
( |
const std::pair< std::string, bool > & |
well_info, |
|
|
Parallel::Communication |
allComm |
|
) |
| |
Constructs object with communication between all rank sharing a well.
- Parameters
-
well_info | Pair of well name and whether local cells might be perforated on this rank |
allComm | The communication object with all MPI ranks active in the simulation. Default is the one with all ranks available. |
◆ beginReset()
void Opm::ParallelWellInfo::beginReset |
( |
| ) |
|
Inidicate that we will reset the ecl index information.
- See also
- pushBackEclIndex;
◆ broadcastFirstPerforationValue()
template<class T >
T Opm::ParallelWellInfo::broadcastFirstPerforationValue |
( |
const T & |
t | ) |
const |
If the well does not have any open connections the member rankWithFirstPerf is not initialized, and no broadcast is performed. In this case the argument is returned unmodified.
◆ clear()
void Opm::ParallelWellInfo::clear |
( |
| ) |
|
Free data of communication data structures.
◆ communicateAboveValues() [1/2]
std::vector< double > Opm::ParallelWellInfo::communicateAboveValues |
( |
double |
first_value, |
|
|
const double * |
current, |
|
|
std::size_t |
size |
|
) |
| const |
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.
◆ communicateAboveValues() [2/2]
std::vector< double > Opm::ParallelWellInfo::communicateAboveValues |
( |
double |
first_value, |
|
|
const std::vector< double > & |
current |
|
) |
| const |
Creates an array of values for the perforation above.
- Parameters
-
first_value | Value to use for above of the first perforation |
current | vector of current values |
◆ communicateBelowValues() [1/2]
std::vector< double > Opm::ParallelWellInfo::communicateBelowValues |
( |
double |
last_value, |
|
|
const double * |
current, |
|
|
std::size_t |
size |
|
) |
| const |
Creates an array of values for the perforation below.
- Parameters
-
last_value | Value to use for below of the last 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.
◆ communicateBelowValues() [2/2]
std::vector< double > Opm::ParallelWellInfo::communicateBelowValues |
( |
double |
last_value, |
|
|
const std::vector< double > & |
current |
|
) |
| const |
Creates an array of values for the perforation above.
- Parameters
-
last_value | Value to use for below of the last perforation |
current | vector of current values |
◆ communicateFirstPerforation()
void Opm::ParallelWellInfo::communicateFirstPerforation |
( |
bool |
hasFirst | ) |
|
Collectively decide which rank has first perforation.
◆ communication()
◆ endReset()
void Opm::ParallelWellInfo::endReset |
( |
| ) |
|
Inidicate completion of reset of the ecl index information.
◆ getGlobalPerfContainerFactory()
Get a factor to create a global representation of peforation data.
That is a container that holds data for every perforation no matter where it is stored. Container is ordered via ascendings index of the perforations in the ECL schedule.
◆ hasLocalCells()
bool Opm::ParallelWellInfo::hasLocalCells |
( |
| ) |
const |
|
inline |
Whether local cells are perforated somewhen.
◆ isOwner()
bool Opm::ParallelWellInfo::isOwner |
( |
| ) |
const |
|
inline |
◆ name()
const std::string & Opm::ParallelWellInfo::name |
( |
| ) |
const |
|
inline |
◆ partialSumPerfValues()
template<class RAIterator >
void Opm::ParallelWellInfo::partialSumPerfValues |
( |
RAIterator |
begin, |
|
|
RAIterator |
end |
|
) |
| const |
|
inline |
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 |
ebd | The end of the range |
- Template Parameters
-
RAIterator | The type og random access iterator |
◆ pushBackEclIndex()
void Opm::ParallelWellInfo::pushBackEclIndex |
( |
int |
above, |
|
|
int |
current |
|
) |
| |
Adds information about the ecl indices of the perforations.
- 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. |
◆ sumPerfValues()
template<typename It >
It::value_type Opm::ParallelWellInfo::sumPerfValues |
( |
It |
begin, |
|
|
It |
end |
|
) |
| const |
Sum all the values of the perforations.
◆ INVALID_ECL_INDEX
constexpr int Opm::ParallelWellInfo::INVALID_ECL_INDEX = -1 |
|
staticconstexpr |
The documentation for this class was generated from the following file: