Merge pull request #2397 from akva2/no_serialization_fluidsystem

changed: no need to serialize the FluidSystem any more
This commit is contained in:
Bård Skaflestad 2020-03-03 21:51:10 -06:00 committed by GitHub
commit 6688c19a77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 14 deletions

View File

@ -610,7 +610,7 @@ public:
const auto& vanguard = simulator.vanguard(); const auto& vanguard = simulator.vanguard();
const auto& comm = this->gridView().comm(); const auto& comm = this->gridView().comm();
if (comm.rank() == 0) { if (comm.rank() == 0) {
SolventModule::initFromDeck(vanguard.deck(), vanguard.eclState()); SolventModule::initFromDeck(vanguard.deck(), vanguard.eclState(), vanguard.schedule());
PolymerModule::initFromDeck(vanguard.deck(), vanguard.eclState()); PolymerModule::initFromDeck(vanguard.deck(), vanguard.eclState());
FoamModule::initFromDeck(vanguard.deck(), vanguard.eclState()); FoamModule::initFromDeck(vanguard.deck(), vanguard.eclState());
BrineModule::initFromDeck(vanguard.deck(), vanguard.eclState()); BrineModule::initFromDeck(vanguard.deck(), vanguard.eclState());
@ -2380,15 +2380,10 @@ private:
void initFluidSystem_() void initFluidSystem_()
{ {
const auto& simulator = this->simulator(); const auto& simulator = this->simulator();
const auto& deck = simulator.vanguard().deck();
const auto& eclState = simulator.vanguard().eclState(); const auto& eclState = simulator.vanguard().eclState();
const auto& comm = simulator.gridView().comm(); const auto& schedule = simulator.vanguard().schedule();
if (comm.rank() == 0) FluidSystem::initFromState(eclState, schedule);
FluidSystem::initFromDeck(deck, eclState);
EclMpiSerializer ser(comm);
ser.staticBroadcast<FluidSystem>();
} }
void readInitialCondition_() void readInitialCondition_()

View File

@ -55,9 +55,9 @@ using namespace Opm;
further semantic meaning. further semantic meaning.
*/ */
void verify_norne_oil_pvt_region1(const Opm::Deck& deck, const Opm::EclipseState& eclState) { void verify_norne_oil_pvt_region1(const Opm::EclipseState& eclState, const Opm::Schedule& schedule) {
Opm::LiveOilPvt<double> oilPvt; Opm::LiveOilPvt<double> oilPvt;
oilPvt.initFromDeck(deck, eclState); oilPvt.initFromState(eclState, schedule);
std::vector<double> rs = {33, 33, std::vector<double> rs = {33, 33,
43, 43, 43, 43,
@ -129,9 +129,9 @@ void verify_norne_oil_pvt_region1(const Opm::Deck& deck, const Opm::EclipseState
} }
void verify_norne_oil_pvt_region2(const Opm::Deck& deck, const Opm::EclipseState& eclState) { void verify_norne_oil_pvt_region2(const Opm::EclipseState& eclState, const Opm::Schedule& schedule) {
Opm::LiveOilPvt<double> oilPvt; Opm::LiveOilPvt<double> oilPvt;
oilPvt.initFromDeck(deck, eclState); oilPvt.initFromState(eclState, schedule);
std::vector<double> rs = {21 , 21, std::vector<double> rs = {21 , 21,
30 , 30, 30 , 30,
@ -280,7 +280,8 @@ BOOST_AUTO_TEST_CASE( Test_Norne_PVT) {
auto deck = parser.parseFile("norne_pvt.data", parseContext, errorGuard); auto deck = parser.parseFile("norne_pvt.data", parseContext, errorGuard);
Opm::EclipseState eclState(deck); Opm::EclipseState eclState(deck);
Opm::Schedule schedule(deck, eclState);
verify_norne_oil_pvt_region1( deck, eclState ); verify_norne_oil_pvt_region1(eclState, schedule);
verify_norne_oil_pvt_region2( deck, eclState ); verify_norne_oil_pvt_region2(eclState, schedule);
} }