Opm::GlobalPerfContainerFactory< Scalar > Class Template Reference

A factory for creating a global data representation for distributed wells. More...

#include <ParallelWellInfo.hpp>

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

Public Types

using IndexSet = typename CommunicateAboveBelow< Scalar >::IndexSet
 
using Attribute = typename CommunicateAboveBelow< Scalar >::Attribute
 
using GlobalIndex = typename IndexSet::IndexPair::GlobalIndex
 

Public Member Functions

 GlobalPerfContainerFactory (const IndexSet &local_indices, const Parallel::Communication comm, int num_local_perfs)
 Constructor. More...
 
std::vector< Scalar > createGlobal (const std::vector< Scalar > &local_perf_container, std::size_t num_components) const
 Creates a container that holds values for all perforations. More...
 
void copyGlobalToLocal (const std::vector< Scalar > &global, std::vector< Scalar > &local, std::size_t num_components) const
 Copies the values of the global perforation to the local representation. More...
 
int numGlobalPerfs () const
 

Detailed Description

template<class Scalar>
class Opm::GlobalPerfContainerFactory< Scalar >

A factory for creating a global data representation for distributed wells.

Unfortunately, there are occassion where we need to compute sequential on a well even if the data is distributed. This class is supposed to help with that by computing the global data arrays for the well and copy computed values back to the distributed representation.

Member Typedef Documentation

◆ Attribute

template<class Scalar >
using Opm::GlobalPerfContainerFactory< Scalar >::Attribute = typename CommunicateAboveBelow<Scalar>::Attribute

◆ GlobalIndex

template<class Scalar >
using Opm::GlobalPerfContainerFactory< Scalar >::GlobalIndex = typename IndexSet::IndexPair::GlobalIndex

◆ IndexSet

template<class Scalar >
using Opm::GlobalPerfContainerFactory< Scalar >::IndexSet = typename CommunicateAboveBelow<Scalar>::IndexSet

Constructor & Destructor Documentation

◆ GlobalPerfContainerFactory()

template<class Scalar >
Opm::GlobalPerfContainerFactory< Scalar >::GlobalPerfContainerFactory ( const IndexSet local_indices,
const Parallel::Communication  comm,
int  num_local_perfs 
)

Constructor.

Parameters
local_indicescompletely set up index set for map ecl index to local index

Member Function Documentation

◆ copyGlobalToLocal()

template<class Scalar >
void Opm::GlobalPerfContainerFactory< Scalar >::copyGlobalToLocal ( const std::vector< Scalar > &  global,
std::vector< Scalar > &  local,
std::size_t  num_components 
) const

Copies the values of the global perforation to the local representation.

Parameters
globalvalues attached to all peforations of a well (as if the well would live on one process)
num_componentsthe number of components per perforation.
[out]localThe values attached to the local perforations only.

◆ createGlobal()

template<class Scalar >
std::vector< Scalar > Opm::GlobalPerfContainerFactory< Scalar >::createGlobal ( const std::vector< Scalar > &  local_perf_container,
std::size_t  num_components 
) const

Creates a container that holds values for all perforations.

Parameters
local_perf_containerContainer with values attached to the local perforations.
num_componentsthe number of components per perforation.
Returns
A container with values attached to all perforations of a well. Values are ordered by the index of the perforation in the ECL schedule.

◆ numGlobalPerfs()

template<class Scalar >
int Opm::GlobalPerfContainerFactory< Scalar >::numGlobalPerfs ( ) const

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