Opm::GlobalPerfContainerFactory Class Reference

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

#include <ParallelWellInfo.hpp>

Public Types

using IndexSet = CommunicateAboveBelow::IndexSet
 
using Attribute = CommunicateAboveBelow::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< double > createGlobal (const std::vector< double > &local_perf_container, std::size_t num_components) const
 Creates a container that holds values for all perforations. More...
 
void copyGlobalToLocal (const std::vector< double > &global, std::vector< double > &local, std::size_t num_components) const
 Copies the values of the global perforation to the local representation. More...
 
int numGlobalPerfs () const
 

Detailed Description

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

◆ GlobalIndex

using Opm::GlobalPerfContainerFactory::GlobalIndex = typename IndexSet::IndexPair::GlobalIndex

◆ IndexSet

Constructor & Destructor Documentation

◆ GlobalPerfContainerFactory()

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

void Opm::GlobalPerfContainerFactory::copyGlobalToLocal ( const std::vector< double > &  global,
std::vector< double > &  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()

std::vector< double > Opm::GlobalPerfContainerFactory::createGlobal ( const std::vector< double > &  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()

int Opm::GlobalPerfContainerFactory::numGlobalPerfs ( ) const

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