Opm::ReservoirCouplingSlaveReportStep< Scalar > Class Template Reference

Manages slave-side reservoir coupling operations for a single report step. More...

#include <ReservoirCouplingSlaveReportStep.hpp>

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

Public Types

using MessageTag = ReservoirCoupling::MessageTag
 
using SlaveGroupProductionData = ReservoirCoupling::SlaveGroupProductionData< Scalar >
 
using SlaveGroupInjectionData = ReservoirCoupling::SlaveGroupInjectionData< Scalar >
 

Public Member Functions

 ReservoirCouplingSlaveReportStep (ReservoirCouplingSlave< Scalar > &slave)
 Construct a report step manager for the slave process. More...
 
const Parallel::Communicationcomm () const
 Get the MPI communicator for intra-slave communication. More...
 
MPI_Comm getSlaveMasterComm () const
 Get the MPI communicator for slave-master communication. More...
 
ReservoirCoupling::Loggerlogger () const
 Get the logger for reservoir coupling operations. More...
 
void sendProductionDataToMaster (const std::vector< SlaveGroupProductionData > &production_data) const
 Send production data to the master process. More...
 
void sendInjectionDataToMaster (const std::vector< SlaveGroupInjectionData > &injection_data) const
 Send injection data to the master process. More...
 
const std::string & slaveName () const
 Get the name of this slave process. More...
 

Detailed Description

template<class Scalar>
class Opm::ReservoirCouplingSlaveReportStep< Scalar >

Manages slave-side reservoir coupling operations for a single report step.

This class encapsulates the slave process's communication with the master process during a single report step in reservoir coupling simulations. It handles:

  • Sending production data (rates, potentials) to the master process via MPI
  • Sending injection data (rates) to the master process via MPI
  • Coordinating data exchange between slave and master processes

The class serves as a helper to ReservoirCouplingSlave, separating the report-step-specific communication logic from the overall coupling lifecycle management. This separation improves code organization and makes the coupling logic easier to understand and maintain.

Template Parameters
ScalarFloating-point type for rate and potential values (typically double or float)
Note
This class holds a reference to the parent ReservoirCouplingSlave object and should only be used within the scope of that object's lifetime
See also
ReservoirCouplingSlave

Member Typedef Documentation

◆ MessageTag

template<class Scalar >
using Opm::ReservoirCouplingSlaveReportStep< Scalar >::MessageTag = ReservoirCoupling::MessageTag

◆ SlaveGroupInjectionData

template<class Scalar >
using Opm::ReservoirCouplingSlaveReportStep< Scalar >::SlaveGroupInjectionData = ReservoirCoupling::SlaveGroupInjectionData<Scalar>

◆ SlaveGroupProductionData

template<class Scalar >
using Opm::ReservoirCouplingSlaveReportStep< Scalar >::SlaveGroupProductionData = ReservoirCoupling::SlaveGroupProductionData<Scalar>

Constructor & Destructor Documentation

◆ ReservoirCouplingSlaveReportStep()

template<class Scalar >
Opm::ReservoirCouplingSlaveReportStep< Scalar >::ReservoirCouplingSlaveReportStep ( ReservoirCouplingSlave< Scalar > &  slave)

Construct a report step manager for the slave process.

Parameters
slaveReference to the parent ReservoirCouplingSlave object

Member Function Documentation

◆ comm()

template<class Scalar >
const Parallel::Communication & Opm::ReservoirCouplingSlaveReportStep< Scalar >::comm ( ) const
inline

Get the MPI communicator for intra-slave communication.

Returns
Reference to the parallel communication object

◆ getSlaveMasterComm()

template<class Scalar >
MPI_Comm Opm::ReservoirCouplingSlaveReportStep< Scalar >::getSlaveMasterComm ( ) const
inline

Get the MPI communicator for slave-master communication.

Returns
MPI communicator handle for communication with the master process

◆ logger()

template<class Scalar >
ReservoirCoupling::Logger & Opm::ReservoirCouplingSlaveReportStep< Scalar >::logger ( ) const
inline

Get the logger for reservoir coupling operations.

Returns
Reference to the logger object for this coupling session

◆ sendInjectionDataToMaster()

template<class Scalar >
void Opm::ReservoirCouplingSlaveReportStep< Scalar >::sendInjectionDataToMaster ( const std::vector< SlaveGroupInjectionData > &  injection_data) const

Send injection data to the master process.

This method sends injection rates and related data for all slave groups to the master process via MPI communication. The data is used by the master for group control calculations and coordination.

Parameters
injection_dataVector of injection data for each slave group
Note
This is a blocking operation that waits for the master to receive the data
Must be called before the master attempts to receive injection data

◆ sendProductionDataToMaster()

template<class Scalar >
void Opm::ReservoirCouplingSlaveReportStep< Scalar >::sendProductionDataToMaster ( const std::vector< SlaveGroupProductionData > &  production_data) const

Send production data to the master process.

This method sends production rates, potentials, and related data for all slave groups to the master process via MPI communication. The data is used by the master for group control calculations and coordination.

Parameters
production_dataVector of production data for each slave group
Note
This is a blocking operation that waits for the master to receive the data
Must be called before the master attempts to receive production data

◆ slaveName()

template<class Scalar >
const std::string & Opm::ReservoirCouplingSlaveReportStep< Scalar >::slaveName ( ) const
inline

Get the name of this slave process.

Returns
Reference to the name string for this slave

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