58 using CollectiveCommunication =
typename Grid::Communication;
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,
79 const std::map<std::pair<std::string, int>,
double>&
localBlockData,
90 const std::map<std::pair<std::string, int>,
double>& globalBlockData()
const
91 {
return globalBlockData_; }
93 const data::Solution& globalCellData()
const
94 {
return globalCellData_; }
96 data::Solution& globalCellData()
97 {
return globalCellData_; }
99 const data::Wells& globalWellData()
const
100 {
return globalWellData_; }
102 const data::WellBlockAveragePressures& globalWBPData()
const
103 {
return this->globalWBPData_; }
105 const data::GroupAndNetworkValues& globalGroupAndNetworkData()
const
106 {
return globalGroupAndNetworkData_; }
108 const data::Aquifers& globalAquiferData()
const
109 {
return globalAquiferData_; }
112 {
return this->globalWellTestState_; }
115 {
return this->globalInterRegFlows_; }
118 {
return this->globalInterRegFlows_; }
120 const std::array<FlowsData<double>, 3>& globalFlowsn()
const
121 {
return globalFlowsn_; }
123 const std::array<FlowsData<double>, 3>& globalFloresn()
const
124 {
return globalFloresn_; }
126 bool isIORank()
const
127 {
return toIORankComm_.rank() == ioRank; }
129 bool isParallel()
const
130 {
return toIORankComm_.size() > 1; }
132 int localIdxToGlobalIdx(
unsigned localIdx)
const;
134 const std::vector<int>& localIdxToGlobalIdxMapping()
const
136 return localIdxToGlobalIdx_;
139 bool doesNeedReordering()
const
140 {
return needsReordering;}
142 std::size_t numCells ()
const
143 {
return globalCartesianIndex_.size(); }
145 const std::vector<int>& globalRanks()
const
146 {
return globalRanks_; }
148 bool isCartIdxOnThisRank(
int cartIdx)
const;
151 P2PCommunicatorType toIORankComm_;
153 IndexMapType globalCartesianIndex_;
154 IndexMapType localIndexMap_;
155 IndexMapStorageType indexMaps_;
156 std::vector<int> globalRanks_;
157 data::Solution globalCellData_;
158 std::map<std::pair<std::string, int>,
double> globalBlockData_;
159 data::Wells globalWellData_;
160 data::WellBlockAveragePressures globalWBPData_;
161 data::GroupAndNetworkValues globalGroupAndNetworkData_;
162 data::Aquifers globalAquiferData_;
164 std::vector<int> localIdxToGlobalIdx_;
165 std::array<FlowsData<double>, 3> globalFlowsn_;
166 std::array<FlowsData<double>, 3> globalFloresn_;