Using API get3DProperties()

This commit is contained in:
Pål Grønås Drange
2016-04-11 15:13:38 +02:00
parent 1e0356d392
commit fee514375d
6 changed files with 13 additions and 13 deletions

View File

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

View File

@@ -83,7 +83,7 @@ namespace Opm {
scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties;
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) {
const int cartIdx = compressedToCartesianIdx[c];

View File

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

View File

@@ -32,7 +32,7 @@ void extractPvtTableIndex(std::vector<int> &pvtTableIdx,
const int *compressedToCartesianCellIdx)
{
//Get the PVTNUM data
const std::vector<int>& pvtnumData = eclState->getEclipseProperties().getIntGridProperty("PVTNUM").getData();
const std::vector<int>& pvtnumData = eclState->get3DProperties().getIntGridProperty("PVTNUM").getData();
// Convert this into an array of compressed cells
// Eclipse uses Fortran-style indices which start at 1
// instead of 0, we subtract 1.

View File

@@ -55,7 +55,7 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
const PhaseUsage& pu = props.phaseUsage();
const auto& eqlnum = eclipseState->getEclipseProperties().getIntGridProperty("EQLNUM");
const auto& eqlnum = eclipseState->get3DProperties().getIntGridProperty("EQLNUM");
const auto& eqlnumData = eqlnum.getData();
const int numPhases = initialState.numPhases();
@@ -100,7 +100,7 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
// Fortran indices.
const int* gc = UgGridHelpers::globalCell(grid);
std::vector<int> pvtRegion(numCells);
const auto& cartPvtRegion = eclipseState->getEclipseProperties().getIntGridProperty("PVTNUM").getData();
const auto& cartPvtRegion = eclipseState->get3DProperties().getIntGridProperty("PVTNUM").getData();
for (int cellIdx = 0; cellIdx < numCells; ++cellIdx) {
const int cartCellIdx = gc ? gc[cellIdx] : cellIdx;
pvtRegion[cellIdx] = std::max(0, cartPvtRegion[cartCellIdx] - 1);
@@ -323,7 +323,7 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
std::vector<double> thpres_vals;
if (simulationConfig->hasThresholdPressure()) {
std::shared_ptr<const ThresholdPressure> thresholdPressure = simulationConfig->getThresholdPressure();
const auto& eqlnum = eclipseState->getEclipseProperties().getIntGridProperty("EQLNUM");
const auto& eqlnum = eclipseState->get3DProperties().getIntGridProperty("EQLNUM");
const auto& eqlnumData = eqlnum.getData();
// Set threshold pressure values for each cell face.
@@ -381,7 +381,7 @@ void computeMaxDp(std::map<std::pair<int, int>, double>& maxDp,
std::vector<double> thpres_vals;
if (simulationConfig->hasThresholdPressure()) {
std::shared_ptr<const ThresholdPressure> thresholdPressure = simulationConfig->getThresholdPressure();
const auto& eqlnum = eclipseState->getEclipseProperties().getIntGridProperty("EQLNUM");
const auto& eqlnum = eclipseState->get3DProperties().getIntGridProperty("EQLNUM");
const auto& eqlnumData = eqlnum.getData();
// Set values for each NNC

View File

@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(Processing)
Opm::ParseContext parseContext({{ ParseContext::PARSE_RANDOM_SLASH , InputError::IGNORE }});
Opm::DeckConstPtr deck = parser->parseFile(filename, 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();
BOOST_CHECK_EQUAL(eclgrid->getMinpvMode(), MinpvMode::EclSTD);