Using API get3DProperties()

This commit is contained in:
Pål Grønås Drange 2016-04-11 15:13:38 +02:00
parent eb700248ed
commit f1a31ca5e4
4 changed files with 8 additions and 8 deletions

View File

@ -183,7 +183,7 @@ namespace Opm
/// Invalid invalid set of components given. /// Invalid invalid set of components given.
PermeabilityKind classifyPermeability(Opm::EclipseStateConstPtr eclState) PermeabilityKind classifyPermeability(Opm::EclipseStateConstPtr eclState)
{ {
auto& props = eclState->getEclipseProperties(); auto& props = eclState->get3DProperties();
const bool xx = props.hasDeckDoubleGridProperty("PERMX" ); const bool xx = props.hasDeckDoubleGridProperty("PERMX" );
const bool xy = props.hasDeckDoubleGridProperty("PERMXY"); const bool xy = props.hasDeckDoubleGridProperty("PERMXY");
const bool yx = xy; const bool yx = xy;
@ -310,7 +310,7 @@ namespace Opm
// ----------------------------------------------------------- // -----------------------------------------------------------
// 1st row: [ kxx, kxy ], kxz handled in kzx // 1st row: [ kxx, kxy ], kxz handled in kzx
if (eclState->getEclipseProperties().hasDeckDoubleGridProperty("PERMX" )) { if (eclState->get3DProperties().hasDeckDoubleGridProperty("PERMX" )) {
kmap[xx] = tensor.size(); kmap[xx] = tensor.size();
tensor.push_back(extractPermComponent(eclState, "PERMX", global_cell)); tensor.push_back(extractPermComponent(eclState, "PERMX", global_cell));
@ -323,7 +323,7 @@ namespace Opm
// ----------------------------------------------------------- // -----------------------------------------------------------
// 2nd row: [ kyy, kyz ], kyx handled in kxy // 2nd row: [ kyy, kyz ], kyx handled in kxy
if (eclState->getEclipseProperties().hasDeckDoubleGridProperty("PERMY" )) { if (eclState->get3DProperties().hasDeckDoubleGridProperty("PERMY" )) {
kmap[yy] = tensor.size(); kmap[yy] = tensor.size();
tensor.push_back(extractPermComponent(eclState, "PERMY", global_cell)); tensor.push_back(extractPermComponent(eclState, "PERMY", global_cell));
@ -340,7 +340,7 @@ namespace Opm
kmap[zx] = kmap[xz] = tensor.size(); // Enforce symmetry. kmap[zx] = kmap[xz] = tensor.size(); // Enforce symmetry.
tensor.push_back(extractPermComponent(eclState, "PERMZX", global_cell)); tensor.push_back(extractPermComponent(eclState, "PERMZX", global_cell));
} }
if (eclState->getEclipseProperties().hasDeckDoubleGridProperty("PERMZ" )) { if (eclState->get3DProperties().hasDeckDoubleGridProperty("PERMZ" )) {
kmap[zz] = tensor.size(); kmap[zz] = tensor.size();
tensor.push_back(extractPermComponent(eclState, "PERMZ", global_cell)); tensor.push_back(extractPermComponent(eclState, "PERMZ", global_cell));

View File

@ -83,7 +83,7 @@ namespace Opm {
scaledEpsInfo_.resize(nc); scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties; EclEpsGridProperties epsGridProperties;
epsGridProperties.initFromDeck(deck, eclState, /*imbibition=*/false); epsGridProperties.initFromDeck(deck, eclState, /*imbibition=*/false);
const auto& satnum = eclState->getEclipseProperties().getIntGridProperty("SATNUM"); const auto& satnum = eclState->get3DProperties().getIntGridProperty("SATNUM");
for (int c = 0; c < nc; ++c) { for (int c = 0; c < nc; ++c) {
const int cartIdx = compressedToCartesianIdx[c]; const int cartIdx = compressedToCartesianIdx[c];

View File

@ -221,7 +221,7 @@ namespace Opm
const int nc = UgGridHelpers::numCells(G); const int nc = UgGridHelpers::numCells(G);
eqlnum.resize(nc); eqlnum.resize(nc);
const std::vector<int>& e = const std::vector<int>& e =
eclipseState->getEclipseProperties().getIntGridProperty("EQLNUM").getData(); eclipseState->get3DProperties().getIntGridProperty("EQLNUM").getData();
const int* gc = UgGridHelpers::globalCell(G); const int* gc = UgGridHelpers::globalCell(G);
for (int cell = 0; cell < nc; ++cell) { for (int cell = 0; cell < nc; ++cell) {
const int deck_pos = (gc == NULL) ? cell : gc[cell]; const int deck_pos = (gc == NULL) ? cell : gc[cell];
@ -333,7 +333,7 @@ namespace Opm
// Check for presence of kw SWATINIT // Check for presence of kw SWATINIT
if (deck->hasKeyword("SWATINIT")) { if (deck->hasKeyword("SWATINIT")) {
const std::vector<double>& swat_init = eclipseState-> const std::vector<double>& swat_init = eclipseState->
getEclipseProperties().getDoubleGridProperty("SWATINIT").getData(); get3DProperties().getDoubleGridProperty("SWATINIT").getData();
const int nc = UgGridHelpers::numCells(G); const int nc = UgGridHelpers::numCells(G);
swat_init_.resize(nc); swat_init_.resize(nc);
const int* gc = UgGridHelpers::globalCell(G); const int* gc = UgGridHelpers::globalCell(G);

View File

@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(Processing)
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }}); Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext); Opm::DeckConstPtr deck = parser->parseFile(filename, parseContext);
std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseContext)); std::shared_ptr<EclipseState> eclstate (new Opm::EclipseState(deck, parseContext));
const auto& porv = eclstate->getEclipseProperties().getDoubleGridProperty("PORV").getData(); const auto& porv = eclstate->get3DProperties().getDoubleGridProperty("PORV").getData();
EclipseGridConstPtr eclgrid = eclstate->getEclipseGrid(); EclipseGridConstPtr eclgrid = eclstate->getEclipseGrid();
BOOST_CHECK_EQUAL(eclgrid->getMinpvMode(), MinpvMode::EclSTD); BOOST_CHECK_EQUAL(eclgrid->getMinpvMode(), MinpvMode::EclSTD);