mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 23:01:54 -06:00
avoid usage of deck on all processes setting up EclPolymerModule
This commit is contained in:
parent
3b27df91b4
commit
777d38e550
@ -606,17 +606,19 @@ public:
|
||||
this->model().addOutputModule(new VtkEclTracerModule<TypeTag>(simulator));
|
||||
// Tell the black-oil extensions to initialize their internal data structures
|
||||
const auto& vanguard = simulator.vanguard();
|
||||
PolymerModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
FoamModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
const auto& comm = this->gridView().comm();
|
||||
if (comm.rank() == 0) {
|
||||
SolventModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
PolymerModule::initFromDeck(vanguard.deck(), vanguard.eclState());
|
||||
if (comm.size() > 1) {
|
||||
EclMpiSerializer ser(comm);
|
||||
size_t size = SolventModule::packSize(ser);
|
||||
size_t size = SolventModule::packSize(ser) +
|
||||
PolymerModule::packSize(ser);
|
||||
std::vector<char> buffer(size);
|
||||
int position = 0;
|
||||
SolventModule::pack(buffer, position, ser);
|
||||
PolymerModule::pack(buffer, position, ser);
|
||||
comm.broadcast(&position, 1, 0);
|
||||
comm.broadcast(buffer.data(), position, 0);
|
||||
}
|
||||
@ -628,6 +630,7 @@ public:
|
||||
int position = 0;
|
||||
EclMpiSerializer ser(comm);
|
||||
SolventModule::unpack(buffer, position, ser);
|
||||
PolymerModule::unpack(buffer, position, ser);
|
||||
}
|
||||
|
||||
// create the ECL writer
|
||||
|
Loading…
Reference in New Issue
Block a user