rename ParseMode as ParseContext.
This commit is contained in:
parent
0a5be9ba52
commit
81f6c2dd8e
@ -18,7 +18,7 @@
|
|||||||
#include <opm/core/linalg/LinearSolverFactory.hpp>
|
#include <opm/core/linalg/LinearSolverFactory.hpp>
|
||||||
#include <opm/core/props/rock/RockCompressibility.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/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
@ -35,10 +35,10 @@ try
|
|||||||
simtimer.init(parameters);
|
simtimer.init(parameters);
|
||||||
|
|
||||||
// Read input file
|
// Read input file
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck = parser->parseFile(file_name , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile(file_name , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
std::cout << "Done!" << std::endl;
|
std::cout << "Done!" << std::endl;
|
||||||
|
|
||||||
// Setup grid
|
// Setup grid
|
||||||
@ -108,7 +108,7 @@ try
|
|||||||
|
|
||||||
|
|
||||||
TwophaseFluid fluid(incomp_properties);
|
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);
|
TransportSolver tsolver(model);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||||
#include <opm/core/utility/parameters/ParameterGroup.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/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.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::DeckConstPtr createDeck(const std::string& input_str) {
|
||||||
Opm::ParserPtr parser = std::make_shared<Opm::Parser>();
|
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;
|
return deck;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(test_EclipseWriterRFTHandler)
|
|||||||
test_area.reset(new_ptr, test_work_area_free);
|
test_area.reset(new_ptr, test_work_area_free);
|
||||||
|
|
||||||
std::shared_ptr<const Opm::Deck> deck = createDeck(deckString);
|
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>();
|
std::shared_ptr<Opm::SimulatorTimer> simulatorTimer = std::make_shared<Opm::SimulatorTimer>();
|
||||||
simulatorTimer->init(eclipseState->getSchedule()->getTimeMap());
|
simulatorTimer->init(eclipseState->getSchedule()->getTimeMap());
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <opm/core/simulator/SimulatorTimer.hpp>
|
#include <opm/core/simulator/SimulatorTimer.hpp>
|
||||||
#include <opm/core/utility/parameters/ParameterGroup.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/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||||
@ -59,14 +59,14 @@ std::shared_ptr<Opm::WellState> wellState;
|
|||||||
|
|
||||||
void createEclipseWriter(const char *deckString)
|
void createEclipseWriter(const char *deckString)
|
||||||
{
|
{
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserConstPtr parser(new Opm::Parser());
|
Opm::ParserConstPtr parser(new Opm::Parser());
|
||||||
deck = parser->parseString(deckString, parseMode);
|
deck = parser->parseString(deckString, parseContext);
|
||||||
|
|
||||||
Opm::parameter::ParameterGroup params;
|
Opm::parameter::ParameterGroup params;
|
||||||
params.insertParameter("deck_filename", "foo.data");
|
params.insertParameter("deck_filename", "foo.data");
|
||||||
|
|
||||||
eclipseState.reset(new Opm::EclipseState(deck , parseMode));
|
eclipseState.reset(new Opm::EclipseState(deck , parseContext));
|
||||||
|
|
||||||
auto eclGrid = eclipseState->getEclipseGrid();
|
auto eclGrid = eclipseState->getEclipseGrid();
|
||||||
BOOST_CHECK(eclGrid->getNX() == 3);
|
BOOST_CHECK(eclGrid->getNX() == 3);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
|
|
||||||
#if HAVE_DYNAMIC_BOOST_TEST
|
#if HAVE_DYNAMIC_BOOST_TEST
|
||||||
@ -30,12 +30,12 @@ using namespace std;
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
|
BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
|
||||||
|
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
const string filename1 = "testBlackoilState1.DATA";
|
const string filename1 = "testBlackoilState1.DATA";
|
||||||
const string filename2 = "testBlackoilState2.DATA";
|
const string filename2 = "testBlackoilState2.DATA";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck1(parser->parseFile(filename1, parseMode));
|
Opm::DeckConstPtr deck1(parser->parseFile(filename1, parseContext));
|
||||||
Opm::DeckConstPtr deck2(parser->parseFile(filename2, parseMode));
|
Opm::DeckConstPtr deck2(parser->parseFile(filename2, parseContext));
|
||||||
|
|
||||||
GridManager gridManager1(deck1);
|
GridManager gridManager1(deck1);
|
||||||
const UnstructuredGrid* grid1 = gridManager1.c_grid();
|
const UnstructuredGrid* grid1 = gridManager1.c_grid();
|
||||||
@ -56,9 +56,9 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
|
|||||||
BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
|
BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
|
||||||
|
|
||||||
const string filename = "testBlackoilState1.DATA";
|
const string filename = "testBlackoilState1.DATA";
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename, parseMode));
|
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
|
||||||
|
|
||||||
GridManager gridManager(deck);
|
GridManager gridManager(deck);
|
||||||
const UnstructuredGrid* grid = gridManager.c_grid();
|
const UnstructuredGrid* grid = gridManager.c_grid();
|
||||||
@ -77,9 +77,9 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
|
|||||||
BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
|
BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
|
||||||
|
|
||||||
const string filename = "testBlackoilState1.DATA";
|
const string filename = "testBlackoilState1.DATA";
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
|
||||||
|
|
||||||
GridManager gridManager(deck);
|
GridManager gridManager(deck);
|
||||||
const UnstructuredGrid* grid = gridManager.c_grid();
|
const UnstructuredGrid* grid = gridManager.c_grid();
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <opm/core/grid/GridManager.hpp>
|
#include <opm/core/grid/GridManager.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
@ -131,9 +131,9 @@ BOOST_AUTO_TEST_CASE(DisjointColumn)
|
|||||||
correct_answer[4].resize(1);
|
correct_answer[4].resize(1);
|
||||||
correct_answer[9].resize(1);
|
correct_answer[9].resize(1);
|
||||||
|
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck(parser->parseString(grdecl , parseMode));
|
Opm::DeckConstPtr deck(parser->parseString(grdecl , parseContext));
|
||||||
Opm::GridManager manager(deck);
|
Opm::GridManager manager(deck);
|
||||||
|
|
||||||
VVI columns;
|
VVI columns;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <opm/core/utility/CompressedPropertyAccess.hpp>
|
#include <opm/core/utility/CompressedPropertyAccess.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
|
|
||||||
@ -44,10 +44,10 @@
|
|||||||
struct SetupSimple {
|
struct SetupSimple {
|
||||||
SetupSimple()
|
SetupSimple()
|
||||||
{
|
{
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
deck = parser->parseFile("compressed_gridproperty.data" , parseMode);
|
deck = parser->parseFile("compressed_gridproperty.data" , parseContext);
|
||||||
ecl.reset(new Opm::EclipseState(deck , parseMode));
|
ecl.reset(new Opm::EclipseState(deck , parseContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
Opm::DeckConstPtr deck;
|
Opm::DeckConstPtr deck;
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||||
@ -363,10 +363,10 @@ BOOST_AUTO_TEST_CASE (DeckAllDead)
|
|||||||
{
|
{
|
||||||
std::shared_ptr<UnstructuredGrid>
|
std::shared_ptr<UnstructuredGrid>
|
||||||
grid(create_grid_cart3d(1, 1, 10), destroy_grid);
|
grid(create_grid_cart3d(1, 1, 10), destroy_grid);
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("deadfluids.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck, parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, *grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, *grid, false);
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, *grid, 10.0);
|
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, *grid, 10.0);
|
||||||
const auto& pressures = comp.press();
|
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);
|
Opm::GridManager gm(1, 1, 40, 1.0, 1.0, 2.5);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
// Test the capillary inversion for oil-water.
|
// 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);
|
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("capillary.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 10.0);
|
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);
|
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("capillary_overlap.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
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);
|
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("equil_liveoil.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
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);
|
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("equil_livegas.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
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);
|
Opm::GridManager gm(1, 1, 20, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA", parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("equil_rsvd_and_rvvd.DATA", parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, false);
|
||||||
|
|
||||||
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
Opm::EQUIL::DeckDependent::InitialStateComputer comp(props, deck, eclipseState, grid, 9.80665);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#include <opm/parser/eclipse/Units/ConversionFactors.hpp>
|
#include <opm/parser/eclipse/Units/ConversionFactors.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.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) {
|
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());
|
Opm::ParserPtr parser(new Parser());
|
||||||
|
|
||||||
std::shared_ptr<const Deck> deck;
|
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_region1( deck, eclState );
|
||||||
verify_norne_oil_pvt_region2( deck, eclState );
|
verify_norne_oil_pvt_region2( deck, eclState );
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||||
@ -42,9 +42,9 @@
|
|||||||
BOOST_AUTO_TEST_CASE(CreateParser)
|
BOOST_AUTO_TEST_CASE(CreateParser)
|
||||||
{
|
{
|
||||||
const std::string filename1 = "testBlackoilState1.DATA";
|
const std::string filename1 = "testBlackoilState1.DATA";
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
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() );
|
BOOST_CHECK_EQUAL( 6U , deck->size() );
|
||||||
const auto& actnum = deck->getKeyword("ACTNUM").getRecord(0).getItem(0);
|
const auto& actnum = deck->getKeyword("ACTNUM").getRecord(0).getItem(0);
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
#include <opm/core/grid/GridManager.hpp>
|
#include <opm/core/grid/GridManager.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
@ -52,9 +52,9 @@ BOOST_AUTO_TEST_CASE(Processing)
|
|||||||
{
|
{
|
||||||
const std::string filename="../tests/testPinch1.DATA";
|
const std::string filename="../tests/testPinch1.DATA";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
|
||||||
Opm::DeckConstPtr deck = parser->parseFile(filename, parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext);
|
||||||
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseMode));
|
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseContext));
|
||||||
std::vector<double> porv = eclstate->getDoubleGridProperty("PORV")->getData();
|
std::vector<double> porv = eclstate->getDoubleGridProperty("PORV")->getData();
|
||||||
EclipseGridConstPtr eclgrid = eclstate->getEclipseGrid();
|
EclipseGridConstPtr eclgrid = eclstate->getEclipseGrid();
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#include <opm/core/props/satfunc/RelpermDiagnostics.hpp>
|
#include <opm/core/props/satfunc/RelpermDiagnostics.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE ()
|
BOOST_AUTO_TEST_SUITE ()
|
||||||
@ -50,12 +50,12 @@ BOOST_AUTO_TEST_CASE(diagnosis)
|
|||||||
using namespace Opm;
|
using namespace Opm;
|
||||||
EclipseStateConstPtr eclState;
|
EclipseStateConstPtr eclState;
|
||||||
ParserPtr parser(new Opm::Parser);
|
ParserPtr parser(new Opm::Parser);
|
||||||
Opm::ParseMode parseMode({{ ParseMode::PARSE_RANDOM_SLASH , InputError::IGNORE },
|
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE },
|
||||||
{ ParseMode::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
|
{ ParseContext::PARSE_UNKNOWN_KEYWORD, InputError::IGNORE},
|
||||||
{ ParseMode::PARSE_RANDOM_TEXT, InputError::IGNORE}
|
{ ParseContext::PARSE_RANDOM_TEXT, InputError::IGNORE}
|
||||||
});
|
});
|
||||||
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseMode));
|
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseContext));
|
||||||
eclState.reset(new EclipseState(deck, parseMode));
|
eclState.reset(new EclipseState(deck, parseContext));
|
||||||
|
|
||||||
GridManager gm(deck);
|
GridManager gm(deck);
|
||||||
const UnstructuredGrid& grid = *gm.c_grid();
|
const UnstructuredGrid& grid = *gm.c_grid();
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
|
|
||||||
#include <opm/core/pressure/msmfem/partition.h>
|
#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);
|
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncStandard.DATA", parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("satfuncStandard.DATA", parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||||
|
|
||||||
const int np = 3;
|
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);
|
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPSBase.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPSBase.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||||
|
|
||||||
const int np = 3;
|
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);
|
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_A.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_A.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||||
|
|
||||||
const int np = 3;
|
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);
|
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_C.DATA", parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_C.DATA", parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||||
|
|
||||||
const int np = 3;
|
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);
|
Opm::GridManager gm(1, 1, 10, 1.0, 1.0, 5.0);
|
||||||
const UnstructuredGrid& grid = *(gm.c_grid());
|
const UnstructuredGrid& grid = *(gm.c_grid());
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_D.DATA" , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile("satfuncEPS_D.DATA" , parseContext);
|
||||||
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseMode));
|
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck , parseContext));
|
||||||
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
Opm::BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param, false);
|
||||||
|
|
||||||
const int np = 3;
|
const int np = 3;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
#include <opm/core/wells/WellsManager.hpp>
|
||||||
@ -44,10 +44,10 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
{
|
{
|
||||||
const std::string filename = "wells_stopped.data";
|
const std::string filename = "wells_stopped.data";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::GridManager gridManager(deck);
|
||||||
|
|
||||||
double target_surfacerate_inj;
|
double target_surfacerate_inj;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <opm/parser/eclipse/Parser/Parser.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/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
|
||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
@ -32,7 +32,7 @@ static DeckPtr createDeckSimConfig() {
|
|||||||
|
|
||||||
|
|
||||||
ParserPtr parser(new Parser());
|
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) {
|
BOOST_AUTO_TEST_CASE(CreateSimulationConfig) {
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
typedef UnstructuredGrid Grid;
|
typedef UnstructuredGrid Grid;
|
||||||
DeckPtr deck = createDeckSimConfig();
|
DeckPtr deck = createDeckSimConfig();
|
||||||
EclipseState state(deck, parseMode);
|
EclipseState state(deck, parseContext);
|
||||||
EclipseGridConstPtr eclipseGrid = state.getEclipseGrid();
|
EclipseGridConstPtr eclipseGrid = state.getEclipseGrid();
|
||||||
std::vector<double> porv = eclipseState->getDoubleGridProperty("PORV")->getData();
|
std::vector<double> porv = eclipseState->getDoubleGridProperty("PORV")->getData();
|
||||||
GridManager gridManager( eclipseState->getEclipseGrid(), porv );
|
GridManager gridManager( eclipseState->getEclipseGrid(), porv );
|
||||||
const Grid& grid = *(gridManager.c_grid());
|
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 );
|
BOOST_CHECK( threshold_pressures.size() > 0 );
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/simulator/SimulatorTimer.hpp>
|
||||||
#include <opm/core/utility/Units.hpp>
|
#include <opm/core/utility/Units.hpp>
|
||||||
|
|
||||||
@ -44,8 +44,8 @@ BOOST_AUTO_TEST_CASE(CreateTimer)
|
|||||||
{
|
{
|
||||||
const std::string filename1 = "TESTTIMER.DATA";
|
const std::string filename1 = "TESTTIMER.DATA";
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr parserDeck = parser->parseFile( filename1 , parseMode);
|
Opm::DeckConstPtr parserDeck = parser->parseFile( filename1 , parseContext);
|
||||||
|
|
||||||
Opm::TimeMapPtr timeMap(new Opm::TimeMap(parserDeck));
|
Opm::TimeMapPtr timeMap(new Opm::TimeMap(parserDeck));
|
||||||
Opm::SimulatorTimer simtimer;
|
Opm::SimulatorTimer simtimer;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <opm/core/grid/GridManager.hpp> /* compute_geometry */
|
#include <opm/core/grid/GridManager.hpp> /* compute_geometry */
|
||||||
#include <opm/core/grid/cpgpreprocess/preprocess.h>
|
#include <opm/core/grid/cpgpreprocess/preprocess.h>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
|
||||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||||
@ -34,7 +34,7 @@ using namespace std;
|
|||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(Equal) {
|
BOOST_AUTO_TEST_CASE(Equal) {
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
const std::string filename1 = "CORNERPOINT_ACTNUM.DATA";
|
const std::string filename1 = "CORNERPOINT_ACTNUM.DATA";
|
||||||
const char *deck2Data =
|
const char *deck2Data =
|
||||||
"RUNSPEC\n"
|
"RUNSPEC\n"
|
||||||
@ -54,8 +54,8 @@ BOOST_AUTO_TEST_CASE(Equal) {
|
|||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::DeckConstPtr deck1 = parser->parseFile( filename1 , parseMode);
|
Opm::DeckConstPtr deck1 = parser->parseFile( filename1 , parseContext);
|
||||||
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseMode);
|
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseContext);
|
||||||
|
|
||||||
BOOST_CHECK( deck1->hasKeyword("ZCORN") );
|
BOOST_CHECK( deck1->hasKeyword("ZCORN") );
|
||||||
BOOST_CHECK( deck1->hasKeyword("COORD") );
|
BOOST_CHECK( deck1->hasKeyword("COORD") );
|
||||||
@ -78,8 +78,8 @@ BOOST_AUTO_TEST_CASE(Equal) {
|
|||||||
BOOST_AUTO_TEST_CASE(EqualEclipseGrid) {
|
BOOST_AUTO_TEST_CASE(EqualEclipseGrid) {
|
||||||
const std::string filename = "CORNERPOINT_ACTNUM.DATA";
|
const std::string filename = "CORNERPOINT_ACTNUM.DATA";
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser->parseFile( filename , parseMode);
|
Opm::DeckConstPtr deck = parser->parseFile( filename , parseContext);
|
||||||
|
|
||||||
std::shared_ptr<const Opm::EclipseGrid> grid(new Opm::EclipseGrid(deck));
|
std::shared_ptr<const Opm::EclipseGrid> grid(new Opm::EclipseGrid(deck));
|
||||||
|
|
||||||
@ -151,9 +151,9 @@ BOOST_AUTO_TEST_CASE(TOPS_Fully_Specified) {
|
|||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
Opm::ParserPtr parser(new Opm::Parser() );
|
Opm::ParserPtr parser(new Opm::Parser() );
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck1 = parser->parseString( deck1Data , parseMode);
|
Opm::DeckConstPtr deck1 = parser->parseString( deck1Data , parseContext);
|
||||||
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseMode);
|
Opm::DeckConstPtr deck2 = parser->parseString( deck2Data , parseContext);
|
||||||
|
|
||||||
std::shared_ptr<const Opm::EclipseGrid> grid1(new Opm::EclipseGrid(deck1));
|
std::shared_ptr<const Opm::EclipseGrid> grid1(new Opm::EclipseGrid(deck1));
|
||||||
std::shared_ptr<const Opm::EclipseGrid> grid2(new Opm::EclipseGrid(deck2));
|
std::shared_ptr<const Opm::EclipseGrid> grid2(new Opm::EclipseGrid(deck2));
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
#include <opm/core/wells/WellCollection.hpp>
|
#include <opm/core/wells/WellCollection.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||||
@ -42,9 +42,9 @@ using namespace Opm;
|
|||||||
BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
||||||
ParserPtr parser(new Parser());
|
ParserPtr parser(new Parser());
|
||||||
std::string scheduleFile("wells_group.data");
|
std::string scheduleFile("wells_group.data");
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
|
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||||
EclipseStateConstPtr eclipseState(new EclipseState(deck, parseMode));
|
EclipseStateConstPtr eclipseState(new EclipseState(deck, parseContext));
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
|
||||||
GroupTreeNodePtr field=eclipseState->getSchedule()->getGroupTree(2)->getNode("FIELD");
|
GroupTreeNodePtr field=eclipseState->getSchedule()->getGroupTree(2)->getNode("FIELD");
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include <opm/core/wells/WellsGroup.hpp>
|
#include <opm/core/wells/WellsGroup.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Group.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/GroupTree.hpp>
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ using namespace Opm;
|
|||||||
BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
||||||
ParserPtr parser(new Parser());
|
ParserPtr parser(new Parser());
|
||||||
std::string scheduleFile("wells_group.data");
|
std::string scheduleFile("wells_group.data");
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
|
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||||
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
|
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
|
||||||
std::vector<WellConstPtr> wells = eclipseState->getSchedule()->getWells();
|
std::vector<WellConstPtr> wells = eclipseState->getSchedule()->getWells();
|
||||||
@ -82,10 +82,10 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
|||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
||||||
ParserPtr parser(new Parser());
|
ParserPtr parser(new Parser());
|
||||||
ParseMode parseMode;
|
ParseContext parseContext;
|
||||||
std::string scheduleFile("wells_group.data");
|
std::string scheduleFile("wells_group.data");
|
||||||
DeckConstPtr deck = parser->parseFile(scheduleFile, parseMode);
|
DeckConstPtr deck = parser->parseFile(scheduleFile, parseContext);
|
||||||
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseMode));
|
EclipseStateConstPtr eclipseState(new EclipseState(deck , parseContext));
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
|
||||||
std::vector<GroupTreeNodeConstPtr> nodes = eclipseState->getSchedule()->getGroupTree(2)->getNodes();
|
std::vector<GroupTreeNodeConstPtr> nodes = eclipseState->getSchedule()->getGroupTree(2)->getNodes();
|
||||||
|
@ -29,270 +29,270 @@
|
|||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
#include <opm/core/wells/WellsManager.hpp>
|
||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
#include <opm/core/well_controls.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) {
|
void wells_static_check(const Wells* wells) {
|
||||||
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
|
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
|
||||||
BOOST_CHECK_EQUAL(3 , wells->number_of_phases);
|
BOOST_CHECK_EQUAL(3 , wells->number_of_phases);
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL("INJ1" , wells->name[0]);
|
BOOST_CHECK_EQUAL("INJ1" , wells->name[0]);
|
||||||
BOOST_CHECK_EQUAL("PROD1" , wells->name[1]);
|
BOOST_CHECK_EQUAL("PROD1" , wells->name[1]);
|
||||||
|
|
||||||
/* The mapping from well number into the wells->WI and wells->well_cells arrays. */
|
/* 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(0 , wells->well_connpos[0]);
|
||||||
BOOST_CHECK_EQUAL(1 , wells->well_connpos[1]);
|
BOOST_CHECK_EQUAL(1 , wells->well_connpos[1]);
|
||||||
BOOST_CHECK_EQUAL(2 , wells->well_connpos[2]);
|
BOOST_CHECK_EQUAL(2 , wells->well_connpos[2]);
|
||||||
|
|
||||||
/* Connection factor */
|
/* Connection factor */
|
||||||
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[0] , 0.001);
|
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[0] , 0.001);
|
||||||
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[1] , 0.001);
|
BOOST_CHECK_CLOSE(1.2279166666666664e-12 , wells->WI[1] , 0.001);
|
||||||
|
|
||||||
/* Completed cells */
|
/* Completed cells */
|
||||||
BOOST_CHECK_EQUAL(0 , wells->well_cells[0]);
|
BOOST_CHECK_EQUAL(0 , wells->well_cells[0]);
|
||||||
BOOST_CHECK_EQUAL(9 + 2*10 + 2*10*10 , wells->well_cells[1]);
|
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
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 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));
|
The number of controls is determined by looking at which elements
|
||||||
BOOST_CHECK_EQUAL( 1000 * 100000 , well_controls_iget_target(ctrls1,1));
|
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
|
void check_controls_epoch0( struct WellControls ** ctrls) {
|
||||||
{
|
// The injector
|
||||||
const double * distr = well_controls_iget_distr( ctrls1 , 0 );
|
{
|
||||||
BOOST_CHECK_EQUAL( 0 , distr[0] ); // Water
|
const struct WellControls * ctrls0 = ctrls[0];
|
||||||
BOOST_CHECK_EQUAL( 1 , distr[1] ); // Oil
|
BOOST_CHECK_EQUAL( 3 , well_controls_get_num(ctrls0)); // The number of controls for the injector == 3??
|
||||||
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
|
|
||||||
|
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) {
|
void check_controls_epoch1( struct WellControls ** ctrls) {
|
||||||
// The injector
|
// The injector
|
||||||
{
|
{
|
||||||
const struct WellControls * ctrls0 = ctrls[0];
|
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( 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( SURFACE_RATE , well_controls_iget_type(ctrls0 , 0 ));
|
||||||
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1 ));
|
BOOST_CHECK_EQUAL( RESERVOIR_RATE , well_controls_iget_type(ctrls0 , 1 ));
|
||||||
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2 ));
|
BOOST_CHECK_EQUAL( BHP , well_controls_iget_type(ctrls0 , 2 ));
|
||||||
|
|
||||||
// The different targets
|
// The different targets
|
||||||
BOOST_CHECK_CLOSE( 10.0 / 86400 , well_controls_iget_target(ctrls0 , 0) , 0.001);
|
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( 20.0 / 86400 , well_controls_iget_target(ctrls0 , 1) , 0.001);
|
||||||
BOOST_CHECK_CLOSE( 40 * 100000 , well_controls_iget_target(ctrls0 , 2) , 0.001);
|
BOOST_CHECK_CLOSE( 40 * 100000 , well_controls_iget_target(ctrls0 , 2) , 0.001);
|
||||||
|
|
||||||
// Which control is active
|
// Which control is active
|
||||||
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls0));
|
BOOST_CHECK_EQUAL( 1 , well_controls_get_current(ctrls0));
|
||||||
|
|
||||||
{
|
{
|
||||||
const double * distr = well_controls_iget_distr( ctrls0 , 1 );
|
const double * distr = well_controls_iget_distr( ctrls0 , 1 );
|
||||||
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
|
BOOST_CHECK_EQUAL( 1 , distr[0] ); // Water
|
||||||
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
|
BOOST_CHECK_EQUAL( 0 , distr[1] ); // Oil
|
||||||
BOOST_CHECK_EQUAL( 0 , distr[2] ); // Gas
|
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
|
void check_controls_epoch3( struct WellControls ** ctrls) {
|
||||||
BOOST_CHECK_CLOSE( -999.0 / 86400 , well_controls_iget_target(ctrls1 , 0), 0.001);
|
// The new producer
|
||||||
BOOST_CHECK_CLOSE( -123.0 / 86400 , well_controls_iget_target(ctrls1 , 1), 0.001);
|
const struct WellControls * ctrls1 = ctrls[1];
|
||||||
BOOST_CHECK_CLOSE( 100 * 100000 , well_controls_iget_target(ctrls1 , 2), 0.001);
|
// Note: controls include default (1 atm) BHP control.
|
||||||
|
BOOST_CHECK_EQUAL( 6 , well_controls_get_num(ctrls1));
|
||||||
// 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));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
||||||
|
|
||||||
const std::string filename = "wells_manager_data.data";
|
const std::string filename = "wells_manager_data.data";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::GridManager gridManager(deck);
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
|
||||||
wells_static_check( wellsManager.c_wells() );
|
wells_static_check( wellsManager.c_wells() );
|
||||||
check_controls_epoch0( wellsManager.c_wells()->ctrls );
|
check_controls_epoch0( wellsManager.c_wells()->ctrls );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid(), NULL);
|
||||||
wells_static_check( wellsManager.c_wells() );
|
wells_static_check( wellsManager.c_wells() );
|
||||||
check_controls_epoch1( wellsManager.c_wells()->ctrls );
|
check_controls_epoch1( wellsManager.c_wells()->ctrls );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid(), NULL);
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
|
|
||||||
// There is 3 wells in total in the deck at the 3rd schedule step.
|
// There is 3 wells in total in the deck at the 3rd schedule step.
|
||||||
// PROD1 is shut and should therefore not be counted.
|
// PROD1 is shut and should therefore not be counted.
|
||||||
// The new well is therefore the secound well.
|
// The new well is therefore the secound well.
|
||||||
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
|
BOOST_CHECK_EQUAL(2 , wells->number_of_wells);
|
||||||
BOOST_CHECK_EQUAL( wells->name[0] , "INJ1");
|
BOOST_CHECK_EQUAL( wells->name[0] , "INJ1");
|
||||||
BOOST_CHECK_EQUAL( wells->name[1] , "NEW");
|
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) {
|
BOOST_AUTO_TEST_CASE(WellsEqual) {
|
||||||
const std::string filename = "wells_manager_data.data";
|
const std::string filename = "wells_manager_data.data";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::GridManager gridManager(deck);
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
||||||
Opm::WellsManager wellsManager1(eclipseState , 1 , *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() , wellsManager0.c_wells(),false) );
|
||||||
BOOST_CHECK( !wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false) );
|
BOOST_CHECK( !wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
||||||
const std::string filename = "wells_manager_data.data";
|
const std::string filename = "wells_manager_data.data";
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::GridManager gridManager(deck);
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
||||||
Opm::WellsManager wellsManager1(eclipseState , 1 , *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[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( 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[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( 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[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( 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[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( wellsManager1.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(WellShutOK) {
|
BOOST_AUTO_TEST_CASE(WellShutOK) {
|
||||||
const std::string filename = "wells_manager_data.data";
|
const std::string filename = "wells_manager_data.data";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::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
|
// 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( 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) {
|
BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
||||||
const std::string filename = "wells_manager_data_wellSTOP.data";
|
const std::string filename = "wells_manager_data_wellSTOP.data";
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
Opm::ParserPtr parser(new Opm::Parser());
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck(parser->parseFile(filename , parseMode));
|
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::GridManager gridManager(deck);
|
||||||
|
|
||||||
Opm::WellsManager wellsManager(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
Opm::WellsManager wellsManager(eclipseState , 0 , *gridManager.c_grid(), NULL);
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.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");
|
test_work_area_type * test_area = test_work_area_alloc("EclipseReadWriteWellStateData");
|
||||||
|
|
||||||
Opm::Parser parser;
|
Opm::Parser parser;
|
||||||
Opm::ParseMode parseMode;
|
Opm::ParseContext parseContext;
|
||||||
Opm::DeckConstPtr deck = parser.parseString(input, parseMode);
|
Opm::DeckConstPtr deck = parser.parseString(input, parseContext);
|
||||||
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);
|
Opm::EclipseWriterPtr eclipseWriter = createEclipseWriter(deck, eclipseState, eclipse_data_filename);
|
||||||
|
|
||||||
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );
|
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.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/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/CompletionSet.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.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::DeckConstPtr createDeck(const std::string& eclipse_data_filename) {
|
||||||
Opm::ParserPtr parser(new Opm::Parser());
|
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;
|
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_type * test_area = test_work_area_alloc("TEST_EclipseWriteNumWells");
|
||||||
test_work_area_copy_file(test_area, eclipse_data_filename.c_str());
|
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::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);
|
Opm::EclipseWriterPtr eclipseWriter = createEclipseWriter(deck, eclipseState, eclipse_data_filename);
|
||||||
|
|
||||||
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );
|
std::shared_ptr<Opm::SimulatorTimer> simTimer( new Opm::SimulatorTimer() );
|
||||||
|
Loading…
Reference in New Issue
Block a user