mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
riTRANXYZ: Started to add it to the rest of the system
This commit is contained in:
parent
a3af100189
commit
83965a4f7b
@ -64,6 +64,10 @@ bool RimDefines::isPerCellFaceResult(const QString& resultName)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (resultName.compare(RimDefines::combinedRiTransResultName(), Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
static QString combinedTransmissibilityResultName() { return "TRANSXYZ"; }
|
||||
static QString ternarySaturationResultName() { return "TERNARY"; }
|
||||
static QString combinedMultResultName() { return "MULTXYZ"; }
|
||||
|
||||
static QString combinedRiTransResultName() { return "riTRANSXYZ"; }
|
||||
|
||||
// Mock model text identifiers
|
||||
static QString mockModelBasic() { return "Result Mock Debug Model Simple"; }
|
||||
|
@ -228,6 +228,8 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RimDefines::ResultCatType ty
|
||||
ResultInfo resInfo(type, needsToBeStored, false, resultName, scalarResultIndex);
|
||||
m_resultInfos.push_back(resInfo);
|
||||
|
||||
cvf::ref<RigStatisticsCalculator> statisticsCalculator;
|
||||
|
||||
// Create statistics calculator and add cache object
|
||||
if (resultName == RimDefines::combinedTransmissibilityResultName())
|
||||
{
|
||||
@ -240,8 +242,7 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RimDefines::ResultCatType ty
|
||||
calc->addStatisticsCalculator(new RigNativeStatCalc(this, tranY));
|
||||
calc->addStatisticsCalculator(new RigNativeStatCalc(this, tranZ));
|
||||
|
||||
cvf::ref<RigStatisticsDataCache> dataCache = new RigStatisticsDataCache(calc.p());
|
||||
m_statisticsDataCache.push_back(dataCache.p());
|
||||
statisticsCalculator = calc;
|
||||
}
|
||||
else if (resultName == RimDefines::combinedMultResultName())
|
||||
{
|
||||
@ -272,16 +273,19 @@ size_t RigCaseCellResultsData::addEmptyScalarResult(RimDefines::ResultCatType ty
|
||||
if (scalarIdx != cvf::UNDEFINED_SIZE_T) calc->addStatisticsCalculator(new RigNativeStatCalc(this, scalarIdx));
|
||||
}
|
||||
|
||||
cvf::ref<RigStatisticsDataCache> dataCache = new RigStatisticsDataCache(calc.p());
|
||||
m_statisticsDataCache.push_back(dataCache.p());
|
||||
statisticsCalculator = calc;
|
||||
}
|
||||
else if (resultName == RimDefines::combinedRiTransResultName())
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
cvf::ref<RigNativeStatCalc> calc = new RigNativeStatCalc(this, scalarResultIndex);
|
||||
|
||||
cvf::ref<RigStatisticsDataCache> dataCache = new RigStatisticsDataCache(calc.p());
|
||||
m_statisticsDataCache.push_back(dataCache.p());
|
||||
statisticsCalculator = new RigNativeStatCalc(this, scalarResultIndex);
|
||||
}
|
||||
|
||||
cvf::ref<RigStatisticsDataCache> dataCache = new RigStatisticsDataCache(statisticsCalculator.p());
|
||||
m_statisticsDataCache.push_back(dataCache.p());
|
||||
}
|
||||
|
||||
return scalarResultIndex;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "RigCombRiTransResultAccessor.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -79,6 +80,21 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createResultAccessor(RigCa
|
||||
|
||||
return cellFaceAccessObject;
|
||||
}
|
||||
else if (uiResultName == RimDefines::combinedRiTransResultName())
|
||||
{
|
||||
cvf::ref<RigCombRiTransResultAccessor> cellFaceAccessObject = new RigCombRiTransResultAccessor(grid);
|
||||
|
||||
cvf::ref<RigResultAccessor> permX = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "PERMX");
|
||||
cvf::ref<RigResultAccessor> permY = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "PERMY");
|
||||
cvf::ref<RigResultAccessor> permZ = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "PERMZ");
|
||||
cvf::ref<RigResultAccessor> ntg = RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, "NTG");
|
||||
|
||||
cellFaceAccessObject->setPermResultAccessors(permX.p(), permY.p(), permZ.p());
|
||||
cellFaceAccessObject->setNTGResultAccessor(ntg.p());
|
||||
// todo : cellFaceAccessObject->setCDARCHY();
|
||||
|
||||
return cellFaceAccessObject;
|
||||
}
|
||||
|
||||
return RigResultAccessorFactory::createNativeResultAccessor(eclipseCase, gridIndex, porosityModel, timeStepIndex, uiResultName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user