Change Deck access methods/types to references

opm-parser#677 changes the return types for the Deck family of classes.
This patch fixes all broken code from that patch set.

https://github.com/OPM/opm-parser/pull/677
This commit is contained in:
Jørgen Kvalsvik
2016-02-09 14:36:12 +01:00
committed by lycantrophe
parent 6f3c4fb618
commit 04d605159f
8 changed files with 65 additions and 65 deletions

View File

@@ -60,16 +60,16 @@ namespace Opm
transmult_ = rocktabTable.getColumn("PV_MULT_TRANX").vectorCopy();
}
} else if (deck->hasKeyword("ROCK")) {
Opm::DeckKeywordConstPtr rockKeyword = deck->getKeyword("ROCK");
if (rockKeyword->size() != 1) {
const auto& rockKeyword = deck->getKeyword("ROCK");
if (rockKeyword.size() != 1) {
// here it would be better not to use std::cout directly but to add the
// warning to some "warning list"...
std::cout << "Can only handle a single region in ROCK ("<<rockKeyword->size()<<" regions specified)."
std::cout << "Can only handle a single region in ROCK ("<<rockKeyword.size()<<" regions specified)."
<< " Ignoring all except for the first.\n";
}
pref_ = rockKeyword->getRecord(0)->getItem("PREF")->getSIDouble(0);
rock_comp_ = rockKeyword->getRecord(0)->getItem("COMPRESSIBILITY")->getSIDouble(0);
pref_ = rockKeyword.getRecord(0).getItem("PREF").getSIDouble(0);
rock_comp_ = rockKeyword.getRecord(0).getItem("COMPRESSIBILITY").getSIDouble(0);
} else {
std::cout << "**** warning: no rock compressibility data found in deck (ROCK or ROCKTAB)." << std::endl;
}