#10367 Janitor: Remove unneccessary 'this' pointers

This commit is contained in:
Kristian Bendiksen
2023-08-04 09:04:14 +02:00
parent 2614cf3d62
commit 5bf2c2a89d
292 changed files with 1625 additions and 1664 deletions

View File

@@ -169,5 +169,5 @@ double RigCombMultResultAccessor::cellScalarGlobIdx( size_t globCellIndex ) cons
double RigCombMultResultAccessor::cellFaceScalarGlobIdx( size_t globCellIndex, cvf::StructGridInterface::FaceType faceId ) const
{
size_t gridLocalCellIndex = m_grid->mainGrid()->cell( globCellIndex ).gridLocalCellIndex();
return this->cellFaceScalar( gridLocalCellIndex, faceId );
return cellFaceScalar( gridLocalCellIndex, faceId );
}

View File

@@ -105,7 +105,7 @@ double RigCombTransResultAccessor::cellFaceScalar( size_t gridLocalCellIndex, cv
break;
case cvf::StructGridInterface::NEG_I:
{
return this->neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_I, m_xTransAccessor.p() );
return neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_I, m_xTransAccessor.p() );
}
break;
case cvf::StructGridInterface::POS_J:
@@ -118,7 +118,7 @@ double RigCombTransResultAccessor::cellFaceScalar( size_t gridLocalCellIndex, cv
break;
case cvf::StructGridInterface::NEG_J:
{
return this->neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_J, m_yTransAccessor.p() );
return neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_J, m_yTransAccessor.p() );
}
break;
case cvf::StructGridInterface::POS_K:
@@ -131,7 +131,7 @@ double RigCombTransResultAccessor::cellFaceScalar( size_t gridLocalCellIndex, cv
break;
case cvf::StructGridInterface::NEG_K:
{
return this->neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_K, m_zTransAccessor.p() );
return neighborCellTran( gridLocalCellIndex, cvf::StructGridInterface::NEG_K, m_zTransAccessor.p() );
}
break;
default:
@@ -157,5 +157,5 @@ double RigCombTransResultAccessor::cellScalarGlobIdx( size_t globCellIndex ) con
double RigCombTransResultAccessor::cellFaceScalarGlobIdx( size_t globCellIndex, cvf::StructGridInterface::FaceType faceId ) const
{
size_t gridLocalCellIndex = m_grid->mainGrid()->cell( globCellIndex ).gridLocalCellIndex();
return this->cellFaceScalar( gridLocalCellIndex, faceId );
return cellFaceScalar( gridLocalCellIndex, faceId );
}

View File

@@ -289,7 +289,7 @@ std::vector<std::pair<QString, double>> RigAccWellFlowCalculator::totalWellFlowP
for ( const QString& tracerName : tracerNames )
{
const std::vector<double>& accFlow = this->accumulatedTracerFlowPrConnection( tracerName, 0 );
const std::vector<double>& accFlow = accumulatedTracerFlowPrConnection( tracerName, 0 );
tracerWithValues.push_back( std::make_pair( tracerName, accFlow.back() ) );
}

View File

