Merge pull request #1059 from joakim-hove/create-eclipsegrid

Create eclipsegrid
This commit is contained in:
Joakim Hove 2016-09-07 11:11:10 +02:00 committed by GitHub
commit 419764585f
7 changed files with 13 additions and 13 deletions

View File

@ -92,7 +92,7 @@ try
Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseContext); Opm::DeckConstPtr deck = parser->parseFile(deck_filename , parseContext);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
const double grav = param.getDefault("gravity", unit::gravity); const double grav = param.getDefault("gravity", unit::gravity);
GridManager gm(eclipseState->getInputGrid()); GridManager gm(*eclipseState->getInputGrid());
const UnstructuredGrid& grid = *gm.c_grid(); const UnstructuredGrid& grid = *gm.c_grid();
BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param); BlackoilPropertiesFromDeck props(deck, eclipseState, grid, param);
warnIfUnusedParams(param); warnIfUnusedParams(param);

View File

@ -78,7 +78,7 @@ try
Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(eclipseFilename, parseContext));
eclState.reset(new EclipseState(*deck, parseContext)); eclState.reset(new EclipseState(*deck, parseContext));
GridManager gm(eclState->getInputGrid()); GridManager gm(*eclState->getInputGrid());
const UnstructuredGrid& grid = *gm.c_grid(); const UnstructuredGrid& grid = *gm.c_grid();
using boost::filesystem::path; using boost::filesystem::path;
path fpath(eclipseFilename); path fpath(eclipseFilename);

View File

@ -48,10 +48,10 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
const auto es2 = Opm::Parser::parse(filename2); const auto es2 = Opm::Parser::parse(filename2);
auto eg2 = es2.getInputGrid(); auto eg2 = es2.getInputGrid();
GridManager gridManager1(eg1); GridManager gridManager1(*eg1);
const UnstructuredGrid& grid1 = *gridManager1.c_grid(); const UnstructuredGrid& grid1 = *gridManager1.c_grid();
GridManager gridManager2(eg2); GridManager gridManager2(*eg2);
const UnstructuredGrid& grid2 = *gridManager2.c_grid(); const UnstructuredGrid& grid2 = *gridManager2.c_grid();
BlackoilState state1( UgGridHelpers::numCells( grid1 ) , UgGridHelpers::numFaces( grid1 ) , 3); BlackoilState state1( UgGridHelpers::numCells( grid1 ) , UgGridHelpers::numFaces( grid1 ) , 3);
@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
std::vector<int> actnum = get_testBlackoilStateActnum(); std::vector<int> actnum = get_testBlackoilStateActnum();
eg->resetACTNUM(actnum.data()); eg->resetACTNUM(actnum.data());
GridManager gridManager(eg); GridManager gridManager(*eg);
const UnstructuredGrid& grid = *gridManager.c_grid(); const UnstructuredGrid& grid = *gridManager.c_grid();
BlackoilState state1( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3); BlackoilState state1( UgGridHelpers::numCells( grid ) , UgGridHelpers::numFaces( grid ) , 3);

View File

@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE(Processing)
const int nc_initial = eclgrid->getNumActive(); const int nc_initial = eclgrid->getNumActive();
Opm::GridManager gridM(eclgrid, porv); Opm::GridManager gridM(*eclgrid, porv);
typedef UnstructuredGrid Grid; typedef UnstructuredGrid Grid;
const Grid& grid = *(gridM.c_grid()); const Grid& grid = *(gridM.c_grid());
const int* global_cell = Opm::UgGridHelpers::globalCell(grid); const int* global_cell = Opm::UgGridHelpers::globalCell(grid);

View File

@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(diagnosis)
}); });
Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseContext)); Opm::DeckConstPtr deck(parser->parseFile("../tests/relpermDiagnostics.DATA", parseContext));
eclState.reset(new EclipseState(*deck, parseContext)); eclState.reset(new EclipseState(*deck, parseContext));
GridManager gm(eclState->getInputGrid()); GridManager gm(*eclState->getInputGrid());
const UnstructuredGrid& grid = *gm.c_grid(); const UnstructuredGrid& grid = *gm.c_grid();
std::shared_ptr<CounterLog> counterLog = std::make_shared<CounterLog>(Log::DefaultMessageTypes); std::shared_ptr<CounterLog> counterLog = std::make_shared<CounterLog>(Log::DefaultMessageTypes);
OpmLog::addBackend( "COUNTERLOG" , counterLog ); OpmLog::addBackend( "COUNTERLOG" , counterLog );

View File

@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename , parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck , parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
double target_surfacerate_inj; double target_surfacerate_inj;
double target_surfacerate_prod; double target_surfacerate_prod;

View File

@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
{ {
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL); Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
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);
@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
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);
@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
Opm::WellsManager wellsManager2(eclipseState, 2, *gridManager.c_grid(), NULL); Opm::WellsManager wellsManager2(eclipseState, 2, *gridManager.c_grid(), NULL);
@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext)); Opm::DeckConstPtr deck(parser->parseFile(filename, parseContext));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext)); Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(*deck, parseContext));
Opm::GridManager gridManager(eclipseState->getInputGrid()); Opm::GridManager gridManager(*eclipseState->getInputGrid());
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL); Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);