diff --git a/opm/material/fluidmatrixinteractions/EclEpsConfig.hpp b/opm/material/fluidmatrixinteractions/EclEpsConfig.hpp index 7aeb6d6aa..346890889 100644 --- a/opm/material/fluidmatrixinteractions/EclEpsConfig.hpp +++ b/opm/material/fluidmatrixinteractions/EclEpsConfig.hpp @@ -204,14 +204,14 @@ public: const auto& fp = eclState.fieldProps(); // check if we are supposed to scale the Y axis of the capillary pressure if (twoPhaseSystemType == EclOilWaterSystem) { - enableKrnScaling_ = fp.has("KRO"); - enableKrwScaling_ = fp.has("KRW"); - enablePcScaling_ = fp.has("PCW") || fp.has("SWATINIT"); + enableKrnScaling_ = fp.has_double("KRO"); + enableKrwScaling_ = fp.has_double("KRW"); + enablePcScaling_ = fp.has_double("PCW") || fp.has_double("SWATINIT"); } else { assert(twoPhaseSystemType == EclGasOilSystem); - enableKrnScaling_ = fp.has("KRG"); - enableKrwScaling_ = fp.has("KRO"); - enablePcScaling_ = fp.has("PCG"); + enableKrnScaling_ = fp.has_double("KRG"); + enableKrwScaling_ = fp.has_double("KRO"); + enablePcScaling_ = fp.has_double("PCG"); } if (enablePcScaling_ && enableLeverettScaling_) diff --git a/opm/material/fluidmatrixinteractions/EclEpsGridProperties.hpp b/opm/material/fluidmatrixinteractions/EclEpsGridProperties.hpp index b52db8e2d..cb8cb0286 100644 --- a/opm/material/fluidmatrixinteractions/EclEpsGridProperties.hpp +++ b/opm/material/fluidmatrixinteractions/EclEpsGridProperties.hpp @@ -74,8 +74,8 @@ std::vector compressed_copy(const std::vector& global_vector, const std::v std::vector try_get(const FieldPropsManager& fp, const std::string& keyword, const std::vector& compressedToCartesianElemIdx) { - if (fp.has(keyword)) - return compressed_copy(fp.get_global(keyword), compressedToCartesianElemIdx); + if (fp.has_double(keyword)) + return compressed_copy(fp.get_global_double(keyword), compressedToCartesianElemIdx); return {}; } @@ -99,9 +99,9 @@ public: const auto& fp = eclState.fieldProps(); if (useImbibition) - compressed_satnum = compressed_copy(fp.get_global("IMBNUM"), compressedToCartesianElemIdx); + compressed_satnum = compressed_copy(fp.get_global_int("IMBNUM"), compressedToCartesianElemIdx); else - compressed_satnum = compressed_copy(fp.get_global("SATNUM"), compressedToCartesianElemIdx); + compressed_satnum = compressed_copy(fp.get_global_int("SATNUM"), compressedToCartesianElemIdx); this->compressed_swl = try_get( fp, kwPrefix+"SWL", compressedToCartesianElemIdx); this->compressed_sgl = try_get( fp, kwPrefix+"SGL", compressedToCartesianElemIdx); @@ -118,21 +118,21 @@ public: this->compressed_krg = try_get( fp, kwPrefix+"KRG", compressedToCartesianElemIdx); // _may_ be needed to calculate the Leverett capillary pressure scaling factor - if (fp.has("PORO")) - this->compressed_poro = compressed_copy(fp.get_global("PORO"), compressedToCartesianElemIdx); + if (fp.has_double("PORO")) + this->compressed_poro = compressed_copy(fp.get_global_double("PORO"), compressedToCartesianElemIdx); - if (fp.has("PERMX")) - this->compressed_permx = compressed_copy(fp.get_global("PERMX"), compressedToCartesianElemIdx); + if (fp.has_double("PERMX")) + this->compressed_permx = compressed_copy(fp.get_global_double("PERMX"), compressedToCartesianElemIdx); else this->compressed_permx = std::vector(this->compressed_satnum.size()); - if (fp.has("PERMY")) - this->compressed_permy= compressed_copy(fp.get_global("PERMY"), compressedToCartesianElemIdx); + if (fp.has_double("PERMY")) + this->compressed_permy= compressed_copy(fp.get_global_double("PERMY"), compressedToCartesianElemIdx); else this->compressed_permy= this->compressed_permx; - if (fp.has("PERMZ")) - this->compressed_permz= compressed_copy(fp.get_global("PERMZ"), compressedToCartesianElemIdx); + if (fp.has_double("PERMZ")) + this->compressed_permz= compressed_copy(fp.get_global_double("PERMZ"), compressedToCartesianElemIdx); else this->compressed_permz= this->compressed_permx; } diff --git a/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp b/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp index b18c269f9..7b4f8d454 100644 --- a/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp +++ b/opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp @@ -173,8 +173,8 @@ public: // copy the SATNUM grid property. in some cases this is not necessary, but it // should not require much memory anyway... satnumRegionArray_.resize(numCompressedElems); - if (eclState.fieldProps().has("SATNUM")) { - const auto& satnumRawData = eclState.fieldProps().get_global("SATNUM"); + if (eclState.fieldProps().has_int("SATNUM")) { + const auto& satnumRawData = eclState.fieldProps().get_global_int("SATNUM"); for (unsigned elemIdx = 0; elemIdx < numCompressedElems; ++elemIdx) { unsigned cartesianElemIdx = static_cast(compressedToCartesianElemIdx[elemIdx]); satnumRegionArray_[elemIdx] = satnumRawData[cartesianElemIdx] - 1; @@ -186,8 +186,8 @@ public: // create the information for the imbibition region (IMBNUM). By default this is // the same as the saturation region (SATNUM) imbnumRegionArray_ = satnumRegionArray_; - if (eclState.fieldProps().has("IMBNUM")) { - const auto& imbnumRawData = eclState.fieldProps().get_global("IMBNUM"); + if (eclState.fieldProps().has_int("IMBNUM")) { + const auto& imbnumRawData = eclState.fieldProps().get_global_int("IMBNUM"); for (unsigned elemIdx = 0; elemIdx < numCompressedElems; ++elemIdx) { int cartesianElemIdx = compressedToCartesianElemIdx[elemIdx]; imbnumRegionArray_[elemIdx] = imbnumRawData[cartesianElemIdx] - 1; diff --git a/opm/material/thermal/EclThermalLawManager.hpp b/opm/material/thermal/EclThermalLawManager.hpp index b0dd8ec13..34cdb0f9d 100644 --- a/opm/material/thermal/EclThermalLawManager.hpp +++ b/opm/material/thermal/EclThermalLawManager.hpp @@ -74,9 +74,9 @@ public: const std::vector& compressedToCartesianElemIdx) { const auto& fp = eclState.fieldProps(); - bool has_heatcr = fp.has("HEATCR"); - bool has_thconr = fp.has("THCONR"); - bool has_thc = fp.has("THCROCK") || fp.has("THCOIL") || fp.has("THCGAS") || fp.has("THCWATER"); + bool has_heatcr = fp.has_double("HEATCR"); + bool has_thconr = fp.has_double("THCONR"); + bool has_thc = fp.has_double("THCROCK") || fp.has_double("THCOIL") || fp.has_double("THCGAS") || fp.has_double("THCWATER"); if (has_heatcr) initHeatcr_(deck, eclState, compressedToCartesianElemIdx); @@ -149,8 +149,8 @@ private: HeatcrLawParams::setReferenceTemperature(FluidSystem::surfaceTemperature); const auto& fp = eclState.fieldProps(); - const std::vector& heatcrData = fp.get_global("HEATCR"); - const std::vector& heatcrtData = fp.get_global("HEATCRT"); + const std::vector& heatcrData = fp.get_global_double("HEATCR"); + const std::vector& heatcrtData = fp.get_global_double("HEATCRT"); unsigned numElems = compressedToCartesianElemIdx.size(); solidEnergyLawParams_.resize(numElems); for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) { @@ -176,7 +176,7 @@ private: // initialize the element index -> SATNUM index mapping const auto& fp = eclState.fieldProps(); - const std::vector& satnumData = fp.get_global("SATNUM"); + const std::vector& satnumData = fp.get_global_int("SATNUM"); elemToSatnumIdx_.resize(compressedToCartesianElemIdx.size()); for (unsigned elemIdx = 0; elemIdx < compressedToCartesianElemIdx.size(); ++ elemIdx) { unsigned cartesianElemIdx = compressedToCartesianElemIdx[elemIdx]; @@ -232,11 +232,11 @@ private: auto global_size = eclState.getInputGrid().getCartesianSize(); std::vector thconrData(global_size, 0); std::vector thconsfData(global_size, 0); - if (fp.has("THCONR")) - thconrData = fp.get_global("THCONR"); + if (fp.has_double("THCONR")) + thconrData = fp.get_global_double("THCONR"); - if (fp.has("THCONSF")) - thconsfData = fp.get_global("THCONSF"); + if (fp.has_double("THCONSF")) + thconsfData = fp.get_global_double("THCONSF"); unsigned numElems = compressedToCartesianElemIdx.size(); thermalConductionLawParams_.resize(numElems); @@ -268,21 +268,21 @@ private: std::vector thcrockData(global_size,0); std::vector thcoilData(global_size,0); std::vector thcgasData(global_size,0); - std::vector thcwaterData = fp.get_global("THCWATER"); + std::vector thcwaterData = fp.get_global_double("THCWATER"); - if (fp.has("THCROCK")) - thcrockData = fp.get_global("THCROCK"); + if (fp.has_double("THCROCK")) + thcrockData = fp.get_global_double("THCROCK"); - if (fp.has("THCOIL")) - thcoilData = fp.get_global("THCOIL"); + if (fp.has_double("THCOIL")) + thcoilData = fp.get_global_double("THCOIL"); - if (fp.has("THCGAS")) - thcgasData = fp.get_global("THCGAS"); + if (fp.has_double("THCGAS")) + thcgasData = fp.get_global_double("THCGAS"); - if (fp.has("THCWATER")) - thcwaterData = fp.get_global("THCWATER"); + if (fp.has_double("THCWATER")) + thcwaterData = fp.get_global_double("THCWATER"); - const std::vector& poroData = fp.get_global("PORO"); + const std::vector& poroData = fp.get_global_double("PORO"); unsigned numElems = compressedToCartesianElemIdx.size(); thermalConductionLawParams_.resize(numElems);