rename all "newParserDeck" objects to "deck"

The "new" parser is now "the" parser...
This commit is contained in:
Andreas Lauser
2014-04-26 12:03:07 +02:00
parent 720acacad3
commit f96417e81c
34 changed files with 465 additions and 466 deletions

View File

@@ -36,7 +36,7 @@ using namespace Opm;
using namespace std;
std::vector<std::shared_ptr<SinglePvtInterface> > getProps(Opm::DeckConstPtr newParserDeck,PhaseUsage phase_usage_){
std::vector<std::shared_ptr<SinglePvtInterface> > getProps(Opm::DeckConstPtr deck,PhaseUsage phase_usage_){
enum PhaseIndex { Aqua = 0, Liquid = 1, Vapour = 2 };
@@ -49,8 +49,8 @@ std::vector<std::shared_ptr<SinglePvtInterface> > getProps(Opm::DeckConstPtr new
// Water PVT
if (phase_usage_.phase_used[Aqua]) {
if (newParserDeck->hasKeyword("PVTW")) {
Opm::PvtwTable pvtwTable(newParserDeck->getKeyword("PVTW"));
if (deck->hasKeyword("PVTW")) {
Opm::PvtwTable pvtwTable(deck->getKeyword("PVTW"));
props_[phase_usage_.phase_pos[Aqua]].reset(new SinglePvtConstCompr(pvtwTable));
} else {
// Eclipse 100 default.
@@ -60,19 +60,19 @@ std::vector<std::shared_ptr<SinglePvtInterface> > getProps(Opm::DeckConstPtr new
// Oil PVT
if (phase_usage_.phase_used[Liquid]) {
if (newParserDeck->hasKeyword("PVDO")) {
Opm::PvdoTable pvdoTable(newParserDeck->getKeyword("PVDO"));
if (deck->hasKeyword("PVDO")) {
Opm::PvdoTable pvdoTable(deck->getKeyword("PVDO"));
if (samples > 0) {
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtDeadSpline(pvdoTable, samples));
} else {
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtDead(pvdoTable));
}
} else if (newParserDeck->hasKeyword("PVTO")) {
Opm::PvtoTable pvtoTable(newParserDeck->getKeyword("PVTO"), /*tableIdx=*/0);
} else if (deck->hasKeyword("PVTO")) {
Opm::PvtoTable pvtoTable(deck->getKeyword("PVTO"), /*tableIdx=*/0);
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtLiveOil(pvtoTable));
} else if (newParserDeck->hasKeyword("PVCDO")) {
Opm::PvcdoTable pvcdoTable(newParserDeck->getKeyword("PVCDO"), /*tableIdx=*/0);
} else if (deck->hasKeyword("PVCDO")) {
Opm::PvcdoTable pvcdoTable(deck->getKeyword("PVCDO"), /*tableIdx=*/0);
props_[phase_usage_.phase_pos[Liquid]].reset(new SinglePvtConstCompr(pvcdoTable));
} else {
@@ -81,16 +81,16 @@ std::vector<std::shared_ptr<SinglePvtInterface> > getProps(Opm::DeckConstPtr new
}
// Gas PVT
if (phase_usage_.phase_used[Vapour]) {
if (newParserDeck->hasKeyword("PVDG")) {
Opm::PvdgTable pvdgTable(newParserDeck->getKeyword("PVDG"));
if (deck->hasKeyword("PVDG")) {
Opm::PvdgTable pvdgTable(deck->getKeyword("PVDG"));
if (samples > 0) {
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDeadSpline(pvdgTable, samples));
} else {
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtDead(pvdgTable));
}
} else if (newParserDeck->hasKeyword("PVTG")) {
Opm::PvtgTable pvtgTable(newParserDeck->getKeyword("PVTG"), /*tableIdx=*/0);
} else if (deck->hasKeyword("PVTG")) {
Opm::PvtgTable pvtgTable(deck->getKeyword("PVTG"), /*tableIdx=*/0);
props_[phase_usage_.phase_pos[Vapour]].reset(new SinglePvtLiveGas(pvtgTable));
} else {
@@ -232,11 +232,11 @@ BOOST_AUTO_TEST_CASE(test_liveoil)
const std::string filename = "liveoil.DATA";
cout << "Reading deck: " << filename << endl;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
// setup pvt interface
PhaseUsage phase_usage_ = phaseUsageFromDeck(newParserDeck);
std::vector<std::shared_ptr<SinglePvtInterface> > props_ = getProps(newParserDeck,phase_usage_);
PhaseUsage phase_usage_ = phaseUsageFromDeck(deck);
std::vector<std::shared_ptr<SinglePvtInterface> > props_ = getProps(deck,phase_usage_);
// setup a test case. We will check 6 [p,r] pairs and compare them to both the [p,z] interface and a finite difference
@@ -307,11 +307,11 @@ BOOST_AUTO_TEST_CASE(test_wetgas)
const std::string filename = "wetgas.DATA";
cout << "Reading deck: " << filename << endl;
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
// setup pvt interface
PhaseUsage phase_usage_ = phaseUsageFromDeck(newParserDeck);
std::vector<std::shared_ptr<SinglePvtInterface> > props_ = getProps(newParserDeck,phase_usage_);
PhaseUsage phase_usage_ = phaseUsageFromDeck(deck);
std::vector<std::shared_ptr<SinglePvtInterface> > props_ = getProps(deck,phase_usage_);
// setup a test case. We will check 6 [p,r] pairs and compare them to both the [p,z] interface and a finite difference

View File

@@ -32,12 +32,12 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentDeckReturnFalse) {
const string filename1 = "testBlackoilState1.DATA";
const string filename2 = "testBlackoilState2.DATA";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck1(parser->parseFile(filename1));
Opm::DeckConstPtr newParserDeck2(parser->parseFile(filename2));
Opm::DeckConstPtr deck1(parser->parseFile(filename1));
Opm::DeckConstPtr deck2(parser->parseFile(filename2));
GridManager gridManager1(newParserDeck1);
GridManager gridManager1(deck1);
const UnstructuredGrid* grid1 = gridManager1.c_grid();
GridManager gridManager2(newParserDeck2);
GridManager gridManager2(deck2);
const UnstructuredGrid* grid2 = gridManager2.c_grid();
BlackoilState state1;
@@ -55,9 +55,9 @@ BOOST_AUTO_TEST_CASE(EqualsDifferentNumPhasesReturnFalse) {
const string filename = "testBlackoilState1.DATA";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
GridManager gridManager(newParserDeck);
GridManager gridManager(deck);
const UnstructuredGrid* grid = gridManager.c_grid();
BlackoilState state1;
@@ -75,9 +75,9 @@ BOOST_AUTO_TEST_CASE(EqualsNumericalDifferenceReturnFalse) {
const string filename = "testBlackoilState1.DATA";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
GridManager gridManager(newParserDeck);
GridManager gridManager(deck);
const UnstructuredGrid* grid = gridManager.c_grid();
BlackoilState state1;

View File

@@ -131,9 +131,9 @@ BOOST_AUTO_TEST_CASE(DisjointColumn)
correct_answer[9].resize(1);
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseString(grdecl));
Opm::DeckConstPtr deck(parser->parseString(grdecl));
Opm::GridManager manager(newParserDeck);
Opm::GridManager manager(deck);
VVI columns;
Opm::extractColumn(*manager.c_grid(), columns);

View File

@@ -176,10 +176,10 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(newParserDeck));
Opm::GridManager gridManager(newParserDeck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::GridManager gridManager(deck);
{
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid(), NULL);
@@ -199,10 +199,10 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
BOOST_AUTO_TEST_CASE(WellsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(newParserDeck));
Opm::GridManager gridManager(newParserDeck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
@@ -215,10 +215,10 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
BOOST_AUTO_TEST_CASE(ControlsEqual) {
const std::string filename = "wells_manager_data.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(newParserDeck));
Opm::GridManager gridManager(newParserDeck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::GridManager gridManager(deck);
Opm::WellsManager wellsManager0(eclipseState , 0 , *gridManager.c_grid(), NULL);
Opm::WellsManager wellsManager1(eclipseState , 1 , *gridManager.c_grid(), NULL);
@@ -239,10 +239,10 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
BOOST_AUTO_TEST_CASE(WellHasSTOP_ExceptionIsThrown) {
const std::string filename = "wells_manager_data_wellSTOP.data";
Opm::ParserPtr parser(new Opm::Parser());
Opm::DeckConstPtr newParserDeck(parser->parseFile(filename));
Opm::DeckConstPtr deck(parser->parseFile(filename));
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(newParserDeck));
Opm::GridManager gridManager(newParserDeck);
Opm::EclipseStateConstPtr eclipseState(new Opm::EclipseState(deck));
Opm::GridManager gridManager(deck);
BOOST_CHECK_THROW( new Opm::WellsManager(eclipseState, 0, *gridManager.c_grid(), NULL), std::runtime_error );
}