|
opm-simulators
|
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... | |
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.
| Scalar | Floating-point type used for rates and targets. |
| IndexTraits | Phase-index traits. |
| 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.
| guide_rate_handler | Source of guide rates and the deferred logger used during the constraint calculation. |
| group_state_helper | Provides 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. |
| 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.