Renamed getXXXProperty -> getXXXGridProperty

This commit is contained in:
Joakim Hove
2014-06-02 16:23:01 +02:00
committed by Andreas Lauser
parent 40b15c59b3
commit 73d88280a5
5 changed files with 16 additions and 16 deletions

View File

@@ -107,11 +107,11 @@ namespace Opm {
/*
Observe that this will autocreate a property if it has not been explicitly added.
*/
std::shared_ptr<GridProperty<int> > EclipseState::getIntProperty( const std::string& keyword ) const {
std::shared_ptr<GridProperty<int> > EclipseState::getIntGridProperty( const std::string& keyword ) const {
return m_intGridProperties->getKeyword( keyword );
}
std::shared_ptr<GridProperty<double> > EclipseState::getDoubleProperty( const std::string& keyword ) const {
std::shared_ptr<GridProperty<double> > EclipseState::getDoubleGridProperty( const std::string& keyword ) const {
return m_doubleGridProperties->getKeyword( keyword );
}

View File

@@ -42,8 +42,8 @@ namespace Opm {
std::string getTitle() const;
bool supportsGridProperty(const std::string& keyword) const;
std::shared_ptr<GridProperty<int> > getIntProperty( const std::string& keyword ) const;
std::shared_ptr<GridProperty<double> > getDoubleProperty( const std::string& keyword ) const;
std::shared_ptr<GridProperty<int> > getIntGridProperty( const std::string& keyword ) const;
std::shared_ptr<GridProperty<double> > getDoubleGridProperty( const std::string& keyword ) const;
bool hasIntGridProperty(const std::string& keyword) const;
bool hasDoubleGridProperty(const std::string& keyword) const;

View File

@@ -112,16 +112,16 @@ public:
}
void add(T scaleFactor , std::shared_ptr<const Box> inputBox) {
void add(T shiftValue , std::shared_ptr<const Box> inputBox) {
if (inputBox->isGlobal()) {
std::transform(m_data.begin(), m_data.end(), m_data.begin(),
std::bind1st(std::plus<T>() , scaleFactor));
std::bind1st(std::plus<T>() , shiftValue));
} else {
const std::vector<size_t>& 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;
}
}
}

View File

@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(GetProperty) {
DeckPtr deck = createDeck();
EclipseState state(deck);
std::shared_ptr<GridProperty<int> > satNUM = state.getIntProperty( "SATNUM" );
std::shared_ptr<GridProperty<int> > satNUM = state.getIntGridProperty( "SATNUM" );
BOOST_CHECK_EQUAL(1000U , satNUM->size() );
for (size_t i=0; i < satNUM->size(); i++)

View File

@@ -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<GridProperty<int> > satnum = state.getIntProperty("SATNUM");
std::shared_ptr<GridProperty<int> > satnum = state.getIntGridProperty("SATNUM");
{
size_t i,j,k;
std::shared_ptr<const EclipseGrid> 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<GridProperty<int> > satnum = state.getIntProperty("SATNUM");
std::shared_ptr<GridProperty<int> > fipnum = state.getIntProperty("FIPNUM");
std::shared_ptr<GridProperty<int> > satnum = state.getIntGridProperty("SATNUM");
std::shared_ptr<GridProperty<int> > fipnum = state.getIntGridProperty("FIPNUM");
size_t i,j,k;
std::shared_ptr<const EclipseGrid> 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<GridProperty<int> > pvtnum = state.getIntProperty("PVTNUM");
std::shared_ptr<GridProperty<int> > eqlnum = state.getIntProperty("EQLNUM");
std::shared_ptr<GridProperty<int> > pvtnum = state.getIntGridProperty("PVTNUM");
std::shared_ptr<GridProperty<int> > eqlnum = state.getIntGridProperty("EQLNUM");
size_t i,j,k;
std::shared_ptr<const EclipseGrid> 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<GridProperty<double> > permx = state.getDoubleProperty("PERMX");
std::shared_ptr<GridProperty<double> > permy = state.getDoubleProperty("PERMY");
std::shared_ptr<GridProperty<double> > permz = state.getDoubleProperty("PERMZ");
std::shared_ptr<GridProperty<double> > permx = state.getDoubleGridProperty("PERMX");
std::shared_ptr<GridProperty<double> > permy = state.getDoubleGridProperty("PERMY");
std::shared_ptr<GridProperty<double> > permz = state.getDoubleGridProperty("PERMZ");
size_t i,j,k;
std::shared_ptr<const EclipseGrid> grid = state.getEclipseGrid();