#5914 Import faults : Avoid computation of faults if turned off in preferences

This commit is contained in:
Magne Sjaastad
2020-05-13 12:38:33 +02:00
parent 2bc9cb37c0
commit 0c32538e01
3 changed files with 19 additions and 10 deletions

View File

@@ -569,6 +569,8 @@ void RigMainGrid::calculateFaults( const RigActiveCellInfo* activeCellInfo, bool
//--------------------------------------------------------------------------------------------------
void RigMainGrid::distributeNNCsToFaults()
{
if ( m_faultsPrCellAcc.isNull() ) return;
const RigConnectionContainer& nncs = this->nncData()->connections();
for ( size_t nncIdx = 0; nncIdx < nncs.size(); ++nncIdx )
{
@@ -655,7 +657,7 @@ bool RigMainGrid::isFaceNormalsOutwards() const
const RigFault* RigMainGrid::findFaultFromCellIndexAndCellFace( size_t reservoirCellIndex,
cvf::StructGridInterface::FaceType face ) const
{
CVF_TIGHT_ASSERT( m_faultsPrCellAcc.notNull() );
if ( m_faultsPrCellAcc.isNull() ) return nullptr;
if ( face == cvf::StructGridInterface::NO_FACE ) return nullptr;