24#ifndef OPM_COLLECT_DATA_ON_IO_RANK_IMPL_HPP
25#define OPM_COLLECT_DATA_ON_IO_RANK_IMPL_HPP
29#include <dune/common/version.hh>
30#include <dune/grid/common/gridenums.hh>
31#include <dune/grid/common/mcmgmapper.hh>
32#include <dune/grid/common/partitionset.hh>
34#include <opm/grid/common/CartesianIndexMapper.hpp>
43 std::vector<std::string> toVector(
const std::set<std::string>& string_set)
45 return { string_set.begin(), string_set.end() };
65 { isInterior_ =
false; }
68 { globalId_ = globalId; }
73 {
return localIndex_; }
77 {
return isInterior_; }
96 const std::vector<int>& distributedGlobalIndex,
99 std::vector<int>& ranks,
109 std::size_t size = globalIndex.size();
112 for (std::size_t index = 0; index < size; ++index)
122 indexMap.resize(localSize);
123 for (std::size_t i = 0; i < localSize; ++i)
138 auto rankIt =
recv_.begin();
143 if (rankIt !=
recv_.end())
146 for (
auto&& entry: indexMap)
150 entry = candidate->second;
154 if (rankIt !=
recv_.end())
158 for (
const auto& rank:
ranks_)
168 throw std::logic_error(
"link in method pack is not 0 as execpted");
174 for (
int index = 0; index < size; ++index) {
176 buffer.write(globalIdx);
188 buffer.read(numCells);
189 indexMap.resize(numCells);
190 for (
int index = 0; index < numCells; ++index) {
191 buffer.read(indexMap[index]);
198template<
class EquilMapper,
class Mapper>
203 : sendMapper_(sendMapper), recvMapper_(recvMapper), elementIndices_(elementIndices)
216 template<
class B,
class T>
219 buffer.write(sendMapper_.index(t));
221 template<
class B,
class T>
222 void scatter(B& buffer,
const T& t, std::size_t)
224 buffer.read(elementIndices_[recvMapper_.index(t)]);
229 return dim==3 && codim==0;
232 const EquilMapper& sendMapper_;
233 const Mapper& recvMapper_;
234 std::vector<int>& elementIndices_;
238template<
class Mapper>
243 : mapper_(mapper), elementIndices_(elementIndices)
256 template<
class B,
class T>
259 buffer.write(elementIndices_[mapper_.index(t)]);
261 template<
class B,
class T>
262 void scatter(B& buffer,
const T& t, std::size_t)
264 buffer.read(elementIndices_[mapper_.index(t)]);
269 return dim==3 && codim==0;
272 const Mapper& mapper_;
273 std::vector<int>& elementIndices_;
278 const data::Solution& localCellData_;
279 data::Solution& globalCellData_;
286 data::Solution& globalCellData,
289 std::size_t globalSize,
291 : localCellData_(localCellData)
292 , globalCellData_(globalCellData)
293 , localIndexMap_(localIndexMap)
294 , indexMaps_(indexMaps)
298 for (
const auto& pair : localCellData_) {
299 const std::string& key = pair.first;
300 std::size_t containerSize = globalSize;
301 [[maybe_unused]]
auto ret = globalCellData_.insert(key, pair.second.dim,
302 std::vector<double>(containerSize),
320 throw std::logic_error(
"link in method pack is not 0 as expected");
323 for (
const auto& pair : localCellData_) {
324 const auto& data = pair.second.data<
double>();
327 write(buffer, localIndexMap_, data);
335 for (
auto& pair : localCellData_) {
336 const std::string& key = pair.first;
337 auto& data = globalCellData_.data<
double>(key);
340 read(buffer, indexMap, data);
346 {
doUnpack(indexMaps_[link], buffer); }
349 template <
class Vector>
352 const Vector& vector,
353 unsigned int offset = 0,
354 unsigned int stride = 1)
const
356 unsigned int size = localIndexMap.size();
358 assert(vector.size() >= stride * size);
359 for (
unsigned int i=0; i<size; ++i)
361 unsigned int index = localIndexMap[i] * stride + offset;
362 assert(index < vector.size());
363 buffer.write(vector[index]);
367 template <
class Vector>
371 unsigned int offset = 0,
372 unsigned int stride = 1)
const
374 unsigned int size = 0;
376 assert(size == indexMap.size());
377 for (
unsigned int i=0; i<size; ++i) {
378 unsigned int index = indexMap[i] * stride + offset;
379 assert(index < vector.size());
380 buffer.read(vector[index]);
387 const data::Wells& localWellData_;
388 data::Wells& globalWellData_;
392 data::Wells& globalWellData,
394 : localWellData_(localWellData)
395 , globalWellData_(globalWellData)
403 unpack(dummyLink, buffer);
412 throw std::logic_error(
"link in method pack is not 0 as expected");
414 localWellData_.write(buffer);
419 { globalWellData_.read(buffer); }
425 const data::GroupAndNetworkValues& localGroupAndNetworkData_;
426 data::GroupAndNetworkValues& globalGroupAndNetworkData_;
430 data::GroupAndNetworkValues& globalGroupAndNetworkData,
432 : localGroupAndNetworkData_ (localGroupAndNetworkData)
433 , globalGroupAndNetworkData_(globalGroupAndNetworkData)
435 if (! isIORank) {
return; }
438 this->
pack(0, buffer);
441 const int dummyLink = -1;
442 this->
unpack(dummyLink, buffer);
450 throw std::logic_error {
451 "link in method pack is not 0 as expected"
456 this->localGroupAndNetworkData_.write(buffer);
461 { this->globalGroupAndNetworkData_.read(buffer); }
466 const std::map<std::pair<std::string, int>,
double>& localBlockData_;
467 std::map<std::pair<std::string, int>,
double>& globalBlockValues_;
471 std::map<std::pair<std::string, int>,
double>& globalBlockValues,
473 : localBlockData_(localBlockData)
474 , globalBlockValues_(globalBlockValues)
482 unpack(dummyLink, buffer);
491 throw std::logic_error(
"link in method pack is not 0 as expected");
494 unsigned int size = localBlockData_.size();
496 for (
const auto& map : localBlockData_) {
497 buffer.write(map.first.first);
498 buffer.write(map.first.second);
499 buffer.write(map.second);
507 unsigned int size = 0;
509 for (std::size_t i = 0; i < size; ++i) {
516 globalBlockValues_[std::make_pair(name, idx)] = data;
523 const data::WellBlockAveragePressures& localWBPData_;
524 data::WellBlockAveragePressures& globalWBPValues_;
528 data::WellBlockAveragePressures& globalWBPValues,
530 : localWBPData_ (localWBPData)
531 , globalWBPValues_(globalWBPValues)
541 const int dummyLink = -1;
542 unpack(dummyLink, buffer);
550 throw std::logic_error {
552 ") in method pack() is not 0 as expected"
557 this->localWBPData_.write(buffer);
561 void unpack([[maybe_unused]]
const int link,
564 this->globalWBPValues_.read(buffer);
572 WellTestState& globalWTestState,
574 : local_(localWTestState)
575 , global_(globalWTestState)
583 unpack(dummyLink, buffer);
589 throw std::logic_error(
"link in method pack is not 0 as expected");
590 this->local_.pack(buffer);
594 this->global_.unpack(buffer);
598 const WellTestState& local_;
599 WellTestState& global_;
604 const data::Aquifers& localAquiferData_;
605 data::Aquifers& globalAquiferData_;
609 data::Aquifers& globalAquiferData,
611 : localAquiferData_(localAquiferData)
612 , globalAquiferData_(globalAquiferData)
620 unpack(dummyLink, buffer);
629 throw std::logic_error(
"link in method pack is not 0 as expected");
631 int size = localAquiferData_.size();
633 for (
const auto& [key, data] : localAquiferData_) {
644 for (
int i = 0; i < size; ++i) {
647 data::AquiferData data;
650 auto& aq = this->globalAquiferData_[key];
652 this->unpackCommon(data, aq);
654 if (
auto const* aquFet = data.typeData.get<data::AquiferType::Fetkovich>();
657 this->unpackAquFet(*aquFet, aq);
659 else if (
auto const* aquCT = data.typeData.get<data::AquiferType::CarterTracy>();
662 this->unpackCarterTracy(*aquCT, aq);
664 else if (
auto const* aquNum = data.typeData.get<data::AquiferType::Numerical>();
667 this->unpackNumericAquifer(*aquNum, aq);
673 void unpackCommon(
const data::AquiferData& data, data::AquiferData& aq)
675 aq.aquiferID = std::max(aq.aquiferID, data.aquiferID);
676 aq.pressure = std::max(aq.pressure, data.pressure);
677 aq.initPressure = std::max(aq.initPressure, data.initPressure);
678 aq.datumDepth = std::max(aq.datumDepth, data.datumDepth);
679 aq.fluxRate += data.fluxRate;
680 aq.volume += data.volume;
683 void unpackAquFet(
const data::FetkovichData& aquFet, data::AquiferData& aq)
685 if (! aq.typeData.is<data::AquiferType::Fetkovich>()) {
686 auto* tData = aq.typeData.create<data::AquiferType::Fetkovich>();
690 const auto& src = aquFet;
691 auto& dst = *aq.typeData.getMutable<data::AquiferType::Fetkovich>();
693 dst.initVolume = std::max(dst.initVolume , src.initVolume);
694 dst.prodIndex = std::max(dst.prodIndex , src.prodIndex);
695 dst.timeConstant = std::max(dst.timeConstant, src.timeConstant);
699 void unpackCarterTracy(
const data::CarterTracyData& aquCT, data::AquiferData& aq)
701 if (! aq.typeData.is<data::AquiferType::CarterTracy>()) {
702 auto* tData = aq.typeData.create<data::AquiferType::CarterTracy>();
706 const auto& src = aquCT;
707 auto& dst = *aq.typeData.getMutable<data::AquiferType::CarterTracy>();
709 dst.timeConstant = std::max(dst.timeConstant , src.timeConstant);
710 dst.influxConstant = std::max(dst.influxConstant, src.influxConstant);
711 dst.waterDensity = std::max(dst.waterDensity , src.waterDensity);
712 dst.waterViscosity = std::max(dst.waterViscosity, src.waterViscosity);
714 dst.dimensionless_time = std::max(dst.dimensionless_time , src.dimensionless_time);
715 dst.dimensionless_pressure = std::max(dst.dimensionless_pressure, src.dimensionless_pressure);
719 void unpackNumericAquifer(
const data::NumericAquiferData& aquNum, data::AquiferData& aq)
721 if (! aq.typeData.is<data::AquiferType::Numerical>()) {
722 auto* tData = aq.typeData.create<data::AquiferType::Numerical>();
726 const auto& src = aquNum;
727 auto& dst = *aq.typeData.getMutable<data::AquiferType::Numerical>();
729 std::transform(src.initPressure.begin(),
730 src.initPressure.end(),
731 dst.initPressure.begin(),
732 dst.initPressure.begin(),
733 [](
const double p0_1,
const double p0_2)
735 return std::max(p0_1, p0_2);
750 : localInterRegFlows_(localInterRegFlows)
751 , globalInterRegFlows_(globalInterRegFlows)
753 if (! isIORank) {
return; }
756 this->
pack(0, buffer);
759 const int dummyLink = -1;
760 this->
unpack(dummyLink, buffer);
768 throw std::logic_error {
769 "link in method pack is not 0 as expected"
774 this->localInterRegFlows_.
write(buffer);
779 { this->globalInterRegFlows_.
read(buffer); }
784 const std::array<FlowsData<double>, 3>& localFlows_;
785 std::array<FlowsData<double>, 3>& globalFlows_;
791 : localFlows_(localFlows)
792 , globalFlows_(globalFlows)
794 if (! isIORank) {
return; }
797 this->
pack(0, buffer);
800 const int dummyLink = -1;
801 this->
unpack(dummyLink, buffer);
807 throw std::logic_error(
"link in method pack is not 0 as expected");
808 for (
int i = 0; i < 3; ++i) {
809 const auto& name = localFlows_[i].name;
811 const std::size_t size = localFlows_[i].indices.size();
813 for (std::size_t j = 0; j < size; ++j) {
814 const auto& nncIdx = localFlows_[i].indices[j];
815 buffer.write(nncIdx);
816 const auto& flows = localFlows_[i].values[j];
824 for (
int i = 0; i < 3; ++i) {
827 globalFlows_[i].name = name;
828 std::size_t size = 0;
830 for (
unsigned int j = 0; j < size; ++j) {
838 globalFlows_[i].values[nncIdx] = data;
844template <
class Gr
id,
class EquilGr
id,
class Gr
idView>
847 const GridView& localGridView,
850 const std::set<std::string>& fipRegionsInterregFlow)
851 : toIORankComm_(grid.comm())
852 , globalInterRegFlows_(
InterRegFlowMap::createMapFromNames(toVector(fipRegionsInterregFlow)))
861 std::set<int> send, recv;
862 using EquilGridView =
typename EquilGrid::LeafGridView;
863 typename std::is_same<Grid, EquilGrid>::type isSameGrid;
865 typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView> ElementMapper;
866 ElementMapper elemMapper(localGridView, Dune::mcmgElementLayout());
869 for (
const auto& elem : elements(localGridView, Dune::Partitions::interior))
871 auto idx = elemMapper.index(elem);
883 const std::size_t globalSize = equilGrid->leafGridView().size(0);
885 const EquilGridView equilGridView = equilGrid->leafGridView();
887 using EquilElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<EquilGridView>;
888 EquilElementMapper equilElemMapper(equilGridView, Dune::mcmgElementLayout());
891 if constexpr (isSameGrid) {
893 grid.scatterData(handle);
897 for (
const auto& elem : elements(equilGrid->leafGridView())) {
898 int elemIdx = equilElemMapper.index(elem);
899 int cartElemIdx = equilCartMapper->cartesianIndex(elemIdx);
903 for (
int i = 0; i < comm.size(); ++i) {
916 if constexpr (isSameGrid) {
918 grid.scatterData(handle);
923 if constexpr (isSameGrid) {
925 grid.communicate(handle, Dune::InteriorBorder_All_Interface,
926 Dune::ForwardCommunication);
930 const std::size_t gridSize = grid.size(0);
935 distributedCartesianIndex.resize(gridSize, -1);
938 for (
const auto& elem : elements(localGridView, Dune::Partitions::interior)) {
939 int elemIdx = elemMapper.index(elem);
940 distributedCartesianIndex[elemIdx] = cartMapper.cartesianIndex(elemIdx);
943 assert(elem.partitionType() == Dune::InteriorEntity);
957 distributedCartesianIndex,
967template <
class Gr
id,
class EquilGr
id,
class Gr
idView>
969collect(
const data::Solution& localCellData,
970 const std::map<std::pair<std::string, int>,
double>& localBlockData,
971 const data::Wells& localWellData,
972 const data::WellBlockAveragePressures& localWBPData,
973 const data::GroupAndNetworkValues& localGroupAndNetworkData,
974 const data::Aquifers& localAquiferData,
975 const WellTestState& localWellTestState,
980 globalCellData_ = {};
981 globalBlockData_.clear();
982 globalWellData_.clear();
983 globalWBPData_.values.clear();
984 globalGroupAndNetworkData_.clear();
985 globalAquiferData_.clear();
986 globalWellTestState_.clear();
987 this->globalInterRegFlows_.clear();
992 if(!needsReordering && !isParallel())
998 this->globalCellData_,
999 this->localIndexMap_,
1005 if (! isParallel()) {
1011 for (
int i = 0; i < 3; ++i) {
1012 const std::size_t sizeFlr = localFloresn[i].indices.size();
1013 globalFloresn_[i].resize(sizeFlr);
1014 const std::size_t sizeFlo = localFlowsn[i].indices.size();
1015 globalFlowsn_[i].resize(sizeFlo);
1020 this->globalWellData_,
1025 localGroupAndNetworkData,
1026 this->globalGroupAndNetworkData_,
1032 this->globalBlockData_,
1038 this->globalWBPData_,
1044 this->globalAquiferData_,
1050 this->globalWellTestState_,
1056 this->globalInterRegFlows_,
1062 this->globalFlowsn_,
1068 this->globalFloresn_,
1072 toIORankComm_.exchange(packUnpackCellData);
1073 toIORankComm_.exchange(packUnpackWellData);
1074 toIORankComm_.exchange(packUnpackGroupAndNetworkData);
1075 toIORankComm_.exchange(packUnpackBlockData);
1076 toIORankComm_.exchange(packUnpackWBPData);
1077 toIORankComm_.exchange(packUnpackAquiferData);
1078 toIORankComm_.exchange(packUnpackWellTestState);
1079 toIORankComm_.exchange(packUnpackInterRegFlows);
1080 toIORankComm_.exchange(packUnpackFlowsn);
1081 toIORankComm_.exchange(packUnpackFloresn);
1085 toIORankComm_.barrier();
1089template <
class Gr
id,
class EquilGr
id,
class Gr
idView>
1093 if (!isParallel()) {
1097 if (this->localIdxToGlobalIdx_.empty()) {
1098 throw std::logic_error(
"index map is not created on this rank");
1101 if (localIdx > this->localIdxToGlobalIdx_.size()) {
1102 throw std::logic_error(
"local index is outside map range");
1105 return this->localIdxToGlobalIdx_[localIdx];
1108template <
class Gr
id,
class EquilGr
id,
class Gr
idView>
1112 if (! this->isParallel()) {
1116 assert (! needsReordering);
1118 auto candidate = std::lower_bound(this->sortedCartesianIdx_.begin(),
1119 this->sortedCartesianIdx_.end(),
1122 return (candidate != sortedCartesianIdx_.end())
1123 && (*candidate == cartIdx);
Definition: CollectDataOnIORank.hpp:49
void collect(const data::Solution &localCellData, const std::map< std::pair< std::string, int >, double > &localBlockData, const data::Wells &localWellData, const data::WellBlockAveragePressures &localWBPData, const data::GroupAndNetworkValues &localGroupAndNetworkData, const data::Aquifers &localAquiferData, const WellTestState &localWellTestState, const InterRegFlowMap &interRegFlows, const std::array< FlowsData< double >, 3 > &localFlowsn, const std::array< FlowsData< double >, 3 > &localFloresn)
Definition: CollectDataOnIORank_impl.hpp:969
std::vector< int > localIdxToGlobalIdx_
Definition: CollectDataOnIORank.hpp:163
IndexMapStorageType indexMaps_
Definition: CollectDataOnIORank.hpp:154
std::vector< int > sortedCartesianIdx_
sorted list of cartesian indices present-
Definition: CollectDataOnIORank.hpp:169
static const bool needsReordering
Definition: CollectDataOnIORank.hpp:67
@ ioRank
Definition: CollectDataOnIORank.hpp:65
int localIdxToGlobalIdx(unsigned localIdx) const
Definition: CollectDataOnIORank_impl.hpp:1091
P2PCommunicatorType toIORankComm_
Definition: CollectDataOnIORank.hpp:150
bool isParallel() const
Definition: CollectDataOnIORank.hpp:128
bool isIORank() const
Definition: CollectDataOnIORank.hpp:125
typename Grid::CollectiveCommunication CollectiveCommunication
Definition: CollectDataOnIORank.hpp:58
bool isCartIdxOnThisRank(int cartIdx) const
Definition: CollectDataOnIORank_impl.hpp:1110
std::vector< int > globalRanks_
Definition: CollectDataOnIORank.hpp:155
CollectDataOnIORank(const Grid &grid, const EquilGrid *equilGrid, const GridView &gridView, const Dune::CartesianIndexMapper< Grid > &cartMapper, const Dune::CartesianIndexMapper< EquilGrid > *equilCartMapper, const std::set< std::string > &fipRegionsInterregFlow={})
Definition: CollectDataOnIORank_impl.hpp:846
IndexMapType localIndexMap_
Definition: CollectDataOnIORank.hpp:153
std::vector< int > IndexMapType
Definition: CollectDataOnIORank.hpp:60
IndexMapType globalCartesianIndex_
Definition: CollectDataOnIORank.hpp:152
Definition: CollectDataOnIORank_impl.hpp:85
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:164
std::map< int, int > globalPosition_
Definition: CollectDataOnIORank_impl.hpp:90
std::vector< int > & ranks_
Definition: CollectDataOnIORank_impl.hpp:92
IndexMapStorageType & indexMaps_
Definition: CollectDataOnIORank_impl.hpp:89
DistributeIndexMapping(const std::vector< int > &globalIndex, const std::vector< int > &distributedGlobalIndex, IndexMapType &localIndexMap, IndexMapStorageType &indexMaps, std::vector< int > &ranks, std::set< int > &recv, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:95
IndexMapType & localIndexMap_
Definition: CollectDataOnIORank_impl.hpp:88
const std::vector< int > & distributedGlobalIndex_
Definition: CollectDataOnIORank_impl.hpp:87
void unpack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:180
~DistributeIndexMapping()
Definition: CollectDataOnIORank_impl.hpp:131
std::set< int > & recv_
Definition: CollectDataOnIORank_impl.hpp:91
Communication handle to scatter the global index.
Definition: CollectDataOnIORank_impl.hpp:240
std::size_t size(const T &)
Definition: CollectDataOnIORank_impl.hpp:252
bool fixedSize(int, int)
Definition: CollectDataOnIORank_impl.hpp:246
void scatter(B &buffer, const T &t, std::size_t)
Definition: CollectDataOnIORank_impl.hpp:262
void gather(B &buffer, const T &t)
Definition: CollectDataOnIORank_impl.hpp:257
int DataType
Definition: CollectDataOnIORank_impl.hpp:245
bool contains(int dim, int codim)
Definition: CollectDataOnIORank_impl.hpp:267
ElementIndexHandle(const Mapper &mapper, std::vector< int > &elementIndices)
Definition: CollectDataOnIORank_impl.hpp:242
Communication handle to scatter the global index.
Definition: CollectDataOnIORank_impl.hpp:200
std::size_t size(const T &)
Definition: CollectDataOnIORank_impl.hpp:212
bool contains(int dim, int codim)
Definition: CollectDataOnIORank_impl.hpp:227
void gather(B &buffer, const T &t)
Definition: CollectDataOnIORank_impl.hpp:217
ElementIndexScatterHandle(const EquilMapper &sendMapper, const Mapper &recvMapper, std::vector< int > &elementIndices)
Definition: CollectDataOnIORank_impl.hpp:202
void scatter(B &buffer, const T &t, std::size_t)
Definition: CollectDataOnIORank_impl.hpp:222
bool fixedSize(int, int)
Definition: CollectDataOnIORank_impl.hpp:206
int DataType
Definition: CollectDataOnIORank_impl.hpp:205
Definition: CollectDataOnIORank_impl.hpp:53
int localIndex() const
Definition: CollectDataOnIORank_impl.hpp:72
void setIndex(int localIndex)
Definition: CollectDataOnIORank_impl.hpp:69
int id() const
Definition: CollectDataOnIORank_impl.hpp:74
GlobalCellIndex()
Definition: CollectDataOnIORank_impl.hpp:59
void setGhost()
Definition: CollectDataOnIORank_impl.hpp:64
bool isInterior() const
Definition: CollectDataOnIORank_impl.hpp:76
void setId(int globalId)
Definition: CollectDataOnIORank_impl.hpp:67
Inter-region flow accumulation maps for all region definition arrays.
Definition: InterRegFlows.hpp:179
void read(MessageBufferType &buffer)
Definition: InterRegFlows.hpp:323
void write(MessageBufferType &buffer) const
Definition: InterRegFlows.hpp:296
Definition: CollectDataOnIORank_impl.hpp:603
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:640
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:625
PackUnPackAquiferData(const data::Aquifers &localAquiferData, data::Aquifers &globalAquiferData, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:608
Definition: CollectDataOnIORank_impl.hpp:465
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:487
PackUnPackBlockData(const std::map< std::pair< std::string, int >, double > &localBlockData, std::map< std::pair< std::string, int >, double > &globalBlockValues, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:470
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:504
Definition: CollectDataOnIORank_impl.hpp:277
void unpack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:345
PackUnPackCellData(const data::Solution &localCellData, data::Solution &globalCellData, const IndexMapType &localIndexMap, const IndexMapStorageType &indexMaps, std::size_t globalSize, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:285
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:316
void read(MessageBufferType &buffer, const IndexMapType &indexMap, Vector &vector, unsigned int offset=0, unsigned int stride=1) const
Definition: CollectDataOnIORank_impl.hpp:368
void write(MessageBufferType &buffer, const IndexMapType &localIndexMap, const Vector &vector, unsigned int offset=0, unsigned int stride=1) const
Definition: CollectDataOnIORank_impl.hpp:350
void doUnpack(const IndexMapType &indexMap, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:331
Definition: CollectDataOnIORank_impl.hpp:424
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:460
PackUnPackGroupAndNetworkValues(const data::GroupAndNetworkValues &localGroupAndNetworkData, data::GroupAndNetworkValues &globalGroupAndNetworkData, const bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:429
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:446
Definition: CollectDataOnIORank_impl.hpp:522
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:546
PackUnPackWBPData(const data::WellBlockAveragePressures &localWBPData, data::WellBlockAveragePressures &globalWBPValues, const bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:527
void unpack(const int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:561
Definition: CollectDataOnIORank_impl.hpp:386
PackUnPackWellData(const data::Wells &localWellData, data::Wells &globalWellData, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:391
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:408
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:418
Definition: CollectDataOnIORank_impl.hpp:569
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:587
PackUnPackWellTestState(const WellTestState &localWTestState, WellTestState &globalWTestState, bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:571
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:593
Definition: CollectDataOnIORank_impl.hpp:783
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:804
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:822
PackUnpackFlows(const std::array< FlowsData< double >, 3 > &localFlows, std::array< FlowsData< double >, 3 > &globalFlows, const bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:788
Definition: CollectDataOnIORank_impl.hpp:742
void pack(int link, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:764
void unpack(int, MessageBufferType &buffer)
Definition: CollectDataOnIORank_impl.hpp:778
PackUnpackInterRegFlows(const InterRegFlowMap &localInterRegFlows, InterRegFlowMap &globalInterRegFlows, const bool isIORank)
Definition: CollectDataOnIORank_impl.hpp:747
static const int dim
Definition: structuredgridvanguard.hh:67
Definition: blackoilboundaryratevector.hh:37
std::vector< int > IndexMapType
Definition: CollectDataOnIORank_impl.hpp:80
Dune::Point2PointCommunicator< Dune::SimpleMessageBuffer > P2PCommunicatorType
Definition: CollectDataOnIORank_impl.hpp:82
std::vector< IndexMapType > IndexMapStorageType
Definition: CollectDataOnIORank_impl.hpp:81
std::string to_string(const ConvergenceReport::ReservoirFailure::Type t)
typename P2PCommunicatorType::MessageBufferType MessageBufferType
Definition: CollectDataOnIORank_impl.hpp:83