mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5914 Import faults : Avoid computation of faults if turned off in preferences
This commit is contained in:
@@ -609,12 +609,16 @@ void RimEclipseCase::computeCachedData()
|
|||||||
{
|
{
|
||||||
auto task = pInf.task( "Calculating faults", 17 );
|
auto task = pInf.task( "Calculating faults", 17 );
|
||||||
|
|
||||||
|
bool computeFaults = RiaApplication::instance()->preferences()->readerSettings()->importFaults();
|
||||||
|
if ( computeFaults )
|
||||||
|
{
|
||||||
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
||||||
|
|
||||||
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
||||||
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
||||||
computeNncs );
|
computeNncs );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto task = pInf.task( "Calculating Formation Names Result", 2 );
|
auto task = pInf.task( "Calculating Formation Names Result", 2 );
|
||||||
|
|||||||
@@ -132,11 +132,14 @@ RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection( RigEclipseC
|
|||||||
// This is the first insertion of this grid, compute cached data
|
// This is the first insertion of this grid, compute cached data
|
||||||
rigEclipseCase->mainGrid()->computeCachedData();
|
rigEclipseCase->mainGrid()->computeCachedData();
|
||||||
|
|
||||||
|
bool computeFaults = RiaApplication::instance()->preferences()->readerSettings()->importFaults();
|
||||||
|
if ( computeFaults )
|
||||||
|
{
|
||||||
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
||||||
|
|
||||||
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
||||||
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
||||||
computeNncs );
|
computeNncs );
|
||||||
|
}
|
||||||
|
|
||||||
equalGrid = rigEclipseCase->mainGrid();
|
equalGrid = rigEclipseCase->mainGrid();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -569,6 +569,8 @@ void RigMainGrid::calculateFaults( const RigActiveCellInfo* activeCellInfo, bool
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigMainGrid::distributeNNCsToFaults()
|
void RigMainGrid::distributeNNCsToFaults()
|
||||||
{
|
{
|
||||||
|
if ( m_faultsPrCellAcc.isNull() ) return;
|
||||||
|
|
||||||
const RigConnectionContainer& nncs = this->nncData()->connections();
|
const RigConnectionContainer& nncs = this->nncData()->connections();
|
||||||
for ( size_t nncIdx = 0; nncIdx < nncs.size(); ++nncIdx )
|
for ( size_t nncIdx = 0; nncIdx < nncs.size(); ++nncIdx )
|
||||||
{
|
{
|
||||||
@@ -655,7 +657,7 @@ bool RigMainGrid::isFaceNormalsOutwards() const
|
|||||||
const RigFault* RigMainGrid::findFaultFromCellIndexAndCellFace( size_t reservoirCellIndex,
|
const RigFault* RigMainGrid::findFaultFromCellIndexAndCellFace( size_t reservoirCellIndex,
|
||||||
cvf::StructGridInterface::FaceType face ) const
|
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;
|
if ( face == cvf::StructGridInterface::NO_FACE ) return nullptr;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user