Use get_global for thermal properties
This commit is contained in:
@@ -262,8 +262,8 @@ private:
|
||||
|
||||
#ifdef ENABLE_3DPROPS_TESTING
|
||||
const auto& fp = eclState.fieldProps();
|
||||
const std::vector<double>& thconrData = fp.get<double>("THCONR");
|
||||
const std::vector<double>& thconsfData = fp.get<double>("THCONSF");
|
||||
const std::vector<double>& thconrData = fp.get_global<double>("THCONR");
|
||||
const std::vector<double>& thconsfData = fp.get_global<double>("THCONSF");
|
||||
#else
|
||||
const auto& props = eclState.get3DProperties();
|
||||
const std::vector<double>& thconrData = props.getDoubleGridProperty("THCONR").getData();
|
||||
@@ -276,14 +276,9 @@ private:
|
||||
elemParams.setThermalConductionApproach(ThermalConductionLawParams::thconrApproach);
|
||||
auto& thconrElemParams = elemParams.template getRealParams<ThermalConductionLawParams::thconrApproach>();
|
||||
|
||||
#ifdef ENABLE_3DPROPS_TESTING
|
||||
thconrElemParams.setReferenceTotalThermalConductivity(thconrData[elemIdx]);
|
||||
thconrElemParams.setDTotalThermalConductivity_dSg(thconsfData[elemIdx]);
|
||||
#else
|
||||
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
||||
thconrElemParams.setReferenceTotalThermalConductivity(thconrData[cartElemIdx]);
|
||||
thconrElemParams.setDTotalThermalConductivity_dSg(thconsfData[cartElemIdx]);
|
||||
#endif
|
||||
|
||||
thconrElemParams.finalize();
|
||||
elemParams.finalize();
|
||||
@@ -301,11 +296,11 @@ private:
|
||||
|
||||
#ifdef ENABLE_3DPROPS_TESTING
|
||||
const auto& fp = eclState.fieldProps();
|
||||
const std::vector<double>& thcrockData = fp.get<double>("THCROCK");
|
||||
const std::vector<double>& thcoilData = fp.get<double>("THCOIL");
|
||||
const std::vector<double>& thcgasData = fp.get<double>("THCGAS");
|
||||
const std::vector<double>& thcwaterData = fp.get<double>("THCWATER");
|
||||
const std::vector<double>& poroData = fp.get<double>("PORO");
|
||||
const std::vector<double>& thcrockData = fp.get_global<double>("THCROCK");
|
||||
const std::vector<double>& thcoilData = fp.get_global<double>("THCOIL");
|
||||
const std::vector<double>& thcgasData = fp.get_global<double>("THCGAS");
|
||||
const std::vector<double>& thcwaterData = fp.get_global<double>("THCWATER");
|
||||
const std::vector<double>& poroData = fp.get_global<double>("PORO");
|
||||
#else
|
||||
const auto& props = eclState.get3DProperties();
|
||||
const std::vector<double>& thcrockData = props.getDoubleGridProperty("THCROCK").getData();
|
||||
@@ -321,21 +316,13 @@ private:
|
||||
elemParams.setThermalConductionApproach(ThermalConductionLawParams::thcApproach);
|
||||
auto& thcElemParams = elemParams.template getRealParams<ThermalConductionLawParams::thcApproach>();
|
||||
|
||||
#ifdef ENABLE_3DPROPS_TESTING
|
||||
thcElemParams.setPorosity(poroData[elemIdx]);
|
||||
thcElemParams.setThcrock(thcrockData[elemIdx]);
|
||||
thcElemParams.setThcoil(thcoilData[elemIdx]);
|
||||
thcElemParams.setThcgas(thcgasData[elemIdx]);
|
||||
thcElemParams.setThcwater(thcwaterData[elemIdx]);
|
||||
#else
|
||||
int cartElemIdx = compressedToCartesianElemIdx[elemIdx];
|
||||
thcElemParams.setPorosity(poroData[cartElemIdx]);
|
||||
thcElemParams.setThcrock(thcrockData[cartElemIdx]);
|
||||
thcElemParams.setThcoil(thcoilData[cartElemIdx]);
|
||||
thcElemParams.setThcgas(thcgasData[cartElemIdx]);
|
||||
thcElemParams.setThcwater(thcwaterData[cartElemIdx]);
|
||||
#endif
|
||||
|
||||
|
||||
thcElemParams.finalize();
|
||||
elemParams.finalize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user