Ignore THPRES input for restart runs

This commit is contained in:
Joakim Hove
2018-05-29 16:38:04 +02:00
parent a7ec8b1d53
commit 24f28e8a5d
8 changed files with 110 additions and 31 deletions

View File

@@ -55,6 +55,7 @@ const std::string& inputStr = "RUNSPEC\n"
"/\n"
"\n";
const std::string& inputStr_noTHPRES = "RUNSPEC\n"
"EQLOPTS\n"
"DIMENS\n"
@@ -115,7 +116,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfigGetThresholdPressureTableTest) {
TableManager tm(deck);
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
BOOST_CHECK_NO_THROW( SimulationConfig( deck, ep ) );
BOOST_CHECK_NO_THROW( SimulationConfig(false, deck, ep ) );
}
@@ -125,8 +126,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigNOTHPRES) {
TableManager tm(deck);
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SimulationConfig simulationConfig(deck, ep);
BOOST_CHECK( !simulationConfig.hasThresholdPressure() );
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK( !simulationConfig.useThresholdPressure() );
}
BOOST_AUTO_TEST_CASE(SimulationConfigCPRNotUsed) {
@@ -135,7 +136,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRNotUsed) {
TableManager tm(deck);
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SimulationConfig simulationConfig(deck, ep);
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK( ! simulationConfig.useCPR());
}
@@ -146,7 +147,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRUsed) {
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SUMMARYSection summary(deck);
SimulationConfig simulationConfig(deck, ep);
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK( simulationConfig.useCPR() );
BOOST_CHECK( ! summary.hasKeyword("CPR") );
}
@@ -159,7 +160,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRInSUMMARYSection) {
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SUMMARYSection summary(deck);
SimulationConfig simulationConfig(deck, ep);
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK( ! simulationConfig.useCPR());
BOOST_CHECK( summary.hasKeyword("CPR"));
}
@@ -172,7 +173,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRBoth) {
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SUMMARYSection summary(deck);
SimulationConfig simulationConfig(deck, ep);
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK( simulationConfig.useCPR());
BOOST_CHECK( summary.hasKeyword("CPR"));
@@ -198,7 +199,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfig_VAPOIL_DISGAS) {
TableManager tm(deck);
EclipseGrid eg(10, 3, 4);
Eclipse3DProperties ep(deck, tm, eg);
SimulationConfig simulationConfig(deck, ep);
SimulationConfig simulationConfig(false, deck, ep);
BOOST_CHECK_EQUAL( false , simulationConfig.hasDISGAS());
BOOST_CHECK_EQUAL( false , simulationConfig.hasVAPOIL());
@@ -206,7 +207,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfig_VAPOIL_DISGAS) {
TableManager tm_vd(deck_vd);
EclipseGrid eg_vd(10, 3, 4);
Eclipse3DProperties ep_vd(deck_vd, tm, eg);
SimulationConfig simulationConfig_vd(deck_vd, ep_vd);
SimulationConfig simulationConfig_vd(false, deck_vd, ep_vd);
BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasDISGAS());
BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasVAPOIL());
}