From 73d88280a533bb0165f4eef95992cb8f6c7b0f0a Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 2 Jun 2014 16:23:01 +0200 Subject: [PATCH] Renamed getXXXProperty -> getXXXGridProperty --- opm/parser/eclipse/EclipseState/EclipseState.cpp | 4 ++-- opm/parser/eclipse/EclipseState/EclipseState.hpp | 4 ++-- .../eclipse/EclipseState/Grid/GridProperty.hpp | 6 +++--- .../EclipseState/tests/EclipseStateTests.cpp | 2 +- opm/parser/eclipse/IntegrationTests/BoxTest.cpp | 16 ++++++++-------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/opm/parser/eclipse/EclipseState/EclipseState.cpp b/opm/parser/eclipse/EclipseState/EclipseState.cpp index 3cea1ce78..f1174ea36 100644 --- a/opm/parser/eclipse/EclipseState/EclipseState.cpp +++ b/opm/parser/eclipse/EclipseState/EclipseState.cpp @@ -107,11 +107,11 @@ namespace Opm { /* Observe that this will autocreate a property if it has not been explicitly added. */ - std::shared_ptr > EclipseState::getIntProperty( const std::string& keyword ) const { + std::shared_ptr > EclipseState::getIntGridProperty( const std::string& keyword ) const { return m_intGridProperties->getKeyword( keyword ); } - std::shared_ptr > EclipseState::getDoubleProperty( const std::string& keyword ) const { + std::shared_ptr > EclipseState::getDoubleGridProperty( const std::string& keyword ) const { return m_doubleGridProperties->getKeyword( keyword ); } diff --git a/opm/parser/eclipse/EclipseState/EclipseState.hpp b/opm/parser/eclipse/EclipseState/EclipseState.hpp index fa0d3204e..d89410607 100644 --- a/opm/parser/eclipse/EclipseState/EclipseState.hpp +++ b/opm/parser/eclipse/EclipseState/EclipseState.hpp @@ -42,8 +42,8 @@ namespace Opm { std::string getTitle() const; bool supportsGridProperty(const std::string& keyword) const; - std::shared_ptr > getIntProperty( const std::string& keyword ) const; - std::shared_ptr > getDoubleProperty( const std::string& keyword ) const; + std::shared_ptr > getIntGridProperty( const std::string& keyword ) const; + std::shared_ptr > getDoubleGridProperty( const std::string& keyword ) const; bool hasIntGridProperty(const std::string& keyword) const; bool hasDoubleGridProperty(const std::string& keyword) const; diff --git a/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp b/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp index fd3afa3a8..160e24b6b 100644 --- a/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp +++ b/opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp @@ -112,16 +112,16 @@ public: } - void add(T scaleFactor , std::shared_ptr inputBox) { + void add(T shiftValue , std::shared_ptr inputBox) { if (inputBox->isGlobal()) { std::transform(m_data.begin(), m_data.end(), m_data.begin(), - std::bind1st(std::plus() , scaleFactor)); + std::bind1st(std::plus() , shiftValue)); } else { const std::vector& indexList = inputBox->getIndexList(); for (size_t i = 0; i < indexList.size(); i++) { size_t targetIndex = indexList[i]; - m_data[targetIndex] += scaleFactor; + m_data[targetIndex] += shiftValue; } } } diff --git a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp index 80be7fdbb..6732ca324 100644 --- a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp +++ b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp @@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(GetProperty) { DeckPtr deck = createDeck(); EclipseState state(deck); - std::shared_ptr > satNUM = state.getIntProperty( "SATNUM" ); + std::shared_ptr > satNUM = state.getIntGridProperty( "SATNUM" ); BOOST_CHECK_EQUAL(1000U , satNUM->size() ); for (size_t i=0; i < satNUM->size(); i++) diff --git a/opm/parser/eclipse/IntegrationTests/BoxTest.cpp b/opm/parser/eclipse/IntegrationTests/BoxTest.cpp index afb668f47..bcccb0564 100644 --- a/opm/parser/eclipse/IntegrationTests/BoxTest.cpp +++ b/opm/parser/eclipse/IntegrationTests/BoxTest.cpp @@ -41,7 +41,7 @@ EclipseState makeState(const std::string& fileName) { BOOST_AUTO_TEST_CASE( PARSE_BOX_OK ) { EclipseState state = makeState("testdata/integration_tests/BOX/BOXTEST1"); - std::shared_ptr > satnum = state.getIntProperty("SATNUM"); + std::shared_ptr > satnum = state.getIntGridProperty("SATNUM"); { size_t i,j,k; std::shared_ptr grid = state.getEclipseGrid(); @@ -65,8 +65,8 @@ BOOST_AUTO_TEST_CASE( PARSE_BOX_OK ) { BOOST_AUTO_TEST_CASE( PARSE_MULTIPLY_COPY ) { EclipseState state = makeState("testdata/integration_tests/BOX/BOXTEST1"); - std::shared_ptr > satnum = state.getIntProperty("SATNUM"); - std::shared_ptr > fipnum = state.getIntProperty("FIPNUM"); + std::shared_ptr > satnum = state.getIntGridProperty("SATNUM"); + std::shared_ptr > fipnum = state.getIntGridProperty("FIPNUM"); size_t i,j,k; std::shared_ptr grid = state.getEclipseGrid(); @@ -92,8 +92,8 @@ BOOST_AUTO_TEST_CASE( INCOMPLETE_KEYWORD_BOX) { BOOST_AUTO_TEST_CASE( EQUAL ) { EclipseState state = makeState("testdata/integration_tests/BOX/BOXTEST1"); - std::shared_ptr > pvtnum = state.getIntProperty("PVTNUM"); - std::shared_ptr > eqlnum = state.getIntProperty("EQLNUM"); + std::shared_ptr > pvtnum = state.getIntGridProperty("PVTNUM"); + std::shared_ptr > eqlnum = state.getIntGridProperty("EQLNUM"); size_t i,j,k; std::shared_ptr grid = state.getEclipseGrid(); @@ -113,9 +113,9 @@ BOOST_AUTO_TEST_CASE( EQUAL ) { BOOST_AUTO_TEST_CASE( PERMX ) { EclipseState state = makeState("testdata/integration_tests/BOX/BOXTEST1"); - std::shared_ptr > permx = state.getDoubleProperty("PERMX"); - std::shared_ptr > permy = state.getDoubleProperty("PERMY"); - std::shared_ptr > permz = state.getDoubleProperty("PERMZ"); + std::shared_ptr > permx = state.getDoubleGridProperty("PERMX"); + std::shared_ptr > permy = state.getDoubleGridProperty("PERMY"); + std::shared_ptr > permz = state.getDoubleGridProperty("PERMZ"); size_t i,j,k; std::shared_ptr grid = state.getEclipseGrid();