Opm::ParallelRegionsetVariableDescriptor Class Reference

#include <ParallelRegionsetVariableDescriptor.hpp>

Inheritance diagram for Opm::ParallelRegionsetVariableDescriptor:
Inheritance graph

Public Member Functions

 ParallelRegionsetVariableDescriptor ()=delete
 Deleted default constructor. More...
 
 ParallelRegionsetVariableDescriptor (const Parallel::Communication &comm)
 
virtual ~ParallelRegionsetVariableDescriptor ()=default
 Destructor. More...
 
 ParallelRegionsetVariableDescriptor (const ParallelRegionsetVariableDescriptor &)=default
 Copy constructor. More...
 
 ParallelRegionsetVariableDescriptor (ParallelRegionsetVariableDescriptor &&)=default
 Move constructor. More...
 
ParallelRegionsetVariableDescriptoroperator= (const ParallelRegionsetVariableDescriptor &)=default
 Assignment operator. More...
 
ParallelRegionsetVariableDescriptoroperator= (ParallelRegionsetVariableDescriptor &&)=default
 Move-assignment operator. More...
 
std::unique_ptr< data::RegionsetVariableDescriptor > clone () const override
 

Protected Member Functions

void communicateGlobalRegsetMaxIDs () override
 

Detailed Description

Basic information about a collection of region sets.

In particular, this class tracks the maximum region ID for each region set registered in the collection. Common region sets in this context include the built-in FIPNUM set as well as user defined region sets named FIP*, such as FIPABC or FIP_UZ. There is nevertheless nothing that will prevent including a different region set such as PVTNUM or KRNUMX in this collection.

The primary use case for this class is assisting in allocating region level summary vectors over region sets. That allocation requires knowing the maximum expected region ID for each pertinent region set.

Constructing a descriptor object is a multi-step process.

  1. Create the object through the default constructor
  2. Call member function prepareDescriptorSet() to set the stage for adding new region sets.
  3. Incorporate one or more region sets through the addRegionSet() overload set.
  4. Call member function finaliseDescriptorSet() to analyse the data and set up internal data structures.

Once member function finaliseDescriptorSet() has been called, the object should be treated as read-only and only its const member functions should be invoked by client code. Calling member function prepareDescriptorSet() after finaliseDescriptorSet() is allowed, but doing so will discard all information collected until that point and will require re-registering all pertinent region sets.

This is the parallel implementation of the descriptor class. It is intended to be used in conjunction with the parallel region variable values class, and synchronises the maximum region IDs between MPI ranks.

Constructor & Destructor Documentation

◆ ParallelRegionsetVariableDescriptor() [1/4]

Opm::ParallelRegionsetVariableDescriptor::ParallelRegionsetVariableDescriptor ( )
delete

Deleted default constructor.

◆ ParallelRegionsetVariableDescriptor() [2/4]

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

Constructor with MPI communication object.

Parameters
[in]commMPI communication object. Copied into the descriptor; the underlying communicator must remain valid for the descriptor's lifetime.

◆ ~ParallelRegionsetVariableDescriptor()

virtual Opm::ParallelRegionsetVariableDescriptor::~ParallelRegionsetVariableDescriptor ( )
virtualdefault

Destructor.

◆ ParallelRegionsetVariableDescriptor() [3/4]

Opm::ParallelRegionsetVariableDescriptor::ParallelRegionsetVariableDescriptor ( const ParallelRegionsetVariableDescriptor )
default

Copy constructor.

◆ ParallelRegionsetVariableDescriptor() [4/4]

Opm::ParallelRegionsetVariableDescriptor::ParallelRegionsetVariableDescriptor ( ParallelRegionsetVariableDescriptor &&  )
default

Move constructor.

Member Function Documentation

◆ clone()

std::unique_ptr< data::RegionsetVariableDescriptor > Opm::ParallelRegionsetVariableDescriptor::clone ( ) const
override

Create a deep copy of this object.

Intended for when an object holds a pointer to a base class and needs to make a copy of the derived class object.

Returns
A deep copy of this object.

◆ communicateGlobalRegsetMaxIDs()

void Opm::ParallelRegionsetVariableDescriptor::communicateGlobalRegsetMaxIDs ( )
overrideprotected

Exchange maximum region set IDs if needed.

Parallel implementation that exchanges maximum region IDs across all ranks.

◆ operator=() [1/2]

ParallelRegionsetVariableDescriptor & Opm::ParallelRegionsetVariableDescriptor::operator= ( const ParallelRegionsetVariableDescriptor )
default

Assignment operator.

◆ operator=() [2/2]

ParallelRegionsetVariableDescriptor & Opm::ParallelRegionsetVariableDescriptor::operator= ( ParallelRegionsetVariableDescriptor &&  )
default

Move-assignment operator.


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