Opm::RescoupConstraintsCalculator< Scalar, IndexTraits > Class Template Reference

Computes per-master-group production targets and per-rate-type limits for reservoir coupling, and sends them to the slaves. More...

#include <RescoupConstraintsCalculator.hpp>

Public Types

using InjectionGroupTarget = ReservoirCoupling::InjectionGroupTarget< Scalar >
 
using ProductionGroupConstraints = ReservoirCoupling::ProductionGroupConstraints< Scalar >
 

Public Member Functions

 RescoupConstraintsCalculator (GuideRateHandler< Scalar, IndexTraits > &guide_rate_handler, GroupStateHelper< Scalar, IndexTraits > &group_state_helper)
 Construct a calculator bound to the master's per-sync-step state. More...
 
void calculateMasterGroupConstraintsAndSendToSlaves ()
 Run the full master-side target distribution and dispatch the resulting constraints to each activated slave. More...
 

Detailed Description

template<class Scalar, class IndexTraits>
class Opm::RescoupConstraintsCalculator< Scalar, IndexTraits >

Computes per-master-group production targets and per-rate-type limits for reservoir coupling, and sends them to the slaves.

Constructed once per sync step on the master process, drives the full target-distribution flow when its single public entry point calculateMasterGroupConstraintsAndSendToSlaves() is called. The flow is structured as a pre-phase (control restore + inactive-slave handling + GCW/reduction recompute) followed by three phases: target computation (Phase 1), cap-and-redistribute (Phase 2), and slave send (Phase 3). See the function-level comment on calculateMasterGroupConstraintsAndSendToSlaves() in the corresponding .cpp file for the per-phase narrative.

Template Parameters
ScalarFloating-point type used for rates and targets.
IndexTraitsPhase-index traits.

Member Typedef Documentation

◆ InjectionGroupTarget

template<class Scalar , class IndexTraits >
using Opm::RescoupConstraintsCalculator< Scalar, IndexTraits >::InjectionGroupTarget = ReservoirCoupling::InjectionGroupTarget<Scalar>

◆ ProductionGroupConstraints

template<class Scalar , class IndexTraits >
using Opm::RescoupConstraintsCalculator< Scalar, IndexTraits >::ProductionGroupConstraints = ReservoirCoupling::ProductionGroupConstraints<Scalar>

Constructor & Destructor Documentation

◆ RescoupConstraintsCalculator()

template<class Scalar , class IndexTraits >
Opm::RescoupConstraintsCalculator< Scalar, IndexTraits >::RescoupConstraintsCalculator ( GuideRateHandler< Scalar, IndexTraits > &  guide_rate_handler,
GroupStateHelper< Scalar, IndexTraits > &  group_state_helper 
)

Construct a calculator bound to the master's per-sync-step state.

Parameters
guide_rate_handlerSource of guide rates and the deferred logger used during the constraint calculation.
group_state_helperProvides access to the group state, the schedule, the well state, and the reservoir-coupling master facade. All intermediate state changes (control modes, GCW, target reductions) are written through this helper.

Member Function Documentation

◆ calculateMasterGroupConstraintsAndSendToSlaves()

template<class Scalar , class IndexTraits >
void Opm::RescoupConstraintsCalculator< Scalar, IndexTraits >::calculateMasterGroupConstraintsAndSendToSlaves ( )

Run the full master-side target distribution and dispatch the resulting constraints to each activated slave.

Runs on every rank of the master communicator; the slave-facing MPI sends are rank-0-only inside the underlying helpers. The driver writes group-state side effects (cmodes, GCW, reductions) and finishes with a GroupState::communicate_rates(comm) call so the post-redistribution state is consistent across master ranks. See the function-level comment on the implementation in the corresponding .cpp file for the per-phase walkthrough and the collective-call invariants.


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