58 using CollectiveCommunication =
typename Grid::CollectiveCommunication;
59 using P2PCommunicatorType = Dune::Point2PointCommunicator<Dune::SimpleMessageBuffer>;
60 using IndexMapType = std::vector<int>;
61 using IndexMapStorageType = std::vector<IndexMapType>;
63 static constexpr int dimension = Grid::dimension;
67 static const bool needsReordering =
68 !std::is_same<Grid, EquilGrid>::value;
71 const EquilGrid* equilGrid,
72 const GridView& gridView,
75 const std::set<std::string>& fipRegionsInterregFlow = {});
78 void collect(
const data::Solution& localCellData,
79 const std::map<std::pair<std::string, int>,
double>& localBlockData,
80 const data::Wells& localWellData,
81 const data::WellBlockAveragePressures& localWBPData,
82 const data::GroupAndNetworkValues& localGroupAndNetworkData,
83 const data::Aquifers& localAquiferData,
84 const WellTestState& localWellTestState,
89 const std::map<std::pair<std::string, int>,
double>& globalBlockData()
const
90 {
return globalBlockData_; }
92 const data::Solution& globalCellData()
const
93 {
return globalCellData_; }
95 data::Solution& globalCellData()
96 {
return globalCellData_; }
98 const data::Wells& globalWellData()
const
99 {
return globalWellData_; }
101 const data::WellBlockAveragePressures& globalWBPData()
const
102 {
return this->globalWBPData_; }
104 const data::GroupAndNetworkValues& globalGroupAndNetworkData()
const
105 {
return globalGroupAndNetworkData_; }
107 const data::Aquifers& globalAquiferData()
const
108 {
return globalAquiferData_; }
110 const WellTestState& globalWellTestState()
const
111 {
return this->globalWellTestState_; }
114 {
return this->globalInterRegFlows_; }
117 {
return this->globalInterRegFlows_; }
119 const std::array<FlowsData<double>, 3>& globalFlowsn()
const
120 {
return globalFlowsn_; }
122 const std::array<FlowsData<double>, 3>& globalFloresn()
const
123 {
return globalFloresn_; }
125 bool isIORank()
const
126 {
return toIORankComm_.rank() == ioRank; }
128 bool isParallel()
const
129 {
return toIORankComm_.size() > 1; }
131 int localIdxToGlobalIdx(
unsigned localIdx)
const;
133 const std::vector<int>& localIdxToGlobalIdxMapping()
const
135 return localIdxToGlobalIdx_;
138 bool doesNeedReordering()
const
139 {
return needsReordering;}
141 std::size_t numCells ()
const
142 {
return globalCartesianIndex_.size(); }
144 const std::vector<int>& globalRanks()
const
145 {
return globalRanks_; }
147 bool isCartIdxOnThisRank(
int cartIdx)
const;
150 P2PCommunicatorType toIORankComm_;
152 IndexMapType globalCartesianIndex_;
153 IndexMapType localIndexMap_;
154 IndexMapStorageType indexMaps_;
155 std::vector<int> globalRanks_;
156 data::Solution globalCellData_;
157 std::map<std::pair<std::string, int>,
double> globalBlockData_;
158 data::Wells globalWellData_;
159 data::WellBlockAveragePressures globalWBPData_;
160 data::GroupAndNetworkValues globalGroupAndNetworkData_;
161 data::Aquifers globalAquiferData_;
162 WellTestState globalWellTestState_;
163 std::vector<int> localIdxToGlobalIdx_;
164 std::array<FlowsData<double>, 3> globalFlowsn_;
165 std::array<FlowsData<double>, 3> globalFloresn_;