mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3581 Temp LGR. No recreation of faults after creating temporary LGRs
This commit is contained in:
parent
ad3a3f46ee
commit
d2249e4d17
@ -142,7 +142,7 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
||||
}
|
||||
}
|
||||
|
||||
mainGrid->calculateFaults(activeCellInfo, true);
|
||||
mainGrid->calculateFaults(activeCellInfo);
|
||||
}
|
||||
|
||||
RiuSelectionManager::instance()->deleteAllItems(RiuSelectionManager::RUI_APPLICATION_GLOBAL);
|
||||
|
@ -50,7 +50,12 @@ public:
|
||||
|
||||
inline int faultIdx(size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face) const
|
||||
{
|
||||
return m_faultIdxForCellFace[reservoirCellIndex][face];
|
||||
// Ensure no crash after creating temporary LGRs
|
||||
if (reservoirCellIndex < m_faultIdxForCellFace.size())
|
||||
{
|
||||
return m_faultIdxForCellFace[reservoirCellIndex][face];
|
||||
}
|
||||
return NO_FAULT;
|
||||
}
|
||||
|
||||
inline void setFaultIdx(size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face, int faultIdx)
|
||||
|
@ -421,9 +421,9 @@ bool RigMainGrid::hasFaultWithName(const QString& name) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo, bool forceCalculation)
|
||||
void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo)
|
||||
{
|
||||
if (!forceCalculation && hasFaultWithName(RiaDefines::undefinedGridFaultName()) &&
|
||||
if (hasFaultWithName(RiaDefines::undefinedGridFaultName()) &&
|
||||
hasFaultWithName(RiaDefines::undefinedGridFaultWithInactiveName()))
|
||||
{
|
||||
// RiaLogging::debug(QString("Calculate faults already run for grid."));
|
||||
@ -431,8 +431,6 @@ void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo, bool
|
||||
return;
|
||||
}
|
||||
|
||||
m_faults.clear();
|
||||
|
||||
m_faultsPrCellAcc = new RigFaultsPrCellAccumulator(m_cells.size());
|
||||
|
||||
// Spread fault idx'es on the cells from the faults
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
RigNNCData* nncData();
|
||||
void setFaults(const cvf::Collection<RigFault>& faults);
|
||||
const cvf::Collection<RigFault>& faults();
|
||||
void calculateFaults(const RigActiveCellInfo* activeCellInfo, bool forceCalculation = false);
|
||||
void calculateFaults(const RigActiveCellInfo* activeCellInfo);
|
||||
|
||||
void distributeNNCsToFaults();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user