ReservoirCouplingSlaveReportStep.hpp
Go to the documentation of this file.
1/*
2 Copyright 2025 Equinor ASA
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_RESERVOIR_COUPLING_SLAVE_REPORT_STEP_HPP
21#define OPM_RESERVOIR_COUPLING_SLAVE_REPORT_STEP_HPP
22
24
25namespace Opm {
26
27// Avoid including the complete definition of ReservoirCouplingSlave here to avoid circular dependency.
28template <class Scalar> class ReservoirCouplingSlave;
29
48template <class Scalar>
50public:
54
59 );
60
63 const Parallel::Communication &comm() const { return this->slave_.getComm(); }
64
67 MPI_Comm getSlaveMasterComm() const { return this->slave_.getMasterComm(); }
68
71 ReservoirCoupling::Logger& logger() const { return this->slave_.getLogger(); }
72
83 void sendProductionDataToMaster(const std::vector<SlaveGroupProductionData> &production_data) const;
84
95 void sendInjectionDataToMaster(const std::vector<SlaveGroupInjectionData> &injection_data) const;
96
99 const std::string& slaveName() const { return this->slave_.getSlaveName(); }
100
101private:
118 template <class DataType>
119 void sendDataToMaster_(
120 const std::vector<DataType>& data,
121 MessageTag tag,
122 const std::string& data_type_name
123 ) const;
124
127};
128} // namespace Opm
129#endif // OPM_RESERVOIR_COUPLING_SLAVE_REPORT_STEP_HPP
Definition: ReservoirCoupling.hpp:36
Definition: ReservoirCouplingSlave.hpp:40
Manages slave-side reservoir coupling operations for a single report step.
Definition: ReservoirCouplingSlaveReportStep.hpp:49
MPI_Comm getSlaveMasterComm() const
Get the MPI communicator for slave-master communication.
Definition: ReservoirCouplingSlaveReportStep.hpp:67
const std::string & slaveName() const
Get the name of this slave process.
Definition: ReservoirCouplingSlaveReportStep.hpp:99
const Parallel::Communication & comm() const
Get the MPI communicator for intra-slave communication.
Definition: ReservoirCouplingSlaveReportStep.hpp:63
ReservoirCoupling::Logger & logger() const
Get the logger for reservoir coupling operations.
Definition: ReservoirCouplingSlaveReportStep.hpp:71
void sendProductionDataToMaster(const std::vector< SlaveGroupProductionData > &production_data) const
Send production data to the master process.
void sendInjectionDataToMaster(const std::vector< SlaveGroupInjectionData > &injection_data) const
Send injection data to the master process.
ReservoirCouplingSlaveReportStep(ReservoirCouplingSlave< Scalar > &slave)
Construct a report step manager for the slave process.
ReservoirCoupling::MessageTag MessageTag
Definition: ReservoirCouplingSlaveReportStep.hpp:51
Dune::Communication< MPIComm > Communication
Definition: ParallelCommunication.hpp:30
MessageTag
Definition: ReservoirCoupling.hpp:121
Definition: blackoilbioeffectsmodules.hh:43
Definition: ReservoirCoupling.hpp:198
Definition: ReservoirCoupling.hpp:184