#273 Undefined grid faults between cells where one or both are inactive is now sorted into a seaparate predefined fault section.

This commit is contained in:
Jacob Støren
2016-08-22 13:24:46 +02:00
parent 37099929d6
commit cf93a67b5e
6 changed files with 55 additions and 12 deletions

View File

@@ -44,7 +44,8 @@ public:
static bool isPerCellFaceResult(const QString& resultName);
static QString undefinedResultName() { return "None"; }
static QString undefinedGridFaultName() { return "Undefined grid faults"; }
static QString undefinedGridFaultName() { return "Undefined Grid Faults"; }
static QString undefinedGridFaultWithInactiveName() { return "Undefined Grid Faults With Inactive"; }
static QString combinedTransmissibilityResultName() { return "TRANXYZ"; }
static QString ternarySaturationResultName() { return "TERNARY"; }
static QString combinedMultResultName() { return "MULTXYZ"; }

View File

@@ -299,11 +299,12 @@ void RimEclipseCase::computeCachedData()
pInf.incrementProgress();
pInf.setNextProgressIncrement(10);
pInf.setProgressDescription("Calculating Cell Search Tree");
rigEclipseCase->mainGrid()->computeCachedData();
pInf.incrementProgress();
pInf.setProgressDescription("Calculating faults");
rigEclipseCase->mainGrid()->calculateFaults();
rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS));
pInf.incrementProgress();
}
}

View File

@@ -167,7 +167,7 @@ RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigCaseData*
// This is the first insertion of this grid, compute cached data
rigEclipseCase->mainGrid()->computeCachedData();
rigEclipseCase->mainGrid()->calculateFaults();
rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS));
equalGrid = rigEclipseCase->mainGrid();
}

View File

@@ -198,21 +198,35 @@ void RimFaultCollection::syncronizeFaults()
std::sort(sortedFaults.begin(), sortedFaults.end(), faultComparator);
cvf::ref<RigFault> undefinedFaults;
cvf::ref<RigFault> undefinedFaultsWInactive;
for (size_t i = 0; i < sortedFaults.size(); i++)
{
if (sortedFaults[i]->name().compare(RimDefines::undefinedGridFaultName(), Qt::CaseInsensitive) == 0)
QString faultName = sortedFaults[i]->name();
if (faultName.compare(RimDefines::undefinedGridFaultName(), Qt::CaseInsensitive) == 0)
{
undefinedFaults = sortedFaults[i];
}
if(faultName.startsWith(RimDefines::undefinedGridFaultName(), Qt::CaseInsensitive)
&& faultName.contains("Inactive"))
{
undefinedFaultsWInactive = sortedFaults[i];
}
}
if (undefinedFaults.notNull())
{
sortedFaults.erase(undefinedFaults.p());
rigFaults.push_back(undefinedFaults.p());
}
if(undefinedFaultsWInactive.notNull())
{
sortedFaults.erase(undefinedFaultsWInactive.p());
rigFaults.push_back(undefinedFaultsWInactive.p());
}
for (size_t i = 0; i < sortedFaults.size(); i++)
{
rigFaults.push_back(sortedFaults[i].p());