mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1386 Fixed crash when pasting eclipse case into grid case group
This commit is contained in:
@@ -20,12 +20,14 @@
|
||||
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RimDefines.h"
|
||||
#include "RigFault.h"
|
||||
#include "cvfBoundingBoxTree.h"
|
||||
#include "RigActiveCellInfo.h"
|
||||
|
||||
#include "cvfBoundingBoxTree.h"
|
||||
#include "cvfAssert.h"
|
||||
|
||||
|
||||
RigMainGrid::RigMainGrid(void)
|
||||
: RigGridBase(this)
|
||||
@@ -215,12 +217,32 @@ void RigMainGrid::setFaults(const cvf::Collection<RigFault>& faults)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigMainGrid::hasFaultWithName(const QString& name) const
|
||||
{
|
||||
for (auto fault : m_faults)
|
||||
{
|
||||
if (fault->name() == name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigMainGrid::calculateFaults(const RigActiveCellInfo* activeCellInfo)
|
||||
{
|
||||
if (hasFaultWithName(RimDefines::undefinedGridFaultName())
|
||||
&& hasFaultWithName(RimDefines::undefinedGridFaultWithInactiveName()))
|
||||
{
|
||||
RiaLogging::debug(QString("Calculate faults already run for grid."));
|
||||
return;
|
||||
}
|
||||
m_faultsPrCellAcc = new RigFaultsPrCellAccumulator(m_cells.size());
|
||||
|
||||
// Spread fault idx'es on the cells from the faults
|
||||
|
||||
@@ -81,6 +81,7 @@ private:
|
||||
void initAllSubGridsParentGridPointer();
|
||||
void initAllSubCellsMainGridCellIndex();
|
||||
void buildCellSearchTree();
|
||||
bool hasFaultWithName(const QString& name) const;
|
||||
|
||||
private:
|
||||
std::vector<cvf::Vec3d> m_nodes; ///< Global vertex table
|
||||
|
||||
Reference in New Issue
Block a user