@@ -289,7 +289,7 @@ const std::vector<double>& RigCaseCellResultsData::cellScalarResults( const RigE
//--------------------------------------------------------------------------------------------------
size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseResultAddress& resVarAddr, bool needsToBeStored )
{
size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
// If the result exists, do nothing
@@ -300,7 +300,7 @@ size_t RigCaseCellResultsData::findOrCreateScalarResultIndex( const RigEclipseRe
// Create the new empty result with metadata
scalarResultIndex = this->resultCount();
scalarResultIndex = resultCount();
m_cellScalarResults.push_back( std::vector<std::vector<double>>() );
RigEclipseResultInfo resInfo( resVarAddr, needsToBeStored, false, scalarResultIndex );
@@ -610,7 +610,7 @@ void RigCaseCellResultsData::setTimeStepInfos( const RigEclipseResultAddress&
m_resultInfos[findScalarResultIndexFromAddress( resVarAddr )].setTimeStepInfos( timeStepInfos );
std::vector<std::vector<double>>* dataValues = this->modifiableCellScalarResultTimesteps( resVarAddr );
std::vector<std::vector<double>>* dataValues = modifiableCellScalarResultTimesteps( resVarAddr );
dataValues->resize( timeStepInfos.size() );
}
@@ -648,7 +648,7 @@ QString RigCaseCellResultsData::makeResultNameUnique( const QString& resultNameP
int stringLength = newResultName.size();
while ( true )
{
if ( !this->hasResultEntry( RigEclipseResultAddress( newResultName ) ) ) break;
if ( !hasResultEntry( RigEclipseResultAddress( newResultName ) ) ) break;
newResultName.truncate( stringLength );
newResultName += "_" + QString::number( nameNum );
@@ -938,7 +938,7 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
size_t soilIndex = findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE,
RiaResultNames::soil() ),
needsToBeStored );
this->setMustBeCalculated( soilIndex );
setMustBeCalculated( soilIndex );
}
}
}
@@ -1204,12 +1204,12 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
RiaDefines::ResultCatType::INPUT_PROPERTY,
RiaDefines::ResultCatType::FORMATION_NAMES };
size_t scalarResultIndex = this->findOrLoadKnownScalarResultByResultTypeOrder( resVarAddr, searchOrder );
size_t scalarResultIndex = findOrLoadKnownScalarResultByResultTypeOrder( resVarAddr, searchOrder );
return scalarResultIndex;
}
size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T;
@@ -1218,7 +1218,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
if ( resVarAddr.isDeltaCaseActive() || resVarAddr.isDeltaTimeStepActive() )
{
if ( !RigCaseCellResultCalculator::computeDifference( this->m_ownerCaseData, m_porosityModel, resVarAddr ) )
if ( !RigCaseCellResultCalculator::computeDifference( m_ownerCaseData, m_porosityModel, resVarAddr ) )
{
return cvf::UNDEFINED_SIZE_T;
}
@@ -1230,7 +1230,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
{
if ( !isDataPresent( scalarResultIndex ) )
{
if ( !RigCaseCellResultCalculator::computeDivideByCellFaceArea( m_ownerMainGrid, this->m_ownerCaseData, m_porosityModel, resVarAddr ) )
if ( !RigCaseCellResultCalculator::computeDivideByCellFaceArea( m_ownerMainGrid, m_ownerCaseData, m_porosityModel, resVarAddr ) )
{
return cvf::UNDEFINED_SIZE_T;
@@ -1246,18 +1246,18 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
{
if ( resultName == RiaResultNames::combinedTransmissibilityResultName() )
{
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANX" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANY" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANZ" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANX" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANY" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "TRANZ" ) );
}
else if ( resultName == RiaResultNames::combinedMultResultName() )
{
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTX" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTX-" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTY" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTY-" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTZ" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTZ-" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTX" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTX-" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTY" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTY-" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTZ" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "MULTZ-" ) );
}
else if ( resultName == RiaResultNames::combinedRiTranResultName() )
{
@@ -1319,21 +1319,21 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
{
if ( resultName == RiaResultNames::combinedWaterFluxResultName() )
{
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATI+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATJ+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATK+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATI+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATJ+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRWATK+" ) );
}
else if ( resultName == RiaResultNames::combinedOilFluxResultName() )
{
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILI+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILJ+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILK+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILI+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILJ+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLROILK+" ) );
}
else if ( resultName == RiaResultNames::combinedGasFluxResultName() )
{
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASI+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASJ+" ) );
this->findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASK+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASI+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASJ+" ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( type, "FLRGASK+" ) );
}
}
@@ -1344,15 +1344,15 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
if ( resultName == RiaResultNames::soil() )
{
if ( this->mustBeCalculated( scalarResultIndex ) )
if ( mustBeCalculated( scalarResultIndex ) )
{
// Trigger loading of SWAT, SGAS to establish time step count if no data has been loaded from file at
// this point
findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::swat() ) );
findOrLoadKnownScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ) );
m_cellScalarResults[scalarResultIndex].resize( this->maxTimeStepCount() );
for ( size_t timeStepIdx = 0; timeStepIdx < this->maxTimeStepCount(); timeStepIdx++ )
m_cellScalarResults[scalarResultIndex].resize( maxTimeStepCount() );
for ( size_t timeStepIdx = 0; timeStepIdx < maxTimeStepCount(); timeStepIdx++ )
{
std::vector<double>& values = m_cellScalarResults[scalarResultIndex][timeStepIdx];
if ( values.size() == 0 )
@@ -1366,9 +1366,9 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
}
else if ( resultName == RiaResultNames::completionTypeResultName() )
{
caf::ProgressInfo progressInfo( this->maxTimeStepCount(), "Calculate Completion Type Results" );
m_cellScalarResults[scalarResultIndex].resize( this->maxTimeStepCount() );
for ( size_t timeStepIdx = 0; timeStepIdx < this->maxTimeStepCount(); ++timeStepIdx )
caf::ProgressInfo progressInfo( maxTimeStepCount(), "Calculate Completion Type Results" );
m_cellScalarResults[scalarResultIndex].resize( maxTimeStepCount() );
for ( size_t timeStepIdx = 0; timeStepIdx < maxTimeStepCount(); ++timeStepIdx )
{
computeCompletionTypeForTimeStep( timeStepIdx );
progressInfo.incrementProgress();
@@ -1387,7 +1387,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
if ( m_readerInterface.notNull() )
{
// Add one more result to result container
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
size_t timeStepCount = infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
bool resultLoadingSuccess = true;
@@ -1472,7 +1472,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
RifReaderEclipseOutput* eclReader = dynamic_cast<RifReaderEclipseOutput*>( m_readerInterface.p() );
if ( eclReader )
{
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
size_t timeStepCount = infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
m_cellScalarResults[scalarResultIndex].resize( timeStepCount );
@@ -1518,7 +1518,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultByResultTypeOrder( con
RigEclipseResultAddress resVarAddressWithType = resVarAddr;
resVarAddressWithType.setResultCatType( resultType );
size_t scalarResultIndex = this->findOrLoadKnownScalarResult( resVarAddressWithType );
size_t scalarResultIndex = findOrLoadKnownScalarResult( resVarAddressWithType );
if ( scalarResultIndex != cvf::UNDEFINED_SIZE_T )
{
@@ -1541,11 +1541,11 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
// Special handling for SOIL
if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName.toUpper() == RiaResultNames::soil() )
{
size_t soilScalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
size_t soilScalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( this->mustBeCalculated( soilScalarResultIndex ) )
if ( mustBeCalculated( soilScalarResultIndex ) )
{
m_cellScalarResults[soilScalarResultIndex].resize( this->maxTimeStepCount() );
m_cellScalarResults[soilScalarResultIndex].resize( maxTimeStepCount() );
std::vector<double>& values = m_cellScalarResults[soilScalarResultIndex][timeStepIndex];
if ( values.size() == 0 )
@@ -1558,12 +1558,12 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
}
else if ( type == RiaDefines::ResultCatType::DYNAMIC_NATIVE && resultName == RiaResultNames::completionTypeResultName() )
{
size_t completionTypeScalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
size_t completionTypeScalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
computeCompletionTypeForTimeStep( timeStepIndex );
return completionTypeScalarResultIndex;
}
size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddr );
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T;
if ( type == RiaDefines::ResultCatType::GENERATED )
@@ -1573,7 +1573,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
if ( m_readerInterface.notNull() )
{
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
size_t timeStepCount = infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
bool resultLoadingSuccess = true;
@@ -1615,7 +1615,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
RifReaderEclipseOutput* eclReader = dynamic_cast<RifReaderEclipseOutput*>( m_readerInterface.p() );
if ( eclReader )
{
size_t timeStepCount = this->infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
size_t timeStepCount = infoForEachResultIndex()[scalarResultIndex].timeStepInfos().size();
m_cellScalarResults[scalarResultIndex].resize( timeStepCount );
@@ -1663,8 +1663,7 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex
// Simulation type is gas and water. No SGAS is present, compute SGAS based on SWAT
size_t scalarIndexSGAS =
this->findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ),
false );
findOrCreateScalarResultIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::sgas() ), false );
if ( m_cellScalarResults[scalarIndexSGAS].size() > timeStepIndex )
{
std::vector<double>& values = m_cellScalarResults[scalarIndexSGAS][timeStepIndex];
@@ -1679,7 +1678,7 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex
if ( swatForTimeStep.size() > 0 )
{
swatResultValueCount = swatForTimeStep.size();
swatTimeStepCount = this->infoForEachResultIndex()[scalarIndexSWAT].timeStepInfos().size();
swatTimeStepCount = infoForEachResultIndex()[scalarIndexSWAT].timeStepInfos().size();
}
}
@@ -1742,37 +1741,37 @@ void RigCaseCellResultsData::computeDepthRelatedResults()
if ( depthResultIndex == cvf::UNDEFINED_SIZE_T )
{
depthResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH", false, actCellCount );
depthResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DEPTH", false, actCellCount );
computeDepth = true;
}
if ( dxResultIndex == cvf::UNDEFINED_SIZE_T )
{
dxResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DX", false, actCellCount );
dxResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DX", false, actCellCount );
computeDx = true;
}
if ( dyResultIndex == cvf::UNDEFINED_SIZE_T )
{
dyResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DY", false, actCellCount );
dyResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DY", false, actCellCount );
computeDy = true;
}
if ( dzResultIndex == cvf::UNDEFINED_SIZE_T )
{
dzResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ", false, actCellCount );
dzResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "DZ", false, actCellCount );
computeDz = true;
}
if ( topsResultIndex == cvf::UNDEFINED_SIZE_T )
{
topsResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "TOPS", false, actCellCount );
topsResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "TOPS", false, actCellCount );
computeTops = true;
}
if ( bottomResultIndex == cvf::UNDEFINED_SIZE_T )
{
bottomResultIndex = this->addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "BOTTOM", false, actCellCount );
bottomResultIndex = addStaticScalarResult( RiaDefines::ResultCatType::STATIC_NATIVE, "BOTTOM", false, actCellCount );
computeBottom = true;
}
@@ -2021,8 +2020,8 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp
// Get the result index of the output
size_t riTransResultIdx = this->findScalarResultIndexFromAddress(
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) );
size_t riTransResultIdx =
findScalarResultIndexFromAddress( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) );
CVF_ASSERT( riTransResultIdx != cvf::UNDEFINED_SIZE_T );
// Get the result count, to handle that one of them might be globally defined
@@ -2054,14 +2053,13 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp
ResultIndexFunction permIdxFunc = nullptr;
ResultIndexFunction ntgIdxFunc = nullptr;
{
bool isPermUsingResIdx =
this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, permCompName ) );
bool isPermUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, permCompName ) );
bool isTransUsingResIdx =
this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) );
isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransComponentResultName ) );
bool isNtgUsingResIdx = false;
if ( hasNTGResults )
{
isNtgUsingResIdx = this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) );
isNtgUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) );
}
// Set up result index function pointers
@@ -2204,16 +2202,13 @@ void RigCaseCellResultsData::computeNncCombRiTrans()
ResultIndexFunction permZIdxFunc = nullptr;
ResultIndexFunction ntgIdxFunc = nullptr;
{
bool isPermXUsingResIdx =
this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) );
bool isPermYUsingResIdx =
this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) );
bool isPermZUsingResIdx =
this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) );
bool isNtgUsingResIdx = false;
bool isPermXUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMX" ) );
bool isPermYUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMY" ) );
bool isPermZUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "PERMZ" ) );
bool isNtgUsingResIdx = false;
if ( hasNTGResults )
{
isNtgUsingResIdx = this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) );
isNtgUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, "NTG" ) );
}
// Set up result index function pointers
@@ -2395,7 +2390,7 @@ void RigCaseCellResultsData::computeRiMULTComponent( const QString& riMultCompNa
// Get the result index of the output
size_t riMultResultIdx =
this->findScalarResultIndexFromAddress( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riMultCompName ) );
findScalarResultIndexFromAddress( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riMultCompName ) );
CVF_ASSERT( riMultResultIdx != cvf::UNDEFINED_SIZE_T );
// Get the result count, to handle that one of them might be globally defined
@@ -2487,8 +2482,8 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra
// Get the result index of the output
size_t riTranByAreaScResIdx = this->findScalarResultIndexFromAddress(
RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransByAreaCompResultName ) );
size_t riTranByAreaScResIdx =
findScalarResultIndexFromAddress( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, riTransByAreaCompResultName ) );
CVF_ASSERT( riTranByAreaScResIdx != cvf::UNDEFINED_SIZE_T );
@@ -2507,7 +2502,7 @@ void RigCaseCellResultsData::computeRiTRANSbyAreaComponent( const QString& riTra
// Prepare how to index the result values:
bool isUsingResIdx = this->isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, transCompName ) );
bool isUsingResIdx = isUsingGlobalActiveIndex( RigEclipseResultAddress( RiaDefines::ResultCatType::STATIC_NATIVE, transCompName ) );
// Set up result index function pointers
@@ -2601,12 +2596,12 @@ void RigCaseCellResultsData::computeNncCombRiTRANSbyArea()
//--------------------------------------------------------------------------------------------------
void RigCaseCellResultsData::computeCompletionTypeForTimeStep( size_t timeStep )
{
size_t completionTypeResultIndex = this->findScalarResultIndexFromAddress(
size_t completionTypeResultIndex = findScalarResultIndexFromAddress(
RigEclipseResultAddress( RiaDefines::ResultCatType::DYNAMIC_NATIVE, RiaResultNames::completionTypeResultName() ) );
if ( m_cellScalarResults[completionTypeResultIndex].size() < this->maxTimeStepCount() )
if ( m_cellScalarResults[completionTypeResultIndex].size() < maxTimeStepCount() )
{
m_cellScalarResults[completionTypeResultIndex].resize( this->maxTimeStepCount() );
m_cellScalarResults[completionTypeResultIndex].resize( maxTimeStepCount() );
}
std::vector<double>& completionTypeResult = m_cellScalarResults[completionTypeResultIndex][timeStep];
@@ -2725,14 +2720,11 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
m_activeFormationNamesData = activeFormationNames;
size_t totalGlobCellCount = m_ownerMainGrid->globalCellArray().size();
this->addStaticScalarResult( RiaDefines::ResultCatType::FORMATION_NAMES,
RiaResultNames::activeFormationNamesResultName(),
false,
totalGlobCellCount );
addStaticScalarResult( RiaDefines::ResultCatType::FORMATION_NAMES, RiaResultNames::activeFormationNamesResultName(), false, totalGlobCellCount );
std::vector<double>* fnData = this->modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES,
RiaResultNames::activeFormationNamesResultName() ),
0 );
std::vector<double>* fnData = modifiableCellScalarResult( RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES,
RiaResultNames::activeFormationNamesResultName() ),
0 );
if ( m_activeFormationNamesData.isNull() )
{
@@ -2808,7 +2800,7 @@ RigAllanDiagramData* RigCaseCellResultsData::allanDiagramData()
//--------------------------------------------------------------------------------------------------
bool RigCaseCellResultsData::isDataPresent( size_t scalarResultIndex ) const
{
if ( scalarResultIndex >= this->resultCount() )
if ( scalarResultIndex >= resultCount() )
{
return false;
}
@@ -2906,36 +2898,36 @@ size_t RigCaseCellResultsData::findScalarResultIndexFromAddress( const RigEclips
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::STATIC_NATIVE );
size_t scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
}
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::SOURSIMRL );
scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
}
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::GENERATED );
scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
}
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::INPUT_PROPERTY );
scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
}
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
resVarAddressWithType.setResultCatType( RiaDefines::ResultCatType::FORMATION_NAMES );
scalarResultIndex = this->findScalarResultIndexFromAddress( resVarAddressWithType );
scalarResultIndex = findScalarResultIndexFromAddress( resVarAddressWithType );
}
return scalarResultIndex;
@@ -3012,5 +3004,5 @@ void RigCaseCellResultsData::copyResultsMetaDataFromMainCase( RigEclipseCaseData
//--------------------------------------------------------------------------------------------------
void RigCaseCellResultsData::setStatisticsDataCacheNumBins( const RigEclipseResultAddress& resultAddress, size_t numBins )
{
this->statistics( resultAddress )->setNumBins( numBins );
statistics( resultAddress )->setNumBins( numBins );
}

View File

@@ -46,7 +46,7 @@ RigCaseToCaseCellMapper::RigCaseToCaseCellMapper( RigFemPart* masterFemPart, Rig
, m_dependentFemPart( nullptr )
{
m_masterCellOrIntervalIndex.resize( dependentEclGrid->globalCellArray().size(), cvf::UNDEFINED_INT );
this->calculateEclToGeomCellMapping( dependentEclGrid, masterFemPart, false );
calculateEclToGeomCellMapping( dependentEclGrid, masterFemPart, false );
}
//--------------------------------------------------------------------------------------------------
@@ -71,7 +71,7 @@ RigCaseToCaseCellMapper::RigCaseToCaseCellMapper( RigMainGrid* masterEclGrid, Ri
, m_dependentFemPart( nullptr )
{
m_masterCellOrIntervalIndex.resize( dependentFemPart->elementCount(), cvf::UNDEFINED_INT );
this->calculateEclToGeomCellMapping( masterEclGrid, dependentFemPart, true );
calculateEclToGeomCellMapping( masterEclGrid, dependentFemPart, true );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -192,7 +192,7 @@ void RigEclipseCaseData::computeWellCellsPrGrid()
if ( m_wellCellsInGrid.size() ) return;
std::vector<RigGridBase*> grids;
this->allGrids( &grids );
allGrids( &grids );
// Debug code used to display grid names and grid sizes
/*
@@ -747,7 +747,7 @@ const std::vector<double>* RigEclipseCaseData::resultValues( RiaDefines::Porosit
const QString& resultName,
size_t timeStepIndex )
{
RigCaseCellResultsData* gridCellResults = this->results( porosityModel );
RigCaseCellResultsData* gridCellResults = results( porosityModel );
const std::vector<double>* swatResults = nullptr;
if ( gridCellResults->ensureKnownResultLoaded( RigEclipseResultAddress( type, resultName ) ) )

View File

@@ -129,6 +129,6 @@ void RigEclipseMultiPropertyStatCalc::addNativeStatisticsCalculator( RigCaseCell
{
if ( eclipseResultAddress.isValid() )
{
this->addStatisticsCalculator( new RigEclipseNativeStatCalc( cellResultsData, eclipseResultAddress ) );
addStatisticsCalculator( new RigEclipseNativeStatCalc( cellResultsData, eclipseResultAddress ) );
}
}

View File

@@ -169,7 +169,7 @@ void RigEclipseWellLogExtractor::calculateIntersection()
}
}
this->populateReturnArrays( uniqueIntersections );
populateReturnArrays( uniqueIntersections );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -70,12 +70,12 @@ double RigEnsembleParameter::normalizedStdDeviation() const
//--------------------------------------------------------------------------------------------------
bool RigEnsembleParameter::operator<( const RigEnsembleParameter& other ) const
{
if ( this->variationBin != other.variationBin )
if ( variationBin != other.variationBin )
{
return this->variationBin > other.variationBin; // Larger first
return variationBin > other.variationBin; // Larger first
}
return this->name < other.name;
return name < other.name;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -48,47 +48,47 @@ RigEquil::RigEquil( double datumDepth,
double RigEquil::datumDepth() const
{
return this->datum_depth;
return datum_depth;
}
double RigEquil::datumDepthPressure() const
{
return this->datum_depth_ps;
return datum_depth_ps;
}
double RigEquil::waterOilContactDepth() const
{
return this->water_oil_contact_depth;
return water_oil_contact_depth;
}
double RigEquil::waterOilContactCapillaryPressure() const
{
return this->water_oil_contact_capillary_pressure;
return water_oil_contact_capillary_pressure;
}
double RigEquil::gasOilContactDepth() const
{
return this->gas_oil_contact_depth;
return gas_oil_contact_depth;
}
double RigEquil::gasOilContactCapillaryPressure() const
{
return this->gas_oil_contact_capillary_pressure;
return gas_oil_contact_capillary_pressure;
}
bool RigEquil::liveOilInitConstantRs() const
{
return this->live_oil_init_proc;
return live_oil_init_proc;
}
bool RigEquil::wetGasInitConstantRv() const
{
return this->wet_gas_init_proc;
return wet_gas_init_proc;
}
int RigEquil::initializationTargetAccuracy() const
{
return this->init_target_accuracy;
return init_target_accuracy;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -235,7 +235,7 @@ std::vector<double>* RigFlowDiagResults::calculateAverageTOFResult( const RigFlo
findResultsForSelectedTracers( resVarAddr, timeStepIndex, RIG_FLD_TOF_RESNAME, RimFlowDiagSolution::TracerStatusType::PRODUCER );
std::vector<const std::vector<double>*> producerFractions =
findResultsForSelectedTracers( resVarAddr, timeStepIndex, RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::TracerStatusType::PRODUCER );
size_t activeCellCount = this->activeCellInfo( resVarAddr )->reservoirActiveCellCount();
size_t activeCellCount = activeCellInfo( resVarAddr )->reservoirActiveCellCount();
std::vector<double> injectorTotalFractions;
std::vector<double> injectorFractMultTof;
@@ -245,7 +245,7 @@ std::vector<double>* RigFlowDiagResults::calculateAverageTOFResult( const RigFlo
std::vector<double> producerFractMultTof;
calculateSumOfFractionAndFractionMultTOF( activeCellCount, producerFractions, producerTOFs, &producerTotalFractions, &producerFractMultTof );
RigFlowDiagResultFrames* averageTofFrames = this->createScalarResult( resVarAddr );
RigFlowDiagResultFrames* averageTofFrames = createScalarResult( resVarAddr );
std::vector<double>& averageTof = averageTofFrames->frameData( timeStepIndex );
averageTof.resize( activeCellCount, HUGE_VAL );
@@ -309,10 +309,10 @@ std::vector<double>* RigFlowDiagResults::calculateSumOfFractionsResult( const Ri
RIG_FLD_CELL_FRACTION_RESNAME,
RimFlowDiagSolution::TracerStatusType::UNDEFINED );
RigFlowDiagResultFrames* sumOfFractionsFrames = this->createScalarResult( resVarAddr );
RigFlowDiagResultFrames* sumOfFractionsFrames = createScalarResult( resVarAddr );
std::vector<double>& sumOfFractions = sumOfFractionsFrames->frameData( timeStepIndex );
size_t activeCellCount = this->activeCellInfo( resVarAddr )->reservoirActiveCellCount();
size_t activeCellCount = activeCellInfo( resVarAddr )->reservoirActiveCellCount();
calculateSumOfFractions( fractions, activeCellCount, &sumOfFractions );
@@ -351,9 +351,9 @@ std::vector<double>* RigFlowDiagResults::calculateTracerWithMaxFractionResult( c
}
}
size_t activeCellCount = this->activeCellInfo( resVarAddr )->reservoirActiveCellCount();
size_t activeCellCount = activeCellInfo( resVarAddr )->reservoirActiveCellCount();
RigFlowDiagResultFrames* maxFractionTracerIdxFrames = this->createScalarResult( resVarAddr );
RigFlowDiagResultFrames* maxFractionTracerIdxFrames = createScalarResult( resVarAddr );
std::vector<double>& maxFractionTracerIdx = maxFractionTracerIdxFrames->frameData( timeStepIndex );
{
maxFractionTracerIdx.resize( activeCellCount, HUGE_VAL );
@@ -392,7 +392,7 @@ std::vector<double>* RigFlowDiagResults::calculateCommunicationResult( const Rig
findResultsForSelectedTracers( resVarAddr, timeStepIndex, RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::TracerStatusType::INJECTOR );
std::vector<const std::vector<double>*> producerFractions =
findResultsForSelectedTracers( resVarAddr, timeStepIndex, RIG_FLD_CELL_FRACTION_RESNAME, RimFlowDiagSolution::TracerStatusType::PRODUCER );
size_t activeCellCount = this->activeCellInfo( resVarAddr )->reservoirActiveCellCount();
size_t activeCellCount = activeCellInfo( resVarAddr )->reservoirActiveCellCount();
std::vector<double> sumOfInjectorFractions;
calculateSumOfFractions( injectorFractions, activeCellCount, &sumOfInjectorFractions );
@@ -400,7 +400,7 @@ std::vector<double>* RigFlowDiagResults::calculateCommunicationResult( const Rig
std::vector<double> sumOfProducerFractions;
calculateSumOfFractions( producerFractions, activeCellCount, &sumOfProducerFractions );
RigFlowDiagResultFrames* commFrames = this->createScalarResult( resVarAddr );
RigFlowDiagResultFrames* commFrames = createScalarResult( resVarAddr );
std::vector<double>& commPI = commFrames->frameData( timeStepIndex );
commPI.resize( activeCellCount, HUGE_VAL );
@@ -428,7 +428,7 @@ void RigFlowDiagResults::calculateNumFloodedPV( const RigFlowDiagResultAddress&
}
RigNumberOfFloodedPoreVolumesCalculator calc( eclipseCase, tracerNames );
RigFlowDiagResultFrames* frames = this->createScalarResult( resVarAddr );
RigFlowDiagResultFrames* frames = createScalarResult( resVarAddr );
for ( size_t frameIdx = 0; frameIdx < m_timeStepCount; ++frameIdx )
{
std::vector<double>& frame = frames->frameData( frameIdx );
@@ -539,7 +539,7 @@ void RigFlowDiagResults::calculateSumOfFractions( const std::vector<const std::v
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::minMaxScalarValues( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex, double* localMin, double* localMax )
{
this->statistics( resVarAddr )->minMaxCellScalarValues( timeStepIndex, *localMin, *localMax );
statistics( resVarAddr )->minMaxCellScalarValues( timeStepIndex, *localMin, *localMax );
}
//--------------------------------------------------------------------------------------------------
@@ -547,7 +547,7 @@ void RigFlowDiagResults::minMaxScalarValues( const RigFlowDiagResultAddress& res
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::minMaxScalarValues( const RigFlowDiagResultAddress& resVarAddr, double* globalMin, double* globalMax )
{
this->statistics( resVarAddr )->minMaxCellScalarValues( *globalMin, *globalMax );
statistics( resVarAddr )->minMaxCellScalarValues( *globalMin, *globalMax );
}
//--------------------------------------------------------------------------------------------------
@@ -558,7 +558,7 @@ void RigFlowDiagResults::posNegClosestToZero( const RigFlowDiagResultAddress& re
double* localPosClosestToZero,
double* localNegClosestToZero )
{
this->statistics( resVarAddr )->posNegClosestToZero( timeStepIndex, *localPosClosestToZero, *localNegClosestToZero );
statistics( resVarAddr )->posNegClosestToZero( timeStepIndex, *localPosClosestToZero, *localNegClosestToZero );
}
//--------------------------------------------------------------------------------------------------
@@ -568,7 +568,7 @@ void RigFlowDiagResults::posNegClosestToZero( const RigFlowDiagResultAddress& re
double* globalPosClosestToZero,
double* globalNegClosestToZero )
{
this->statistics( resVarAddr )->posNegClosestToZero( *globalPosClosestToZero, *globalNegClosestToZero );
statistics( resVarAddr )->posNegClosestToZero( *globalPosClosestToZero, *globalNegClosestToZero );
}
//--------------------------------------------------------------------------------------------------
@@ -578,7 +578,7 @@ void RigFlowDiagResults::meanScalarValue( const RigFlowDiagResultAddress& resVar
{
CVF_ASSERT( meanValue );
this->statistics( resVarAddr )->meanCellScalarValues( *meanValue );
statistics( resVarAddr )->meanCellScalarValues( *meanValue );
}
//--------------------------------------------------------------------------------------------------
@@ -586,7 +586,7 @@ void RigFlowDiagResults::meanScalarValue( const RigFlowDiagResultAddress& resVar
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::meanScalarValue( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex, double* meanValue )
{
this->statistics( resVarAddr )->meanCellScalarValues( timeStepIndex, *meanValue );
statistics( resVarAddr )->meanCellScalarValues( timeStepIndex, *meanValue );
}
//--------------------------------------------------------------------------------------------------
@@ -594,7 +594,7 @@ void RigFlowDiagResults::meanScalarValue( const RigFlowDiagResultAddress& resVar
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::p10p90ScalarValues( const RigFlowDiagResultAddress& resVarAddr, double* p10, double* p90 )
{
this->statistics( resVarAddr )->p10p90CellScalarValues( *p10, *p90 );
statistics( resVarAddr )->p10p90CellScalarValues( *p10, *p90 );
}
//--------------------------------------------------------------------------------------------------
@@ -602,7 +602,7 @@ void RigFlowDiagResults::p10p90ScalarValues( const RigFlowDiagResultAddress& res
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::p10p90ScalarValues( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex, double* p10, double* p90 )
{
this->statistics( resVarAddr )->p10p90CellScalarValues( timeStepIndex, *p10, *p90 );
statistics( resVarAddr )->p10p90CellScalarValues( timeStepIndex, *p10, *p90 );
}
//--------------------------------------------------------------------------------------------------
@@ -612,7 +612,7 @@ void RigFlowDiagResults::sumScalarValue( const RigFlowDiagResultAddress& resVarA
{
CVF_ASSERT( sum );
this->statistics( resVarAddr )->sumCellScalarValues( *sum );
statistics( resVarAddr )->sumCellScalarValues( *sum );
}
//--------------------------------------------------------------------------------------------------
@@ -622,7 +622,7 @@ void RigFlowDiagResults::sumScalarValue( const RigFlowDiagResultAddress& resVarA
{
CVF_ASSERT( sum );
this->statistics( resVarAddr )->sumCellScalarValues( timeStepIndex, *sum );
statistics( resVarAddr )->sumCellScalarValues( timeStepIndex, *sum );
}
//--------------------------------------------------------------------------------------------------
@@ -630,7 +630,7 @@ void RigFlowDiagResults::sumScalarValue( const RigFlowDiagResultAddress& resVarA
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RigFlowDiagResults::scalarValuesHistogram( const RigFlowDiagResultAddress& resVarAddr )
{
return this->statistics( resVarAddr )->cellScalarValuesHistogram();
return statistics( resVarAddr )->cellScalarValuesHistogram();
}
//--------------------------------------------------------------------------------------------------
@@ -638,7 +638,7 @@ const std::vector<size_t>& RigFlowDiagResults::scalarValuesHistogram( const RigF
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RigFlowDiagResults::scalarValuesHistogram( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex )
{
return this->statistics( resVarAddr )->cellScalarValuesHistogram( timeStepIndex );
return statistics( resVarAddr )->cellScalarValuesHistogram( timeStepIndex );
}
//--------------------------------------------------------------------------------------------------
@@ -646,7 +646,7 @@ const std::vector<size_t>& RigFlowDiagResults::scalarValuesHistogram( const RigF
//--------------------------------------------------------------------------------------------------
const std::vector<int>& RigFlowDiagResults::uniqueCellScalarValues( const RigFlowDiagResultAddress& resVarAddr )
{
return this->statistics( resVarAddr )->uniqueCellScalarValues();
return statistics( resVarAddr )->uniqueCellScalarValues();
}
//--------------------------------------------------------------------------------------------------
@@ -654,7 +654,7 @@ const std::vector<int>& RigFlowDiagResults::uniqueCellScalarValues( const RigFlo
//--------------------------------------------------------------------------------------------------
const std::vector<int>& RigFlowDiagResults::uniqueCellScalarValues( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex )
{
return this->statistics( resVarAddr )->uniqueCellScalarValues( timeStepIndex );
return statistics( resVarAddr )->uniqueCellScalarValues( timeStepIndex );
}
//--------------------------------------------------------------------------------------------------
@@ -662,7 +662,7 @@ const std::vector<int>& RigFlowDiagResults::uniqueCellScalarValues( const RigFlo
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::mobileVolumeWeightedMean( const RigFlowDiagResultAddress& resVarAddr, int timeStepIndex, double* mean )
{
this->statistics( resVarAddr )->mobileVolumeWeightedMean( timeStepIndex, *mean );
statistics( resVarAddr )->mobileVolumeWeightedMean( timeStepIndex, *mean );
}
//--------------------------------------------------------------------------------------------------
@@ -670,7 +670,7 @@ void RigFlowDiagResults::mobileVolumeWeightedMean( const RigFlowDiagResultAddres
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::mobileVolumeWeightedMean( const RigFlowDiagResultAddress& resVarAddr, double* mean )
{
this->statistics( resVarAddr )->mobileVolumeWeightedMean( *mean );
statistics( resVarAddr )->mobileVolumeWeightedMean( *mean );
}
//--------------------------------------------------------------------------------------------------
@@ -906,5 +906,5 @@ RimFlowDiagSolution* RigFlowDiagResults::flowDiagSolution()
//--------------------------------------------------------------------------------------------------
void RigFlowDiagResults::setStatisticsDataCacheNumBins( const RigFlowDiagResultAddress& resVarAddr, size_t numBins )
{
this->statistics( resVarAddr )->setNumBins( numBins );
statistics( resVarAddr )->setNumBins( numBins );
}

View File

@@ -64,7 +64,7 @@ void RigFlowDiagTimeStepResult::setTracerTOF( const std::string&
RigFlowDiagResultAddress resAddr( RIG_FLD_TOF_RESNAME, phaseSelection, tracers );
this->addResult( resAddr, cellValues );
addResult( resAddr, cellValues );
std::vector<double>& activeCellValues = m_nativeResults[resAddr];
for ( double& val : activeCellValues )
@@ -83,7 +83,7 @@ void RigFlowDiagTimeStepResult::setTracerFraction( const std::string&
std::set<std::string> tracers;
tracers.insert( tracerName );
this->addResult( RigFlowDiagResultAddress( RIG_FLD_CELL_FRACTION_RESNAME, phaseSelection, tracers ), cellValues );
addResult( RigFlowDiagResultAddress( RIG_FLD_CELL_FRACTION_RESNAME, phaseSelection, tracers ), cellValues );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -1021,7 +1021,7 @@ void RigGeoMechWellLogExtractor::calculateIntersection()
insertIntersectionsInMap( intersections, p1, md1, p2, md2, tolerance, &uniqueIntersections );
}
this->populateReturnArrays( uniqueIntersections );
populateReturnArrays( uniqueIntersections );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -391,7 +391,7 @@ double RigGridBase::characteristicIJCellSize() const
double characteristicCellSize = HUGE_VAL;
double cellSizeI, cellSizeJ, cellSizeK;
this->characteristicCellSizes( &cellSizeI, &cellSizeJ, &cellSizeK );
characteristicCellSizes( &cellSizeI, &cellSizeJ, &cellSizeK );
if ( cellSizeI < characteristicCellSize ) characteristicCellSize = cellSizeI;
if ( cellSizeJ < characteristicCellSize ) characteristicCellSize = cellSizeJ;
@@ -430,9 +430,9 @@ size_t RigGridBase::addCoarseningBox( size_t i1, size_t i2, size_t j1, size_t j2
{
for ( size_t i = i1; i <= i2; i++ )
{
size_t cellIdx = this->cellIndexFromIJK( i, j, k );
size_t cellIdx = cellIndexFromIJK( i, j, k );
RigCell& c = this->cell( cellIdx );
RigCell& c = cell( cellIdx );
CVF_ASSERT( c.coarseningBoxIndex() == cvf::UNDEFINED_SIZE_T );
c.setCoarseningBoxIndex( coarseningBoxIndex );

View File

@@ -355,7 +355,7 @@ void RigMainGrid::setFlipAxis( bool flipXAxis, bool flipYAxis )
RigGridBase* RigMainGrid::gridById( int localGridId )
{
CVF_ASSERT( localGridId >= 0 && static_cast<size_t>( localGridId ) < m_gridIdToIndexMapping.size() );
return this->gridByIndex( m_gridIdToIndexMapping[localGridId] );
return gridByIndex( m_gridIdToIndexMapping[localGridId] );
}
//--------------------------------------------------------------------------------------------------
@@ -399,7 +399,7 @@ void RigMainGrid::setFaults( const cvf::Collection<RigFault>& faults )
#pragma omp parallel for
for ( int i = 0; i < static_cast<int>( m_faults.size() ); i++ )
{
m_faults[i]->computeFaultFacesFromCellRanges( this->mainGrid() );
m_faults[i]->computeFaultFacesFromCellRanges( mainGrid() );
}
}
@@ -527,7 +527,7 @@ void RigMainGrid::addUnNamedFaultFaces( int gcIdx,
if ( firstNO_FAULTFaceForCell ) // To avoid doing this for every face, and only when detecting a NO_FAULT
{
size_t gridLocalCellIndex;
hostGrid = this->gridAndGridLocalIdxFromGlobalCellIdx( gcIdx, &gridLocalCellIndex );
hostGrid = gridAndGridLocalIdxFromGlobalCellIdx( gcIdx, &gridLocalCellIndex );
hostGrid->ijkFromCellIndex( gridLocalCellIndex, &i, &j, &k );
isCellActive = activeCellInfo->isActive( gcIdx );
@@ -602,7 +602,7 @@ void RigMainGrid::distributeNNCsToFaults()
{
if ( m_faultsPrCellAcc.isNull() ) return;
const RigConnectionContainer& nncs = this->nncData()->allConnections();
const RigConnectionContainer& nncs = nncData()->allConnections();
for ( size_t nncIdx = 0; nncIdx < nncs.size(); ++nncIdx )
{
// Find the fault for each side of the nnc

View File

@@ -336,7 +336,7 @@ std::vector<std::pair<QString, QString>> RigStimPlanFractureDefinition::getStimP
{
std::vector<std::pair<QString, QString>> propertyNamesUnits;
{
for ( const RigStimPlanResultFrames& stimPlanDataEntry : this->m_stimPlanResults )
for ( const RigStimPlanResultFrames& stimPlanDataEntry : m_stimPlanResults )
{
propertyNamesUnits.push_back( std::make_pair( stimPlanDataEntry.resultName, stimPlanDataEntry.unit ) );
}
@@ -355,7 +355,7 @@ std::vector<std::vector<double>> RigStimPlanFractureDefinition::conductivityValu
QString conductivityUnitTextOnFile;
std::vector<std::pair<QString, QString>> propertyNamesUnitsOnFile = this->getStimPlanPropertyNamesUnits();
std::vector<std::pair<QString, QString>> propertyNamesUnitsOnFile = getStimPlanPropertyNamesUnits();
for ( auto properyNameUnit : propertyNamesUnitsOnFile )
{
if ( resultName == properyNameUnit.first )
@@ -371,7 +371,7 @@ std::vector<std::vector<double>> RigStimPlanFractureDefinition::conductivityValu
return conductivityValues;
}
conductivityValues = this->getDataAtTimeIndex( resultName, conductivityUnitTextOnFile, activeTimeStepIndex );
conductivityValues = getDataAtTimeIndex( resultName, conductivityUnitTextOnFile, activeTimeStepIndex );
// Check that the data is in the required unit system.
// Convert if not the case.
@@ -421,10 +421,10 @@ cvf::cref<RigFractureGrid> RigStimPlanFractureDefinition::createFractureGrid( co
bool wellCenterStimPlanCellFound = false;
std::vector<double> scaledXs = computeScaledXs( this->m_Xs, xScaleFactor );
std::vector<double> scaledYs = computeScaledYs( this->m_Ys, yScaleFactor, -wellPathIntersectionAtFractureDepth );
std::vector<double> scaledXs = computeScaledXs( m_Xs, xScaleFactor );
std::vector<double> scaledYs = computeScaledYs( m_Ys, yScaleFactor, -wellPathIntersectionAtFractureDepth );
std::vector<double> yCoordsAtNodes = this->adjustedYCoordsAroundWellPathPosition( scaledYs, wellPathIntersectionAtFractureDepth );
std::vector<double> yCoordsAtNodes = adjustedYCoordsAroundWellPathPosition( scaledYs, wellPathIntersectionAtFractureDepth );
std::vector<double> xCoordsAtNodes = scaledXs;
@@ -479,8 +479,8 @@ cvf::cref<RigFractureGrid> RigStimPlanFractureDefinition::createFractureGrid( co
cvf::ref<RigFractureGrid> fractureGrid = new RigFractureGrid;
fractureGrid->setFractureCells( stimPlanCells );
fractureGrid->setWellCenterFractureCellIJ( wellCenterStimPlanCellIJ );
fractureGrid->setICellCount( this->m_Xs.size() - 2 );
fractureGrid->setJCellCount( this->m_Ys.size() - 2 );
fractureGrid->setICellCount( m_Xs.size() - 2 );
fractureGrid->setJCellCount( m_Ys.size() - 2 );
fractureGrid->ensureCellSearchTreeIsBuilt();
return cvf::cref<RigFractureGrid>( fractureGrid.p() );
@@ -493,7 +493,7 @@ std::vector<double>
RigStimPlanFractureDefinition::fractureGridResults( const QString& resultName, const QString& unitName, size_t timeStepIndex ) const
{
std::vector<double> fractureGridResults;
const std::vector<std::vector<double>>& resultValuesAtTimeStep = this->getDataAtTimeIndex( resultName, unitName, timeStepIndex );
const std::vector<std::vector<double>>& resultValuesAtTimeStep = getDataAtTimeIndex( resultName, unitName, timeStepIndex );
for ( int i = 0; i < static_cast<int>( xCount() ) - 2; i++ )
{
@@ -523,13 +523,13 @@ void RigStimPlanFractureDefinition::createFractureTriangleGeometry( double
std::vector<cvf::Vec3f>* vertices,
std::vector<cvf::uint>* triangleIndices ) const
{
std::vector<double> scaledXs = computeScaledXs( this->m_Xs, xScaleFactor );
std::vector<double> scaledYs = computeScaledYs( this->m_Ys, yScaleFactor, -wellPathIntersectionAtFractureDepth );
std::vector<double> scaledXs = computeScaledXs( m_Xs, xScaleFactor );
std::vector<double> scaledYs = computeScaledYs( m_Ys, yScaleFactor, -wellPathIntersectionAtFractureDepth );
std::vector<double> xCoords = scaledXs;
cvf::uint lenXcoords = static_cast<cvf::uint>( xCoords.size() );
std::vector<double> adjustedYs = this->adjustedYCoordsAroundWellPathPosition( scaledYs, wellPathIntersectionAtFractureDepth );
std::vector<double> adjustedYs = adjustedYCoordsAroundWellPathPosition( scaledYs, wellPathIntersectionAtFractureDepth );
for ( cvf::uint k = 0; k < adjustedYs.size(); k++ )
{

View File

@@ -79,7 +79,7 @@ std::vector<WellPathCellIntersectionInfo> RigWellLogExtractor::cellIntersectionI
cellInfo.intersectedCellFaceIn = m_intersectedCellFaces[i];
cellInfo.intersectedCellFaceOut = m_intersectedCellFaces[i + 1];
cellInfo.intersectionLengthsInCellCS = this->calculateLengthInCell( cellInfo.globCellIndex, cellInfo.startPoint, cellInfo.endPoint );
cellInfo.intersectionLengthsInCellCS = calculateLengthInCell( cellInfo.globCellIndex, cellInfo.startPoint, cellInfo.endPoint );
infoVector.push_back( cellInfo );
}