mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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"; }
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user