#3958 Refactoring: Privatized and renamed findTransmissibilityResults()

Narrower identification in header of methods needing refactoring attention
This commit is contained in:
Jacob Støren 2019-01-22 15:54:54 +01:00
parent 5a01fdb88e
commit 70fc63056f
2 changed files with 16 additions and 18 deletions

View File

@ -924,8 +924,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
// TRANSXYZ
{
size_t tranX, tranY, tranZ;
if (findTransmissibilityResults(tranX, tranY, tranZ))
if (hasCompleteTransmissibilityResults())
{
addStaticScalarResult(RiaDefines::STATIC_NATIVE, RiaDefines::combinedTransmissibilityResultName(), false, 0);
}
@ -950,8 +949,8 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
// riMULTXYZ and X, Y, Z
{
size_t tranX, tranY, tranZ;
if (findTransmissibilityResults(tranX, tranY, tranZ) &&
if (hasCompleteTransmissibilityResults() &&
findScalarResultIndex(RiaDefines::STATIC_NATIVE, RiaDefines::riTranXResultName()) != cvf::UNDEFINED_SIZE_T &&
findScalarResultIndex(RiaDefines::STATIC_NATIVE, RiaDefines::riTranYResultName()) != cvf::UNDEFINED_SIZE_T &&
findScalarResultIndex(RiaDefines::STATIC_NATIVE, RiaDefines::riTranZResultName()) != cvf::UNDEFINED_SIZE_T)
@ -980,8 +979,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
addStaticScalarResult(RiaDefines::STATIC_NATIVE, RiaDefines::riAreaNormTranZResultName(), false, 0);
}
size_t tranX, tranY, tranZ;
if (findTransmissibilityResults(tranX, tranY, tranZ))
if (hasCompleteTransmissibilityResults())
{
addStaticScalarResult(RiaDefines::STATIC_NATIVE, RiaDefines::combinedRiAreaNormTranResultName(), false, 0);
}
@ -1004,8 +1002,10 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigCaseCellResultsData::findTransmissibilityResults(size_t& tranX, size_t& tranY, size_t& tranZ) const
bool RigCaseCellResultsData::hasCompleteTransmissibilityResults() const
{
size_t tranX; size_t tranY; size_t tranZ;
tranX = findScalarResultIndex(RiaDefines::STATIC_NATIVE, "TRANX");
tranY = findScalarResultIndex(RiaDefines::STATIC_NATIVE, "TRANY");
tranZ = findScalarResultIndex(RiaDefines::STATIC_NATIVE, "TRANZ");

View File

@ -77,8 +77,8 @@ public:
void sumCellScalarValues(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex, double& sumValue);
void mobileVolumeWeightedMean(const RigEclipseResultAddress& resVarAddr, double& meanValue);
void mobileVolumeWeightedMean(const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex, double& meanValue);
// Access meta-information about the results
size_t timeStepCount(const RigEclipseResultAddress& resVarAddr) const;
size_t maxTimeStepCount(RigEclipseResultAddress* resultAddressWithMostTimeSteps = nullptr) const;
@ -124,6 +124,12 @@ public:
size_t findScalarResultIndex(RiaDefines::ResultCatType type, const QString& resultName) const;
size_t findScalarResultIndex(const QString& resultName) const;
size_t addStaticScalarResult(RiaDefines::ResultCatType type,
const QString& resultName,
bool needsToBeStored,
size_t resultValueCount);
// <---
// Access the results data
const std::vector< std::vector<double> > & cellScalarResults(const RigEclipseResultAddress& resVarAddr) const;
@ -139,16 +145,6 @@ public:
RiaDefines::PorosityModelType poroModel,
std::vector<RimEclipseCase*> destinationCases);
size_t addStaticScalarResult(RiaDefines::ResultCatType type,
const QString& resultName,
bool needsToBeStored,
size_t resultValueCount);
bool findTransmissibilityResults(size_t& tranX, size_t& tranY, size_t& tranZ) const;
// <---
std::vector<RigEclipseResultAddress> existingResults() const;
const RigEclipseResultInfo* resultInfo(const RigEclipseResultAddress& resVarAddr) const;
@ -163,6 +159,8 @@ private:
void computeSOILForTimeStep(size_t timeStepIndex);
void testAndComputeSgasForTimeStep(size_t timeStepIndex);
bool hasCompleteTransmissibilityResults() const;
void computeRiTransComponent(const QString& riTransComponentResultName);
void computeNncCombRiTrans();