Use RestartValue container for Eclipse output

This commit is contained in:
Joakim Hove
2018-04-28 12:52:28 +02:00
parent fea57c5031
commit d078a96eae
8 changed files with 46 additions and 61 deletions

View File

@@ -331,17 +331,16 @@ BOOST_AUTO_TEST_CASE(EclipseIOIntegration) {
sol.insert("KRO", measure::identity , std::vector<double>(3*3*3 , i), TargetType::RESTART_AUXILIARY);
sol.insert("KRG", measure::identity , std::vector<double>(3*3*3 , i*10), TargetType::RESTART_AUXILIARY);
RestartValue restart_value(sol, wells);
auto first_step = ecl_util_make_date( 10 + i, 11, 2008 );
eclWriter.writeTimeStep( i,
false,
first_step - start_time,
sol,
wells,
{},
{},
{});
false,
first_step - start_time,
restart_value,
{},
{},
{});
checkRestartFile( i );

View File

@@ -144,19 +144,21 @@ BOOST_AUTO_TEST_CASE(test_RFT) {
well2_comps[i] = well_comp;
}
Opm::data::Solution solution = createBlackoilState(2, numCells);
Opm::data::Wells wells;
wells["OP_1"] = { r1, 1.0, 1.1, 3.1, 1, well1_comps };
wells["OP_2"] = { r2, 1.0, 1.1, 3.2, 1, well2_comps };
RestartValue restart_value(solution, wells);
eclipseWriter.writeTimeStep( 2,
false,
step_time - start_time,
createBlackoilState( 2, numCells ),
wells,
{},
{},
{});
restart_value,
{},
{},
{});
}
verifyRFTFile("TESTRFT.RFT");
@@ -235,14 +237,15 @@ BOOST_AUTO_TEST_CASE(test_RFT2) {
}
Opm::data::Wells wells;
Opm::data::Solution solution = createBlackoilState(2, numCells);
wells["OP_1"] = { r1, 1.0, 1.1, 3.1, 1, well1_comps };
wells["OP_2"] = { r2, 1.0, 1.1, 3.2, 1, well2_comps };
RestartValue restart_value(solution, wells);
eclipseWriter.writeTimeStep( step,
false,
step_time - start_time,
createBlackoilState( 2, numCells ),
wells,
restart_value,
{},
{},
{});

View File

@@ -359,7 +359,8 @@ RestartValue first_sim(const EclipseState& es, EclipseIO& eclWriter, bool write_
eclWriter.writeTimeStep( 1,
false,
first_step - start_time,
sol, wells , {}, {}, {}, {}, write_double);
RestartValue(sol,wells),
{}, {}, {}, write_double);
return { sol, wells , {}};
}
@@ -483,8 +484,7 @@ BOOST_AUTO_TEST_CASE(WriteWrongSOlutionSize) {
BOOST_CHECK_THROW( RestartIO::save("FILE.UNRST", 1 ,
100,
cells ,
wells ,
RestartValue(cells, wells),
setup.es,
setup.grid ,
setup.schedule),
@@ -507,12 +507,10 @@ BOOST_AUTO_TEST_CASE(ExtraData_KEYS) {
extra["TOO_LONG_KEY"] = {0,1,2,3};
BOOST_CHECK_THROW( RestartIO::save("FILE.UNRST", 1 ,
100,
cells ,
wells ,
RestartValue(cells, wells, extra),
setup.es,
setup.grid,
setup.schedule,
extra),
setup.schedule),
std::runtime_error);
}
@@ -522,12 +520,10 @@ BOOST_AUTO_TEST_CASE(ExtraData_KEYS) {
extra["PRESSURE"] = {0,1,2,3};
BOOST_CHECK_THROW( RestartIO::save("FILE.UNRST", 1 ,
100,
cells ,
wells ,
RestartValue(cells, wells, extra),
setup.es,
setup.grid,
setup.schedule,
extra),
setup.schedule),
std::runtime_error);
}
@@ -537,12 +533,10 @@ BOOST_AUTO_TEST_CASE(ExtraData_KEYS) {
extra["LOGIHEAD"] = {0,1,2,3};
BOOST_CHECK_THROW( RestartIO::save("FILE.UNRST", 1 ,
100,
cells ,
wells ,
RestartValue(cells, wells, extra),
setup.es,
setup.grid,
setup.schedule,
extra),
setup.schedule),
std::runtime_error);
}
}
@@ -560,12 +554,10 @@ BOOST_AUTO_TEST_CASE(ExtraData_content) {
extra["EXTRA"] = {0,1,2,3};
RestartIO::save("FILE.UNRST", 1 ,
100,
cells ,
wells ,
RestartValue(cells, wells, extra),
setup.es,
setup.grid,
setup.schedule,
extra);
setup.schedule);
{
ecl_file_type * f = ecl_file_open( "FILE.UNRST" , 0 );

View File

@@ -155,8 +155,7 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo) {
eclipseWriter.writeTimeStep( timestep,
false,
timestep,
solution,
wells ,
RestartValue(solution, wells),
{},
{},
{} );