mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Stop ResInsight from crashing when calculating cell volume (#8374)
* Stop ResInsight from crashing when calculating cell volume
This commit is contained in:
committed by
Magne Sjaastad
parent
985a2c8f30
commit
3bb6642900
@@ -25,7 +25,6 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigActiveCellInfo::RigActiveCellInfo()
|
||||
: m_reservoirActiveCellCount( 0 )
|
||||
, m_reservoirCellResultCount( 0 )
|
||||
, m_activeCellPositionMin( cvf::Vec3d::ZERO )
|
||||
, m_activeCellPositionMax( cvf::Vec3d::ZERO )
|
||||
{
|
||||
@@ -47,14 +46,6 @@ size_t RigActiveCellInfo::reservoirCellCount() const
|
||||
return m_cellIndexToResultIndex.size();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigActiveCellInfo::reservoirCellResultCount() const
|
||||
{
|
||||
return m_reservoirCellResultCount;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -75,11 +66,6 @@ bool RigActiveCellInfo::isActive( size_t reservoirCellIndex ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigActiveCellInfo::cellResultIndex( size_t reservoirCellIndex ) const
|
||||
{
|
||||
if ( m_cellIndexToResultIndex.size() == 0 )
|
||||
{
|
||||
return reservoirCellIndex;
|
||||
}
|
||||
|
||||
CVF_TIGHT_ASSERT( reservoirCellIndex < m_cellIndexToResultIndex.size() );
|
||||
|
||||
return m_cellIndexToResultIndex[reservoirCellIndex];
|
||||
@@ -94,11 +80,11 @@ void RigActiveCellInfo::setCellResultIndex( size_t reservoirCellIndex, size_t re
|
||||
|
||||
m_cellIndexToResultIndex[reservoirCellIndex] = reservoirCellResultIndex;
|
||||
|
||||
if ( reservoirCellResultIndex >= m_reservoirCellResultCount )
|
||||
{
|
||||
#pragma omp critical
|
||||
m_reservoirCellResultCount = reservoirCellResultIndex + 1;
|
||||
}
|
||||
// if ( reservoirCellResultIndex >= m_reservoirActiveCellCount )
|
||||
// {
|
||||
//#pragma omp critical
|
||||
// m_reservoirActiveCellCount = reservoirCellResultIndex + 1;
|
||||
// }
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -215,14 +201,6 @@ void RigActiveCellInfo::addLgr( size_t cellCount )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigActiveCellInfo::isCoarseningActive() const
|
||||
{
|
||||
return m_reservoirCellResultCount != m_reservoirActiveCellCount;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user