Merge pull request #976 from qilicun/rename-ParseMode

Rename parse mode
This commit is contained in:
Joakim Hove committed 2016-03-17 09:51:50 +01:00
commit 212e3c26a4
28 files changed
+356 -356

No files matched your search

+4 -4
View File
@@ -30,7 +30,7 @@
#include <opm/core/props/BlackoilPropertiesFromDeck.hpp>
#include <opm/core/simulator/BlackoilState.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
@@ -85,10 +85,10 @@ try
parameter::ParameterGroup param(argc, argv);
std::cout << "--------------- Reading parameters ---------------" << std::endl;
const std::string deck_filename = param.get<std::string>("deck_filename");
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseMode));
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
const double grav = param.getDefault("gravity", unit::gravity);
GridManager gm(deck);
const UnstructuredGrid& grid = *gm.c_grid();
+4 -4
View File
@@ -44,7 +44,7 @@
#include <opm/core/flowdiagnostics/TofDiscGalReorder.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <memory>
@@ -172,9 +172,9 @@ try
// Read the deck.
std::string deck_filename = param.get<std::string>("deck_filename");
Parser parser;
ParseMode parseMode;
DeckConstPtr deck = parser.parseFile(deck_filename , parseMode);
EclipseStateConstPtr eclipseState = std::make_shared<EclipseState>(deck , parseMode);
ParseContext parseContext;
DeckConstPtr deck = parser.parseFile(deck_filename , parseContext);
EclipseStateConstPtr eclipseState = std::make_shared<EclipseState>(deck , parseContext);
// Grid init
GridManager grid_manager(deck);
+10 -10
View File
@@ -32,7 +32,7 @@
#include <opm/core/utility/miscUtilities.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
@@ -65,16 +65,16 @@ try
const char* eclipseFilename = argv[1];
EclipseStateConstPtr eclState;
ParserPtr parser(new Opm::Parser);
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE },
{ ParseMode::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
{ ParseMode::PARSE_RANDOM_TEXT, InputError::IGNORE},
{ ParseMode::UNSUPPORTED_SCHEDULE_GEO_MODIFIER, InputError::IGNORE},
{ ParseMode::UNSUPPORTED_COMPORD_TYPE, InputError::IGNORE},
{ ParseMode::UNSUPPORTED_INITIAL_THPRES, InputError::IGNORE},
{ ParseMode::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::IGNORE}
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE },
{ ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
{ ParseContext::PARSE_RANDOM_TEXT, InputError::IGNORE},
{ ParseContext::UNSUPPORTED_SCHEDULE_GEO_MODIFIER, InputError::IGNORE},
{ ParseContext::UNSUPPORTED_COMPORD_TYPE, InputError::IGNORE},
{ ParseContext::UNSUPPORTED_INITIAL_THPRES, InputError::IGNORE},
{ ParseContext::INTERNAL_ERROR_UNINITIALIZED_THPRES, InputError::IGNORE}
});
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseMode));
eclState.reset(new EclipseState(deck, parseMode));
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseContext));
eclState.reset(new EclipseState(deck, parseContext));
GridManager gm(deck);
const UnstructuredGrid& grid = *gm.c_grid();
+3 -3
View File
@@ -21,7 +21,7 @@
#include "config.h"
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
@@ -366,8 +366,8 @@ int main(int argc, char** argv)
// Parse grdecl file
std::cout << "Parsing grid file '" << eclipsefilename << "' ..." << std::endl;
Opm::ParserPtr parser(new Opm::Parser);
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(eclipsefilename , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(eclipsefilename , parseContext));
if ( ! (deck->hasKeyword("SPECGRID") && deck->hasKeyword("COORD") && deck->hasKeyword("ZCORN")) ) {
std::cerr << "Grid file " << eclipsefilename << "are missing keywords SPECGRID, COORD or ZCORN!" << std::endl;
exit(1);
+4 -4
View File
@@ -45,7 +45,7 @@
#include <opm/core/simulator/SimulatorCompressibleTwophase.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
@@ -98,10 +98,10 @@ try
// int max_well_control_iterations = 0;
double gravity[3] = { 0.0 };
if (use_deck) {
ParseMode parseMode;
ParseContext parseContext;
std::string deck_filename = param.get<std::string>("deck_filename");
deck = parser->parseFile(deck_filename , parseMode);
eclipseState.reset(new EclipseState(deck, parseMode));
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset(new EclipseState(deck, parseContext));
// Grid init
grid.reset(new GridManager(deck));
+4 -4
View File
@@ -45,7 +45,7 @@
#include <opm/core/simulator/WellState.hpp>
#include <opm/core/simulator/SimulatorIncompTwophase.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
@@ -111,11 +111,11 @@ try
double gravity[3] = { 0.0 };
if (use_deck) {
ParserPtr parser(new Opm::Parser());
ParseMode parseMode;
ParseContext parseContext;
std::string deck_filename = param.get<std::string>("deck_filename");
deck = parser->parseFile(deck_filename , parseMode);
eclipseState.reset( new EclipseState(deck, parseMode));
deck = parser->parseFile(deck_filename , parseContext);
eclipseState.reset( new EclipseState(deck, parseContext));
// Grid init
grid.reset(new GridManager(deck));
// Rock and fluid init
+5 -5
View File
@@ -18,7 +18,7 @@
#include <opm/core/linalg/LinearSolverFactory.hpp>
#include <opm/core/props/rock/RockCompressibility.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
@@ -35,10 +35,10 @@ try
simtimer.init(parameters);
// Read input file
ParseMode parseMode;
ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck = parser->parseFile(file_name , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::DeckConstPtr deck = parser->parseFile(file_name , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
std::cout << "Done!" << std::endl;
// Setup grid
@@ -108,7 +108,7 @@ try
TwophaseFluid fluid(incomp_properties);
TransportModel model(fluid, *grid->c_grid(), porevol, gravity[2], true);
TransportContextl model(fluid, *grid->c_grid(), porevol, gravity[2], true);
TransportSolver tsolver(model);
+3 -3
View File
@@ -22,7 +22,7 @@
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
@@ -43,9 +43,9 @@ namespace Opm
public:
CornerPointChopper(const std::string& file)
{
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
deck_ = parser->parseFile(file , parseMode);
deck_ = parser->parseFile(file , parseContext);
metricUnits_.reset(Opm::UnitSystem::newMETRIC());
+3 -3
View File
@@ -35,7 +35,7 @@
#include <opm/core/props/phaseUsageFromDeck.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
@@ -92,7 +92,7 @@ void verifyRFTFile(const std::string& rft_filename) {
Opm::DeckConstPtr createDeck(const std::string& input_str) {
Opm::ParserPtr parser = std::make_shared<Opm::Parser>();
Opm::DeckConstPtr deck = parser->parseString(input_str , Opm::ParseMode());
Opm::DeckConstPtr deck = parser->parseString(input_str , Opm::ParseContext());
return deck;
}
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(test_EclipseWriterRFTHandler)
test_area.reset(new_ptr, test_work_area_free);
std::shared_ptr<const Opm::Deck> deck = createDeck(deckString);
std::shared_ptr<Opm::EclipseState> eclipseState = std::make_shared<Opm::EclipseState>(deck , Opm::ParseMode());
std::shared_ptr<Opm::EclipseState> eclipseState = std::make_shared<Opm::EclipseState>(deck , Opm::ParseContext());
std::shared_ptr<Opm::SimulatorTimer> simulatorTimer = std::make_shared<Opm::SimulatorTimer>();
simulatorTimer->init(eclipseState->getSchedule()->getTimeMap());
+4 -4
View File
@@ -34,7 +34,7 @@
#include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
@@ -59,14 +59,14 @@ std::shared_ptr<Opm::WellState> wellState;
void createEclipseWriter(const char *deckString)
{
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserConstPtr parser(new Opm::Parser());
deck = parser->parseString(deckString, parseMode);
deck = parser->parseString(deckString, parseContext);
Opm::parameter::ParameterGroup params;
params.insertParameter("deck_filename", "foo.data");
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
auto eclGrid = eclipseState->getEclipseGrid();
BOOST_CHECK(eclGrid->getNX() == 3);
+8 -8
View File
@@ -4,7 +4,7 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#if HAVE_DYNAMIC_BOOST_TEST
@@ -30,12 +30,12 @@ using namespace std;
BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
ParseMode parseMode;
ParseContext parseContext;
const string filename1 = "testBlackoilState1.DATA";
const string filename2 = "testBlackoilState2.DATA";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck1(parser->parseFile(filename1, parseMode));
Opm::DeckConstPtr deck2(parser->parseFile(filename2, parseMode));
Opm::DeckConstPtr deck1(parser->parseFile(filename1, parseContext));
Opm::DeckConstPtr deck2(parser->parseFile(filename2, parseContext));
GridManager gridManager1(deck1);
const UnstructuredGrid* grid1 = gridManager1.c_grid();
@@ -56,9 +56,9 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
const string filename = "testBlackoilState1.DATA";
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseFile(filename, parseMode));
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
GridManager gridManager(deck);
const UnstructuredGrid* grid = gridManager.c_grid();
@@ -77,9 +77,9 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
const string filename = "testBlackoilState1.DATA";
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
GridManager gridManager(deck);
const UnstructuredGrid* grid = gridManager.c_grid();
+3 -3
View File
@@ -12,7 +12,7 @@
#include <opm/core/grid/GridManager.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <cstddef>
@@ -131,9 +131,9 @@ BOOST_AUTO_TEST_CASE(DisjointColumn)
correct_answer[4].resize(1);
correct_answer[9].resize(1);
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseString(grdecl , parseMode));
Opm::DeckConstPtr deck(parser->parseString(grdecl , parseContext));
Opm::GridManager manager(deck);
VVI columns;
+4 -4
View File
@@ -34,7 +34,7 @@
#include <opm/core/utility/CompressedPropertyAccess.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
@@ -44,10 +44,10 @@
struct SetupSimple {
SetupSimple()
{
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
deck = parser->parseFile("compressed_gridproperty.data" , parseMode);
ecl.reset(new Opm::EclipseState(deck , parseMode));
deck = parser->parseFile("compressed_gridproperty.data" , parseContext);
ecl.reset(new Opm::EclipseState(deck , parseContext));
}
Opm::DeckConstPtr deck;
+22 -22
View File
@@ -28,7 +28,7 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
@@ -363,10 +363,10 @@ BOOST_AUTO_TEST_CASE (DeckAllDead)
{
std::shared_ptr<UnstructuredGrid>
grid(create_grid_cart3d(1, 1, 10), destroy_grid);
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseMode));
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , 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();
@@ -392,9 +392,9 @@ BOOST_AUTO_TEST_CASE (CapillaryInversion)
Opm::GridManager gm(1, 1, 40, 1.0, 1.0, 2.5);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
// Test the capillary inversion for oil-water.
@@ -446,9 +446,9 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillary)
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , 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);
@@ -487,9 +487,9 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA" , 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);
@@ -550,9 +550,9 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA" , 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);
@@ -630,9 +630,9 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA" , 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);
@@ -713,9 +713,9 @@ BOOST_AUTO_TEST_CASE (DeckWithRSVDAndRVVD)
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA", parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA", 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);
+4 -4
View File
@@ -34,7 +34,7 @@
#include <opm/parser/eclipse/Units/ConversionFactors.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
@@ -275,13 +275,13 @@ void verify_norne_oil_pvt_region2(Opm::DeckConstPtr deck, Opm::EclipseStateConst
}
BOOST_AUTO_TEST_CASE( Test_Norne_PVT) {
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
Opm::ParserPtr parser(new Parser());
std::shared_ptr<const Deck> deck;
deck = parser->parseFile("norne_pvt.data", parseMode);
deck = parser->parseFile("norne_pvt.data", parseContext);
Opm::EclipseStateConstPtr eclState(new EclipseState(deck, parseMode));
Opm::EclipseStateConstPtr eclState(new EclipseState(deck, parseContext));
verify_norne_oil_pvt_region1( deck, eclState );
verify_norne_oil_pvt_region2( deck, eclState );
+3 -3
View File
@@ -29,7 +29,7 @@
#include <boost/test/unit_test.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
@@ -42,9 +42,9 @@
BOOST_AUTO_TEST_CASE(CreateParser)
{
const std::string filename1 = "testBlackoilState1.DATA";
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile( filename1 , parseMode);
Opm::DeckConstPtr deck = parser->parseFile( filename1 , parseContext);
BOOST_CHECK_EQUAL( 6U , deck->size() );
const auto& actnum = deck->getKeyword("ACTNUM").getRecord(0).getItem(0);
+4 -4
View File
@@ -35,7 +35,7 @@
#include <opm/core/grid.h>
#include <opm/core/grid/GridManager.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
@@ -52,9 +52,9 @@ BOOST_AUTO_TEST_CASE(Processing)
{
const std::string filename="../tests/testPinch1.DATA";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
Opm::DeckConstPtr deck = parser->parseFile(filename, parseMode);
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseMode));
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::vector<double> porv = eclstate->getDoubleGridProperty("PORV")->getData();
EclipseGridConstPtr eclgrid = eclstate->getEclipseGrid();
+6 -6
View File
@@ -40,7 +40,7 @@
#include <opm/core/props/satfunc/RelpermDiagnostics.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
BOOST_AUTO_TEST_SUITE ()
@@ -50,12 +50,12 @@ BOOST_AUTO_TEST_CASE(diagnosis)
using namespace Opm;
EclipseStateConstPtr eclState;
ParserPtr parser(new Opm::Parser);
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE },
{ ParseMode::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
{ ParseMode::PARSE_RANDOM_TEXT, InputError::IGNORE}
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE },
{ ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
{ ParseContext::PARSE_RANDOM_TEXT, InputError::IGNORE}
});
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseMode));
eclState.reset(new EclipseState(deck, parseMode));
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseContext));
eclState.reset(new EclipseState(deck, parseContext));
GridManager gm(deck);
const UnstructuredGrid& grid = *gm.c_grid();
+16 -16
View File
@@ -28,7 +28,7 @@
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/core/pressure/msmfem/partition.h>
@@ -67,9 +67,9 @@ BOOST_AUTO_TEST_CASE (GwsegStandard)
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("satfuncStandard.DATA", parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("satfuncStandard.DATA", parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
const int np = 3;
@@ -153,9 +153,9 @@ BOOST_AUTO_TEST_CASE (GwsegEPSBase)
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPSBase.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPSBase.DATA" , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
const int np = 3;
@@ -238,10 +238,10 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_A)
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_A.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_A.DATA" , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
const int np = 3;
@@ -491,9 +491,9 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_C)
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_C.DATA", parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_C.DATA", parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
const int np = 3;
@@ -594,9 +594,9 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_D)
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
const UnstructuredGrid& grid = *(gm.c_grid());
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_D.DATA" , parseMode);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_D.DATA" , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
const int np = 3;
+4 -4
View File
@@ -27,7 +27,7 @@
#include <boost/test/unit_test.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/core/wells/WellsManager.hpp>
@@ -44,10 +44,10 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
{
const std::string filename = "wells_stopped.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
double target_surfacerate_inj;
+5 -5
View File
@@ -1,5 +1,5 @@
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/core/grid.h>
@@ -32,7 +32,7 @@ static DeckPtr createDeckSimConfig() {
ParserPtr parser(new Parser());
return parser->parseString(inputStr, ParseMode()) ;
return parser->parseString(inputStr, ParseContext()) ;
}
/*
@@ -42,15 +42,15 @@ static DeckPtr createDeckSimConfig() {
*/
BOOST_AUTO_TEST_CASE(CreateSimulationConfig) {
ParseMode parseMode;
ParseContext parseContext;
typedef UnstructuredGrid Grid;
DeckPtr deck = createDeckSimConfig();
EclipseState state(deck, parseMode);
EclipseState state(deck, parseContext);
EclipseGridConstPtr eclipseGrid = state.getEclipseGrid();
std::vector<double> porv = eclipseState->getDoubleGridProperty("PORV")->getData();
GridManager gridManager( eclipseState->getEclipseGrid(), porv );
const Grid& grid = *(gridManager.c_grid());
std::vector<double> threshold_pressures = thresholdPressures(parseMode, eclipseState, grid);
std::vector<double> threshold_pressures = thresholdPressures(parseContext, eclipseState, grid);
BOOST_CHECK( threshold_pressures.size() > 0 );
}
+3 -3
View File
@@ -31,7 +31,7 @@
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/core/simulator/SimulatorTimer.hpp>
#include <opm/core/utility/Units.hpp>
@@ -44,8 +44,8 @@ BOOST_AUTO_TEST_CASE(CreateTimer)
{
const std::string filename1 = "TESTTIMER.DATA";
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr parserDeck = parser->parseFile( filename1 , parseMode);
Opm::ParseContext parseContext;
Opm::DeckConstPtr parserDeck = parser->parseFile( filename1 , parseContext);
Opm::TimeMapPtr timeMap(new Opm::TimeMap(parserDeck));
Opm::SimulatorTimer simtimer;
+9 -9
View File
@@ -23,7 +23,7 @@
#include <opm/core/grid/GridManager.hpp> /* compute_geometry */
#include <opm/core/grid/cpgpreprocess/preprocess.h>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
@@ -34,7 +34,7 @@ using namespace std;
BOOST_AUTO_TEST_CASE(Equal) {
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
const std::string filename1 = "CORNERPOINT_ACTNUM.DATA";
const char *deck2Data =
"RUNSPEC\n"
@@ -54,8 +54,8 @@ BOOST_AUTO_TEST_CASE(Equal) {
"\n";
Opm::ParserPtr parser(new Opm::Parser() );
Opm::DeckConstPtr deck1 = parser->parseFile( filename1 , parseMode);
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseMode);
Opm::DeckConstPtr deck1 = parser->parseFile( filename1 , parseContext);
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseContext);
BOOST_CHECK( deck1->hasKeyword("ZCORN") );
BOOST_CHECK( deck1->hasKeyword("COORD") );
@@ -78,8 +78,8 @@ BOOST_AUTO_TEST_CASE(Equal) {
BOOST_AUTO_TEST_CASE(EqualEclipseGrid) {
const std::string filename = "CORNERPOINT_ACTNUM.DATA";
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser->parseFile( filename , parseMode);
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser->parseFile( filename , parseContext);
std::shared_ptr<const Opm::EclipseGrid> grid(new Opm::EclipseGrid(deck));
@@ -151,9 +151,9 @@ BOOST_AUTO_TEST_CASE(TOPS_Fully_Specified) {
"\n";
Opm::ParserPtr parser(new Opm::Parser() );
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck1 = parser->parseString( deck1Data , parseMode);
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseMode);
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck1 = parser->parseString( deck1Data , parseContext);
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseContext);
std::shared_ptr<const Opm::EclipseGrid> grid1(new Opm::EclipseGrid(deck1));
std::shared_ptr<const Opm::EclipseGrid> grid2(new Opm::EclipseGrid(deck2));
+4 -4
View File
@@ -29,7 +29,7 @@
#include <boost/test/unit_test.hpp>
#include <opm/core/wells/WellCollection.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
@@ -42,9 +42,9 @@ using namespace Opm;
BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
ParserPtr parser(new Parser());
std::string scheduleFile("wells_group.data");
ParseMode parseMode;
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
EclipseStateConstPtr eclipseState(new EclipseState(deck, parseMode));
ParseContext parseContext;
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
EclipseStateConstPtr eclipseState(new EclipseState(deck, parseContext));
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
GroupTreeNodePtr field=eclipseState->getSchedule()->getGroupTree(2)->getNode("FIELD");
+7 -7
View File
@@ -37,7 +37,7 @@
#include <opm/core/wells/WellsGroup.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Group.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp>
@@ -50,9 +50,9 @@ using namespace Opm;
BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
ParserPtr parser(new Parser());
std::string scheduleFile("wells_group.data");
ParseMode parseMode;
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
ParseContext parseContext;
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
std::vector<WellConstPtr> wells = eclipseState->getSchedule()->getWells();
@@ -82,10 +82,10 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
ParserPtr parser(new Parser());
ParseMode parseMode;
ParseContext parseContext;
std::string scheduleFile("wells_group.data");
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
std::vector<GroupTreeNodeConstPtr> nodes = eclipseState->getSchedule()->getGroupTree(2)->getNodes();
+202 -202
View File
@@ -29,270 +29,270 @@
#include <boost/test/unit_test.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/core/wells/WellsManager.hpp>
#include <opm/core/wells.h>
#include <opm/core/well_controls.h>
#include <opm/core/wells/WellsManager.hpp>
#include <opm/core/wells.h>
#include <opm/core/well_controls.h>
#include <opm/core/grid/GridManager.hpp>
#include <opm/core/grid/GridManager.hpp>
void wells_static_check(const Wells* wells) {
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
BOOST_CHECK_EQUAL(3 , wells->number_of_phases);
void wells_static_check(const Wells* wells) {
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
BOOST_CHECK_EQUAL(3 , wells->number_of_phases);
BOOST_CHECK_EQUAL("INJ1" , wells->name[0]);
BOOST_CHECK_EQUAL("PROD1" , wells->name[1]);
BOOST_CHECK_EQUAL("INJ1" , wells->name[0]);
BOOST_CHECK_EQUAL("PROD1" , wells->name[1]);
/* The mapping from well number into the wells->WI and wells->well_cells arrays. */
BOOST_CHECK_EQUAL(0 , wells->well_connpos[0]);
BOOST_CHECK_EQUAL(1 , wells->well_connpos[1]);
BOOST_CHECK_EQUAL(2 , wells->well_connpos[2]);
/* The mapping from well number into the wells->WI and wells->well_cells arrays. */
BOOST_CHECK_EQUAL(0 , wells->well_connpos[0]);
BOOST_CHECK_EQUAL(1 , wells->well_connpos[1]);
BOOST_CHECK_EQUAL(2 , wells->well_connpos[2]);
/* Connection factor */
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[0] , 0.001);
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[1] , 0.001);
/* Connection factor */
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[0] , 0.001);
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[1] , 0.001);
/* Completed cells */
BOOST_CHECK_EQUAL(0 , wells->well_cells[0]);
BOOST_CHECK_EQUAL(9 + 2*10 + 2*10*10 , wells->well_cells[1]);
}
/*
The number of controls is determined by looking at which elements
have been given explicit - non-default - values in the WCONxxxx
keyword. Is that at all interesting?
*/
void check_controls_epoch0( struct WellControls ** ctrls) {
// The injector
{
const struct WellControls * ctrls0 = ctrls[0];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls0)); // The number of controls for the injector == 3??
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls0 , 0) );
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2) );
// The different targets
BOOST_CHECK_EQUAL( 100.0 / 86400 , well_controls_iget_target(ctrls0,0));
BOOST_CHECK_EQUAL( 200.0 / 86400 , well_controls_iget_target(ctrls0,1));
BOOST_CHECK_EQUAL( 400 * 100000 , well_controls_iget_target(ctrls0,2));
// Which control is active
BOOST_CHECK_EQUAL( 0 , well_controls_get_current(ctrls0) );
// The phase distribution in the active target
{
const double * distr = well_controls_iget_distr( ctrls0 , 0 );
BOOST_CHECK_EQUAL( 0 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 1 , distr[2] ); // Gas
/* Completed cells */
BOOST_CHECK_EQUAL(0 , wells->well_cells[0]);
BOOST_CHECK_EQUAL(9 + 2*10 + 2*10*10 , wells->well_cells[1]);
}
}
// The producer
{
const struct WellControls * ctrls1 = ctrls[1];
BOOST_CHECK_EQUAL( 2 , well_controls_get_num( ctrls1 )); // The number of controls for the producer == 2??
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls1 , 0) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls1 , 1) );
// The different targets
BOOST_CHECK_EQUAL( -20000.0 / 86400 , well_controls_iget_target(ctrls1,0));
BOOST_CHECK_EQUAL( 1000 * 100000 , well_controls_iget_target(ctrls1,1));
/*
The number of controls is determined by looking at which elements
have been given explicit - non-default - values in the WCONxxxx
keyword. Is that at all interesting?
*/
// Which control is active
BOOST_CHECK_EQUAL( 0 , well_controls_get_current(ctrls1));
// The phase distribution in the active target
{
const double * distr = well_controls_iget_distr( ctrls1 , 0 );
BOOST_CHECK_EQUAL( 0 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 1 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
void check_controls_epoch0( struct WellControls ** ctrls) {
// The injector
{
const struct WellControls * ctrls0 = ctrls[0];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls0)); // The number of controls for the injector == 3??
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls0 , 0) );
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2) );
// The different targets
BOOST_CHECK_EQUAL( 100.0 / 86400 , well_controls_iget_target(ctrls0,0));
BOOST_CHECK_EQUAL( 200.0 / 86400 , well_controls_iget_target(ctrls0,1));
BOOST_CHECK_EQUAL( 400 * 100000 , well_controls_iget_target(ctrls0,2));
// Which control is active
BOOST_CHECK_EQUAL( 0 , well_controls_get_current(ctrls0) );
// The phase distribution in the active target
{
const double * distr = well_controls_iget_distr( ctrls0 , 0 );
BOOST_CHECK_EQUAL( 0 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 1 , distr[2] ); // Gas
}
}
// The producer
{
const struct WellControls * ctrls1 = ctrls[1];
BOOST_CHECK_EQUAL( 2 , well_controls_get_num( ctrls1 )); // The number of controls for the producer == 2??
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls1 , 0) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls1 , 1) );
// The different targets
BOOST_CHECK_EQUAL( -20000.0 / 86400 , well_controls_iget_target(ctrls1,0));
BOOST_CHECK_EQUAL( 1000 * 100000 , well_controls_iget_target(ctrls1,1));
// Which control is active
BOOST_CHECK_EQUAL( 0 , well_controls_get_current(ctrls1));
// The phase distribution in the active target
{
const double * distr = well_controls_iget_distr( ctrls1 , 0 );
BOOST_CHECK_EQUAL( 0 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 1 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
}
}
}
}
}
void check_controls_epoch1( struct WellControls ** ctrls) {
// The injector
{
const struct WellControls * ctrls0 = ctrls[0];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls0)); // The number of controls for the injector == 3??
void check_controls_epoch1( struct WellControls ** ctrls) {
// The injector
{
const struct WellControls * ctrls0 = ctrls[0];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls0)); // The number of controls for the injector == 3??
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls0 , 0 ));
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1 ));
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2 ));
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls0 , 0 ));
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1 ));
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2 ));
// The different targets
BOOST_CHECK_CLOSE( 10.0 / 86400 , well_controls_iget_target(ctrls0 , 0) , 0.001);
BOOST_CHECK_CLOSE( 20.0 / 86400 , well_controls_iget_target(ctrls0 , 1) , 0.001);
BOOST_CHECK_CLOSE( 40 * 100000 , well_controls_iget_target(ctrls0 , 2) , 0.001);
// The different targets
BOOST_CHECK_CLOSE( 10.0 / 86400 , well_controls_iget_target(ctrls0 , 0) , 0.001);
BOOST_CHECK_CLOSE( 20.0 / 86400 , well_controls_iget_target(ctrls0 , 1) , 0.001);
BOOST_CHECK_CLOSE( 40 * 100000 , well_controls_iget_target(ctrls0 , 2) , 0.001);
// Which control is active
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls0));
// Which control is active
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls0));
{
const double * distr = well_controls_iget_distr( ctrls0 , 1 );
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
{
const double * distr = well_controls_iget_distr( ctrls0 , 1 );
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
}
}
// The producer
{
const struct WellControls * ctrls1 = ctrls[1];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls1)); // The number of controls for the producer - now 3.
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls1 , 0) );
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls1 , 1) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls1 , 2) );
// The different targets
BOOST_CHECK_CLOSE( -999.0 / 86400 , well_controls_iget_target(ctrls1 , 0), 0.001);
BOOST_CHECK_CLOSE( -123.0 / 86400 , well_controls_iget_target(ctrls1 , 1), 0.001);
BOOST_CHECK_CLOSE( 100 * 100000 , well_controls_iget_target(ctrls1 , 2), 0.001);
// Which control is active
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls1) );
{
const double * distr = well_controls_iget_distr( ctrls1 , 1 );
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 1 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 1 , distr[2] ); // Gas
}
}
}
}
// The producer
{
const struct WellControls * ctrls1 = ctrls[1];
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls1)); // The number of controls for the producer - now 3.
BOOST_CHECK_EQUAL( SURFACE_RATE , well_controls_iget_type(ctrls1 , 0) );
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls1 , 1) );
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls1 , 2) );
// The different targets
BOOST_CHECK_CLOSE( -999.0 / 86400 , well_controls_iget_target(ctrls1 , 0), 0.001);
BOOST_CHECK_CLOSE( -123.0 / 86400 , well_controls_iget_target(ctrls1 , 1), 0.001);
BOOST_CHECK_CLOSE( 100 * 100000 , well_controls_iget_target(ctrls1 , 2), 0.001);
// Which control is active
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls1) );
{
const double * distr = well_controls_iget_distr( ctrls1 , 1 );
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
BOOST_CHECK_EQUAL( 1 , distr[1] ); // Oil
BOOST_CHECK_EQUAL( 1 , distr[2] ); // Gas
void check_controls_epoch3( struct WellControls ** ctrls) {
// The new producer
const struct WellControls * ctrls1 = ctrls[1];
// Note: controls include default (1 atm) BHP control.
BOOST_CHECK_EQUAL( 6 , well_controls_get_num(ctrls1));
}
}
}
void check_controls_epoch3( struct WellControls ** ctrls) {
// The new producer
const struct WellControls * ctrls1 = ctrls[1];
// Note: controls include default (1 atm) BHP control.
BOOST_CHECK_EQUAL( 6 , well_controls_get_num(ctrls1));
}
BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::GridManager gridManager(deck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
{
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
wells_static_check( wellsManager.c_wells() );
check_controls_epoch0( wellsManager.c_wells()->ctrls );
}
{
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
wells_static_check( wellsManager.c_wells() );
check_controls_epoch0( wellsManager.c_wells()->ctrls );
}
{
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
wells_static_check( wellsManager.c_wells() );
check_controls_epoch1( wellsManager.c_wells()->ctrls );
}
{
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
wells_static_check( wellsManager.c_wells() );
check_controls_epoch1( wellsManager.c_wells()->ctrls );
}
{
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
const Wells* wells = wellsManager.c_wells();
{
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
const Wells* wells = wellsManager.c_wells();
// There is 3 wells in total in the deck at the 3rd schedule step.
// PROD1 is shut and should therefore not be counted.
// The new well is therefore the secound well.
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
BOOST_CHECK_EQUAL( wells->name[0] , "INJ1");
BOOST_CHECK_EQUAL( wells->name[1] , "NEW");
// There is 3 wells in total in the deck at the 3rd schedule step.
// PROD1 is shut and should therefore not be counted.
// The new well is therefore the secound well.
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
BOOST_CHECK_EQUAL( wells->name[0] , "INJ1");
BOOST_CHECK_EQUAL( wells->name[1] , "NEW");
check_controls_epoch3( wellsManager.c_wells()->ctrls );
}
check_controls_epoch3( wellsManager.c_wells()->ctrls );
}
}
}
BOOST_AUTO_TEST_CASE(WellsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
BOOST_AUTO_TEST_CASE(WellsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::GridManager gridManager(deck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
BOOST_CHECK( wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false) );
BOOST_CHECK( !wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false) );
}
BOOST_CHECK( wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false) );
BOOST_CHECK( !wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false) );
}
BOOST_AUTO_TEST_CASE(ControlsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParseMode parseMode;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
BOOST_AUTO_TEST_CASE(ControlsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParseContext parseContext;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::GridManager gridManager(deck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
BOOST_CHECK( well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
BOOST_CHECK( well_controls_equal( wellsManager1.c_wells()->ctrls[0] , wellsManager1.c_wells()->ctrls[0] , false));
BOOST_CHECK( well_controls_equal( wellsManager1.c_wells()->ctrls[1] , wellsManager1.c_wells()->ctrls[1] , false));
BOOST_CHECK( well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
BOOST_CHECK( well_controls_equal( wellsManager1.c_wells()->ctrls[0] , wellsManager1.c_wells()->ctrls[0] , false));
BOOST_CHECK( well_controls_equal( wellsManager1.c_wells()->ctrls[1] , wellsManager1.c_wells()->ctrls[1] , false));
BOOST_CHECK( !well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[1] , false));
BOOST_CHECK( !well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( !well_controls_equal( wellsManager1.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( !well_controls_equal( wellsManager1.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
}
BOOST_CHECK( !well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[1] , false));
BOOST_CHECK( !well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( !well_controls_equal( wellsManager1.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
BOOST_CHECK( !well_controls_equal( wellsManager1.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
}
BOOST_AUTO_TEST_CASE(WellShutOK) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
BOOST_AUTO_TEST_CASE(WellShutOK) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::GridManager gridManager(deck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager2(eclipseState , 2 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager2(eclipseState , 2 , *gridManager.c_grid(), NULL);
// Shut wells are not added to the deck. i.e number of wells should be 2-1
BOOST_CHECK( wellsManager2.c_wells()->number_of_wells == 1);
// Shut wells are not added to the deck. i.e number of wells should be 2-1
BOOST_CHECK( wellsManager2.c_wells()->number_of_wells == 1);
//BOOST_CHECK_NO_THROW( Opm::WellsManager wellsManager2(eclipseState , 2 , *gridManager.c_grid(), NULL));
}
//BOOST_CHECK_NO_THROW( Opm::WellsManager wellsManager2(eclipseState , 2 , *gridManager.c_grid(), NULL));
}
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
const std::string filename = "wells_manager_data_wellSTOP.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
const std::string filename = "wells_manager_data_wellSTOP.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager(eclipseState , 0 , *gridManager.c_grid(), NULL);
+4 -4
View File
@@ -38,7 +38,7 @@
#include <opm/core/wells.h>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
@@ -252,9 +252,9 @@ BOOST_AUTO_TEST_CASE(EclipseReadWriteWellStateData)
test_work_area_type * test_area = test_work_area_alloc("EclipseReadWriteWellStateData");
Opm::Parser parser;
Opm::ParseMode parseMode;
Opm::DeckConstPtr deck = parser.parseString(input, parseMode);
Opm::EclipseStatePtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = parser.parseString(input, parseContext);
Opm::EclipseStatePtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::EclipseWriterPtr eclipseWriter = createEclipseWriter(deck, eclipseState, eclipse_data_filename);
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );
+4 -4
View File
@@ -35,7 +35,7 @@
#include <opm/core/wells.h>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
@@ -137,7 +137,7 @@ std::shared_ptr<Opm::BlackoilState> createBlackOilState(Opm::EclipseGridConstPtr
Opm::DeckConstPtr createDeck(const std::string& eclipse_data_filename) {
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr deck = parser->parseFile(eclipse_data_filename , Opm::ParseMode());
Opm::DeckConstPtr deck = parser->parseFile(eclipse_data_filename , Opm::ParseContext());
return deck;
}
@@ -170,9 +170,9 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo)
test_work_area_type * test_area = test_work_area_alloc("TEST_EclipseWriteNumWells");
test_work_area_copy_file(test_area, eclipse_data_filename.c_str());
Opm::ParseMode parseMode;
Opm::ParseContext parseContext;
Opm::DeckConstPtr deck = createDeck(eclipse_data_filename);
Opm::EclipseStatePtr eclipseState(new Opm::EclipseState(deck , parseMode));
Opm::EclipseStatePtr eclipseState(new Opm::EclipseState(deck , parseContext));
Opm::EclipseWriterPtr eclipseWriter = createEclipseWriter(deck, eclipseState, eclipse_data_filename);
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );