mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2763 Use std::min and std::max instead of CVF_MAX and CVF_MIN
This commit is contained in:
committed by
Magne Sjaastad
parent
a114309776
commit
a6ddf7e6c4
@@ -2112,7 +2112,7 @@ void RigCaseCellResultsData::computeRiTransComponent( const QString& riTransComp
|
||||
if ( hasNTGResults )
|
||||
{
|
||||
size_t ntgResultValueCount = m_cellScalarResults[ntgResultIdx][0].size();
|
||||
resultValueCount = CVF_MIN( permxResultValueCount, ntgResultValueCount );
|
||||
resultValueCount = std::min( permxResultValueCount, ntgResultValueCount );
|
||||
}
|
||||
|
||||
// Get all the actual result values
|
||||
|
||||
@@ -115,9 +115,9 @@ void RigCaseToCaseRangeFilterMapper::convertRangeFilter( const RimCellRangeFilte
|
||||
maxJIndex = femPart->getOrCreateStructGrid()->cellCountJ() - 1;
|
||||
maxKIndex = femPart->getOrCreateStructGrid()->cellCountK() - 1;
|
||||
}
|
||||
src.EndI = CVF_MIN( src.EndI, maxIIndex );
|
||||
src.EndJ = CVF_MIN( src.EndJ, maxJIndex );
|
||||
src.EndK = CVF_MIN( src.EndK, maxKIndex );
|
||||
src.EndI = std::min( src.EndI, maxIIndex );
|
||||
src.EndJ = std::min( src.EndJ, maxJIndex );
|
||||
src.EndK = std::min( src.EndK, maxKIndex );
|
||||
}
|
||||
|
||||
// When using femPart as source we need to clamp the fem srcRange filter
|
||||
@@ -137,12 +137,12 @@ void RigCaseToCaseRangeFilterMapper::convertRangeFilter( const RimCellRangeFilte
|
||||
|
||||
convertRangeFilterEndPoints( eclMaxMin, eclExtInFem, eclGrid, femPart, true );
|
||||
|
||||
src.StartI = CVF_MAX( src.StartI, eclExtInFem.StartI );
|
||||
src.StartJ = CVF_MAX( src.StartJ, eclExtInFem.StartJ );
|
||||
src.StartK = CVF_MAX( src.StartK, eclExtInFem.StartK );
|
||||
src.EndI = CVF_MIN( src.EndI, eclExtInFem.EndI );
|
||||
src.EndJ = CVF_MIN( src.EndJ, eclExtInFem.EndJ );
|
||||
src.EndK = CVF_MIN( src.EndK, eclExtInFem.EndK );
|
||||
src.StartI = std::max( src.StartI, eclExtInFem.StartI );
|
||||
src.StartJ = std::max( src.StartJ, eclExtInFem.StartJ );
|
||||
src.StartK = std::max( src.StartK, eclExtInFem.StartK );
|
||||
src.EndI = std::min( src.EndI, eclExtInFem.EndI );
|
||||
src.EndJ = std::min( src.EndJ, eclExtInFem.EndJ );
|
||||
src.EndK = std::min( src.EndK, eclExtInFem.EndK );
|
||||
}
|
||||
|
||||
RigRangeEndPoints dst;
|
||||
@@ -270,12 +270,12 @@ void RigCaseToCaseRangeFilterMapper::convertRangeFilterEndPoints( const RigRange
|
||||
if ( foundExactMatch )
|
||||
{
|
||||
// Populate dst range filter from the diagonal that matches exact
|
||||
dst.StartI = CVF_MIN( rangeFilterMatches[cornerIdx].ijk[0], rangeFilterMatches[diagIdx].ijk[0] );
|
||||
dst.StartJ = CVF_MIN( rangeFilterMatches[cornerIdx].ijk[1], rangeFilterMatches[diagIdx].ijk[1] );
|
||||
dst.StartK = CVF_MIN( rangeFilterMatches[cornerIdx].ijk[2], rangeFilterMatches[diagIdx].ijk[2] );
|
||||
dst.EndI = CVF_MAX( rangeFilterMatches[cornerIdx].ijk[0], rangeFilterMatches[diagIdx].ijk[0] );
|
||||
dst.EndJ = CVF_MAX( rangeFilterMatches[cornerIdx].ijk[1], rangeFilterMatches[diagIdx].ijk[1] );
|
||||
dst.EndK = CVF_MAX( rangeFilterMatches[cornerIdx].ijk[2], rangeFilterMatches[diagIdx].ijk[2] );
|
||||
dst.StartI = std::min( rangeFilterMatches[cornerIdx].ijk[0], rangeFilterMatches[diagIdx].ijk[0] );
|
||||
dst.StartJ = std::min( rangeFilterMatches[cornerIdx].ijk[1], rangeFilterMatches[diagIdx].ijk[1] );
|
||||
dst.StartK = std::min( rangeFilterMatches[cornerIdx].ijk[2], rangeFilterMatches[diagIdx].ijk[2] );
|
||||
dst.EndI = std::max( rangeFilterMatches[cornerIdx].ijk[0], rangeFilterMatches[diagIdx].ijk[0] );
|
||||
dst.EndJ = std::max( rangeFilterMatches[cornerIdx].ijk[1], rangeFilterMatches[diagIdx].ijk[1] );
|
||||
dst.EndK = std::max( rangeFilterMatches[cornerIdx].ijk[2], rangeFilterMatches[diagIdx].ijk[2] );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -409,7 +409,7 @@ void RigReservoirBuilderMock::addWellData( RigEclipseCaseData* eclipseCase, RigG
|
||||
wellCells.m_wellHead.m_gridCellIndex = grid->cellIndexFromIJK( 1, 0, 0 );
|
||||
|
||||
// Connections
|
||||
// int connectionCount = CVF_MIN(dim.x(), CVF_MIN(dim.y(), dim.z())) - 2;
|
||||
// int connectionCount = std::min(dim.x(), std::min(dim.y(), dim.z())) - 2;
|
||||
size_t connectionCount = dim.z() - 2;
|
||||
if ( connectionCount > 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user