mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-11 00:41:56 -06:00
transmult and initconfig are ref's, use ref for EclipseState constructor
This commit is contained in:
parent
c4e5db2153
commit
7ff2328f3f
@ -90,7 +90,7 @@ try
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
const double grav = param.getDefault("gravity", unit::gravity);
|
||||
GridManager gm(eclipseState->getInputGrid());
|
||||
const UnstructuredGrid& grid = *gm.c_grid();
|
||||
|
@ -76,7 +76,7 @@ try
|
||||
{ ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::IGNORE}
|
||||
});
|
||||
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseContext));
|
||||
eclState.reset(new EclipseState(deck, parseContext));
|
||||
eclState.reset(new EclipseState(*deck, parseContext));
|
||||
|
||||
GridManager gm(eclState->getInputGrid());
|
||||
const UnstructuredGrid& grid = *gm.c_grid();
|
||||
|
@ -200,7 +200,7 @@ namespace Opm
|
||||
std::vector<EquilRecord>
|
||||
getEquil(const Opm::EclipseState& state)
|
||||
{
|
||||
const auto& init = *state.getInitConfig();
|
||||
const auto& init = state.getInitConfig();
|
||||
|
||||
if( !init.hasEquil() ) {
|
||||
OPM_THROW(std::domain_error, "Deck does not provide equilibration data.");
|
||||
|
@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE (DeckAllDead)
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, *grid, false);
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, *grid, 10.0);
|
||||
const auto& pressures = comp.press();
|
||||
@ -394,7 +394,7 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
// Test the capillary inversion for oil-water.
|
||||
@ -448,7 +448,7 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillary)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 10.0);
|
||||
@ -489,7 +489,7 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
||||
@ -552,7 +552,7 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
||||
@ -632,7 +632,7 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
||||
@ -715,7 +715,7 @@ BOOST_AUTO_TEST_CASE (DeckWithRSVDAndRVVD)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA", parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||
|
||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
||||
|
@ -281,7 +281,7 @@ BOOST_AUTO_TEST_CASE( Test_Norne_PVT) {
|
||||
std::shared_ptr<const Deck> deck;
|
||||
deck = parser->parseFile("norne_pvt.data", parseContext);
|
||||
|
||||
Opm::EclipseStateConstPtr eclState(new EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclState(new EclipseState(*deck, parseContext));
|
||||
|
||||
verify_norne_oil_pvt_region1( deck, eclState );
|
||||
verify_norne_oil_pvt_region2( deck, eclState );
|
||||
|
@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(Processing)
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||
Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext);
|
||||
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseContext));
|
||||
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(*deck, parseContext));
|
||||
const auto& porv = eclstate->get3DProperties().getDoubleGridProperty("PORV").getData();
|
||||
EclipseGridConstPtr eclgrid = eclstate->getInputGrid();
|
||||
|
||||
@ -92,10 +92,10 @@ BOOST_AUTO_TEST_CASE(Processing)
|
||||
std::vector<double> htrans(Opm::UgGridHelpers::numCellFaces(grid));
|
||||
Grid* ug = const_cast<Grid*>(& grid);
|
||||
tpfa_htrans_compute(ug, rock.permeability(), htrans.data());
|
||||
auto transMult = eclstate->getTransMult();
|
||||
const auto& transMult = eclstate->getTransMult();
|
||||
std::vector<double> multz(nc, 0.0);
|
||||
for (int i = 0; i < nc; ++i) {
|
||||
multz[i] = transMult->getMultiplier(global_cell[i], Opm::FaceDir::ZPlus);
|
||||
multz[i] = transMult.getMultiplier(global_cell[i], Opm::FaceDir::ZPlus);
|
||||
}
|
||||
Opm::NNC nnc(deck, eclgrid);
|
||||
pinch.process(grid, htrans, actnum, multz, porv, nnc);
|
||||
|
@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE(diagnosis)
|
||||
{ ParseContext::PARSE_RANDOM_TEXT, InputError::IGNORE}
|
||||
});
|
||||
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseContext));
|
||||
eclState.reset(new EclipseState(deck, parseContext));
|
||||
eclState.reset(new EclipseState(*deck, parseContext));
|
||||
GridManager gm(eclState->getInputGrid());
|
||||
const UnstructuredGrid& grid = *gm.c_grid();
|
||||
std::shared_ptr<CounterLog> counterLog = std::make_shared<CounterLog>(Log::DefaultMessageTypes);
|
||||
|
@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE (GwsegStandard)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncStandard.DATA", parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||
|
||||
const int np = 3;
|
||||
@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE (GwsegEPSBase)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPSBase.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||
|
||||
const int np = 3;
|
||||
@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_A)
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_A.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||
|
||||
const int np = 3;
|
||||
@ -493,7 +493,7 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_C)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_C.DATA", parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||
|
||||
const int np = 3;
|
||||
@ -596,7 +596,7 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_D)
|
||||
Opm::ParserPtr parser(new Opm::Parser() );
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_D.DATA" , parseContext);
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||
|
||||
const int np = 3;
|
||||
|
@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
double target_surfacerate_inj;
|
||||
|
@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
||||
std::string scheduleFile("wells_group.data");
|
||||
ParseContext parseContext;
|
||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(deck, parseContext));
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(*deck, parseContext));
|
||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||
|
||||
GroupTreeNodePtr field=eclipseState->getSchedule()->getGroupTree(2)->getNode("FIELD");
|
||||
|
@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
||||
std::string scheduleFile("wells_group.data");
|
||||
ParseContext parseContext;
|
||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(*deck , parseContext));
|
||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||
|
||||
auto wells = eclipseState->getSchedule()->getWells();
|
||||
@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
||||
ParseContext parseContext;
|
||||
std::string scheduleFile("wells_group.data");
|
||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||
EclipseStateConstPtr eclipseState(new EclipseState(*deck , parseContext));
|
||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||
|
||||
std::vector<GroupTreeNodeConstPtr> nodes = eclipseState->getSchedule()->getGroupTree(2)->getNodes();
|
||||
|
@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
{
|
||||
@ -218,7 +218,7 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
Opm::WellsManager wellsManager0(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||
@ -234,7 +234,7 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
||||
Opm::ParserPtr parser(new Opm::Parser());
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
Opm::WellsManager wellsManager0(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||
@ -257,7 +257,7 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
Opm::WellsManager wellsManager2(eclipseState, 2, *gridManager.c_grid(), NULL);
|
||||
@ -274,7 +274,7 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
||||
Opm::ParseContext parseContext;
|
||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
|
||||
Opm::GridManager gridManager(eclipseState->getInputGrid());
|
||||
|
||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user