Loading...
Searching...
No Matches
Opm::GlobalPerfContainerFactory< Scalar > Class Template Reference

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

`#include <ParallelWellInfo.hpp>`

## 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.
std::vector< Scalar > | createGlobal (const std::vector< Scalar > &local_perf_container, std::size_t num_quantities) const
| Creates a container that holds values for all perforations.
void | copyGlobalToLocal (const std::vector< Scalar > &global, std::vector< Scalar > &local, std::size_t num_quantities) const
| Copies the values of the global perforation to the local representation.
int | numGlobalPerfs () const
int | globalToLocal (const int globalIndex) const
int | localToGlobal (std::size_t localIndex) 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.

## 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_indices | completely set up index set for map ecl index to local index
  comm | Parallle communicator
  num_local_perfs | Number of local perforations

## 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_quantities ) const

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

Parameters

  | global | values attached to all peforations of a well (as if the well would live on one process)
  | num_quantities | the number of quantities per perforation.
  [out] | local | The 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_quantities ) const

Creates a container that holds values for all perforations.

Parameters

  local_perf_container | Container with values attached to the local perforations.
  num_quantities | the number of quantities 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.

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

- opm/simulators/wells/ParallelWellInfo.hpp
- opm/simulators/wells/ParallelWellInfo.cpp