#1755 Use namespace RiaDefines instead of class

This commit is contained in:
Magne Sjaastad
2017-08-11 14:05:59 +02:00
parent 8f3a7a5867
commit 89684c243f
49 changed files with 507 additions and 303 deletions

View File

@@ -100,3 +100,211 @@ bool RiaDefines::isPerCellFaceResult(const QString& resultName)
return false; return false;
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::undefinedResultName()
{
return "None";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::undefinedGridFaultName()
{
return "Undefined Grid Faults";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::undefinedGridFaultWithInactiveName()
{
return "Undefined Grid Faults With Inactive";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::combinedTransmissibilityResultName()
{
return "TRANXYZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::ternarySaturationResultName()
{
return "TERNARY";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::combinedMultResultName()
{
return "MULTXYZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riTranXResultName()
{
return "riTRANX";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riTranYResultName()
{
return "riTRANY";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riTranZResultName()
{
return "riTRANZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::combinedRiTranResultName()
{
return "riTRANXYZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riMultXResultName()
{
return "riMULTX";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riMultYResultName()
{
return "riMULTY";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riMultZResultName()
{
return "riMULTZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::combinedRiMultResultName()
{
return "riMULTXYZ";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riAreaNormTranXResultName()
{
return "riTRANXbyArea";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riAreaNormTranYResultName()
{
return "riTRANYbyArea";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::riAreaNormTranZResultName()
{
return "riTRANZbyArea";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::combinedRiAreaNormTranResultName()
{
return "riTRANXYZbyArea";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::completionTypeResultName()
{
return "Completion Type";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::mockModelBasic()
{
return "Result Mock Debug Model Simple";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::mockModelBasicWithResults()
{
return "Result Mock Debug Model With Results";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::mockModelLargeWithResults()
{
return "Result Mock Debug Model Large With Results";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::mockModelCustomized()
{
return "Result Mock Debug Model Customized";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::mockModelBasicInputCase()
{
return "Input Mock Debug Model Simple";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RiaDefines::minimumDefaultValuePlot()
{
return -10.0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RiaDefines::maximumDefaultValuePlot()
{
return 100.0;
}

View File

@@ -22,10 +22,8 @@
#include <QString> #include <QString>
class RiaDefines namespace RiaDefines
{ {
public:
enum ResultCatType enum ResultCatType
{ {
DYNAMIC_NATIVE, DYNAMIC_NATIVE,
@@ -43,38 +41,38 @@ public:
FISHBONES FISHBONES
}; };
static bool isPerCellFaceResult(const QString& resultName); bool isPerCellFaceResult(const QString& resultName);
static QString undefinedResultName() { return "None"; } QString undefinedResultName();
static QString undefinedGridFaultName() { return "Undefined Grid Faults"; } QString undefinedGridFaultName();
static QString undefinedGridFaultWithInactiveName() { return "Undefined Grid Faults With Inactive"; } QString undefinedGridFaultWithInactiveName();
static QString combinedTransmissibilityResultName() { return "TRANXYZ"; } QString combinedTransmissibilityResultName();
static QString ternarySaturationResultName() { return "TERNARY"; } QString ternarySaturationResultName();
static QString combinedMultResultName() { return "MULTXYZ"; } QString combinedMultResultName();
static QString riTranXResultName() { return "riTRANX"; } QString riTranXResultName();
static QString riTranYResultName() { return "riTRANY"; } QString riTranYResultName();
static QString riTranZResultName() { return "riTRANZ"; } QString riTranZResultName();
static QString combinedRiTranResultName() { return "riTRANXYZ"; } QString combinedRiTranResultName();
static QString riMultXResultName() { return "riMULTX"; } QString riMultXResultName();
static QString riMultYResultName() { return "riMULTY"; } QString riMultYResultName();
static QString riMultZResultName() { return "riMULTZ"; } QString riMultZResultName();
static QString combinedRiMultResultName() { return "riMULTXYZ"; } QString combinedRiMultResultName();
static QString riAreaNormTranXResultName() { return "riTRANXbyArea"; } QString riAreaNormTranXResultName();
static QString riAreaNormTranYResultName() { return "riTRANYbyArea"; } QString riAreaNormTranYResultName();
static QString riAreaNormTranZResultName() { return "riTRANZbyArea"; } QString riAreaNormTranZResultName();
static QString combinedRiAreaNormTranResultName() { return "riTRANXYZbyArea"; } QString combinedRiAreaNormTranResultName();
static QString completionTypeResultName() { return "Completion Type"; } QString completionTypeResultName();
// Mock model text identifiers // Mock model text identifiers
static QString mockModelBasic() { return "Result Mock Debug Model Simple"; } QString mockModelBasic();
static QString mockModelBasicWithResults() { return "Result Mock Debug Model With Results"; } QString mockModelBasicWithResults();
static QString mockModelLargeWithResults() { return "Result Mock Debug Model Large With Results"; } QString mockModelLargeWithResults();
static QString mockModelCustomized() { return "Result Mock Debug Model Customized"; } QString mockModelCustomized();
static QString mockModelBasicInputCase() { return "Input Mock Debug Model Simple"; } QString mockModelBasicInputCase();
//Units and conversions //Units and conversions
@@ -94,7 +92,7 @@ public:
PLOT_AXIS_RIGHT PLOT_AXIS_RIGHT
}; };
static double minimumDefaultValuePlot() { return - 10.0; } double minimumDefaultValuePlot();
static double maximumDefaultValuePlot() { return 100.0; } double maximumDefaultValuePlot();
}; };

View File

@@ -22,10 +22,10 @@
template<> template<>
void caf::AppEnum< RiaPorosityModel::PorosityModelType >::setUp() void caf::AppEnum< RiaDefines::PorosityModelType >::setUp()
{ {
addItem(RiaPorosityModel::MATRIX_MODEL, "MATRIX_MODEL", "Matrix"); addItem(RiaDefines::MATRIX_MODEL, "MATRIX_MODEL", "Matrix");
addItem(RiaPorosityModel::FRACTURE_MODEL, "FRACTURE_MODEL", "Fracture"); addItem(RiaDefines::FRACTURE_MODEL, "FRACTURE_MODEL", "Fracture");
setDefault(RiaPorosityModel::MATRIX_MODEL); setDefault(RiaDefines::MATRIX_MODEL);
} }

View File

@@ -21,9 +21,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
class RiaPorosityModel namespace RiaDefines {
{
public:
enum PorosityModelType enum PorosityModelType
{ {
MATRIX_MODEL, MATRIX_MODEL,

View File

@@ -86,7 +86,7 @@ std::vector<RigCompletionData> RicFishbonesTransmissibilityCalculationFeatureImp
std::vector<RigCompletionData> completionData; std::vector<RigCompletionData> completionData;
RigMainGrid* grid = settings.caseToApply->eclipseCaseData()->mainGrid(); RigMainGrid* grid = settings.caseToApply->eclipseCaseData()->mainGrid();
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
for (auto cellAndWellBoreParts : wellBorePartsInCells) for (auto cellAndWellBoreParts : wellBorePartsInCells)
{ {

View File

@@ -582,7 +582,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType(); RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
std::vector<RigCompletionData> completionData; std::vector<RigCompletionData> completionData;
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
for (const RimPerforationInterval* interval : wellPath->perforationIntervalCollection()->perforations()) for (const RimPerforationInterval* interval : wellPath->perforationIntervalCollection()->perforations())
@@ -813,12 +813,12 @@ CellDirection RicWellPathExportCompletionDataFeature::calculateDirectionInCell(R
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
double xLengthFraction = abs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex)); double xLengthFraction = abs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex));
double yLengthFraction = abs(lengthsInCell.y() / dyAccessObject->cellScalarGlobIdx(cellIndex)); double yLengthFraction = abs(lengthsInCell.y() / dyAccessObject->cellScalarGlobIdx(cellIndex));
@@ -852,19 +852,19 @@ double RicWellPathExportCompletionDataFeature::calculateTransmissibility(RimEcli
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX");
cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMX"); cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY");
cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMY"); cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ");
cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMZ"); cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
double dx = dxAccessObject->cellScalarGlobIdx(cellIndex); double dx = dxAccessObject->cellScalarGlobIdx(cellIndex);
double dy = dyAccessObject->cellScalarGlobIdx(cellIndex); double dy = dyAccessObject->cellScalarGlobIdx(cellIndex);
@@ -901,19 +901,19 @@ double RicWellPathExportCompletionDataFeature::calculateTransmissibilityAsEclips
{ {
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DX");
cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DX"); cvf::ref<RigResultAccessor> dxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DX");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DY");
cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DY"); cvf::ref<RigResultAccessor> dyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DY");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ");
cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "DZ"); cvf::ref<RigResultAccessor> dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMX");
cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMX"); cvf::ref<RigResultAccessor> permxAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMX");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMY");
cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMY"); cvf::ref<RigResultAccessor> permyAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMY");
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ"); eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "PERMZ");
cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaPorosityModel::MATRIX_MODEL, 0, "PERMZ"); cvf::ref<RigResultAccessor> permzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "PERMZ");
double dx = dxAccessObject->cellScalarGlobIdx(cellIndex); double dx = dxAccessObject->cellScalarGlobIdx(cellIndex);
double dy = dyAccessObject->cellScalarGlobIdx(cellIndex); double dy = dyAccessObject->cellScalarGlobIdx(cellIndex);

View File

@@ -260,7 +260,7 @@ RigActiveCellInfo* RicCellRangeUi::activeCellInfo() const
RimEclipseCase* rimEclipeCase = dynamic_cast<RimEclipseCase*>(m_case()); RimEclipseCase* rimEclipeCase = dynamic_cast<RimEclipseCase*>(m_case());
if (rimEclipeCase && rimEclipeCase->eclipseCaseData()) if (rimEclipeCase && rimEclipeCase->eclipseCaseData())
{ {
return rimEclipeCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); return rimEclipeCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
} }
return nullptr; return nullptr;

View File

@@ -231,7 +231,7 @@ std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QStrin
ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false, ecl_type_create_from_type(ECL_FLOAT_TYPE)); ecl_kw_type* eclipseKeywordData = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false, ecl_type_create_from_type(ECL_FLOAT_TYPE));
if (eclipseKeywordData) if (eclipseKeywordData)
{ {
QString newResultName = caseData->results(RiaPorosityModel::MATRIX_MODEL)->makeResultNameUnique(fileKeywords[i].keyword); QString newResultName = caseData->results(RiaDefines::MATRIX_MODEL)->makeResultNameUnique(fileKeywords[i].keyword);
if (readDataFromKeyword(eclipseKeywordData, caseData, newResultName)) if (readDataFromKeyword(eclipseKeywordData, caseData, newResultName))
{ {
newResults[newResultName] = fileKeywords[i].keyword; newResults[newResultName] = fileKeywords[i].keyword;
@@ -290,7 +290,7 @@ bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordDa
{ {
mathingItemCount = true; mathingItemCount = true;
} }
if (itemCount == caseData->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->reservoirActiveCellCount()) if (itemCount == caseData->activeCellInfo(RiaDefines::MATRIX_MODEL)->reservoirActiveCellCount())
{ {
mathingItemCount = true; mathingItemCount = true;
} }
@@ -301,7 +301,7 @@ bool RifEclipseInputFileTools::readDataFromKeyword(ecl_kw_type* eclipseKeywordDa
size_t resultIndex = RifEclipseInputFileTools::findOrCreateResult(resultName, caseData); size_t resultIndex = RifEclipseInputFileTools::findOrCreateResult(resultName, caseData);
if (resultIndex == cvf::UNDEFINED_SIZE_T) return false; if (resultIndex == cvf::UNDEFINED_SIZE_T) return false;
std::vector< std::vector<double> >& newPropertyData = caseData->results(RiaPorosityModel::MATRIX_MODEL)->cellScalarResults(resultIndex); std::vector< std::vector<double> >& newPropertyData = caseData->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(resultIndex);
newPropertyData.push_back(std::vector<double>()); newPropertyData.push_back(std::vector<double>());
newPropertyData[0].resize(ecl_kw_get_size(eclipseKeywordData), HUGE_VAL); newPropertyData[0].resize(ecl_kw_get_size(eclipseKeywordData), HUGE_VAL);
ecl_kw_get_data_as_double(eclipseKeywordData, newPropertyData[0].data()); ecl_kw_get_data_as_double(eclipseKeywordData, newPropertyData[0].data());
@@ -446,7 +446,7 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName,
{ {
CVF_ASSERT(eclipseCase); CVF_ASSERT(eclipseCase);
size_t resultIndex = eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->findScalarResultIndex(resultName); size_t resultIndex = eclipseCase->results(RiaDefines::MATRIX_MODEL)->findScalarResultIndex(resultName);
if (resultIndex == cvf::UNDEFINED_SIZE_T) if (resultIndex == cvf::UNDEFINED_SIZE_T)
{ {
return false; return false;
@@ -458,7 +458,7 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName,
return false; return false;
} }
std::vector< std::vector<double> >& resultData = eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->cellScalarResults(resultIndex); std::vector< std::vector<double> >& resultData = eclipseCase->results(RiaDefines::MATRIX_MODEL)->cellScalarResults(resultIndex);
if (resultData.size() == 0) if (resultData.size() == 0)
{ {
return false; return false;
@@ -717,10 +717,10 @@ qint64 RifEclipseInputFileTools::findKeyword(const QString& keyword, QFile& file
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir) size_t RifEclipseInputFileTools::findOrCreateResult(const QString& newResultName, RigEclipseCaseData* reservoir)
{ {
size_t resultIndex = reservoir->results(RiaPorosityModel::MATRIX_MODEL)->findScalarResultIndex(newResultName); size_t resultIndex = reservoir->results(RiaDefines::MATRIX_MODEL)->findScalarResultIndex(newResultName);
if (resultIndex == cvf::UNDEFINED_SIZE_T) if (resultIndex == cvf::UNDEFINED_SIZE_T)
{ {
resultIndex = reservoir->results(RiaPorosityModel::MATRIX_MODEL)->addEmptyScalarResult(RiaDefines::INPUT_PROPERTY, newResultName, false); resultIndex = reservoir->results(RiaDefines::MATRIX_MODEL)->addEmptyScalarResult(RiaDefines::INPUT_PROPERTY, newResultName, false);
} }
return resultIndex; return resultIndex;

View File

@@ -38,6 +38,6 @@ public:
virtual void close() {} virtual void close() {}
virtual bool staticResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values ) { return false; } virtual bool staticResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values ) { return false; }
virtual bool dynamicResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values ) { return false; } virtual bool dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values ) { return false; }
}; };

View File

@@ -242,8 +242,8 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
return false; return false;
} }
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL);
RigActiveCellInfo* fractureActiveCellInfo = eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL); RigActiveCellInfo* fractureActiveCellInfo = eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL);
CVF_ASSERT(activeCellInfo && fractureActiveCellInfo); CVF_ASSERT(activeCellInfo && fractureActiveCellInfo);
@@ -580,8 +580,8 @@ bool RifReaderEclipseOutput::readActiveCellInfo()
return false; return false;
} }
RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); RigActiveCellInfo* activeCellInfo = m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL);
RigActiveCellInfo* fractureActiveCellInfo = m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL); RigActiveCellInfo* fractureActiveCellInfo = m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL);
activeCellInfo->setReservoirCellCount(reservoirCellCount); activeCellInfo->setReservoirCellCount(reservoirCellCount);
fractureActiveCellInfo->setReservoirCellCount(reservoirCellCount); fractureActiveCellInfo->setReservoirCellCount(reservoirCellCount);
@@ -644,8 +644,8 @@ void RifReaderEclipseOutput::buildMetaData()
progInfo.setNextProgressIncrement(m_filesWithSameBaseName.size()); progInfo.setNextProgressIncrement(m_filesWithSameBaseName.size());
RigCaseCellResultsData* matrixModelResults = m_eclipseCase->results(RiaPorosityModel::MATRIX_MODEL); RigCaseCellResultsData* matrixModelResults = m_eclipseCase->results(RiaDefines::MATRIX_MODEL);
RigCaseCellResultsData* fractureModelResults = m_eclipseCase->results(RiaPorosityModel::FRACTURE_MODEL); RigCaseCellResultsData* fractureModelResults = m_eclipseCase->results(RiaDefines::FRACTURE_MODEL);
std::vector<RigTimeStepInfo> timeStepInfos; std::vector<RigTimeStepInfo> timeStepInfos;
@@ -665,9 +665,9 @@ void RifReaderEclipseOutput::buildMetaData()
{ {
QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts,
m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL),
m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL),
RiaPorosityModel::MATRIX_MODEL, m_dynamicResultsAccess->timeStepCount()); RiaDefines::MATRIX_MODEL, m_dynamicResultsAccess->timeStepCount());
for (int i = 0; i < matrixResultNames.size(); ++i) for (int i = 0; i < matrixResultNames.size(); ++i)
{ {
@@ -678,9 +678,9 @@ void RifReaderEclipseOutput::buildMetaData()
{ {
QStringList fractureResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, QStringList fractureResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts,
m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL),
m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL),
RiaPorosityModel::FRACTURE_MODEL, m_dynamicResultsAccess->timeStepCount()); RiaDefines::FRACTURE_MODEL, m_dynamicResultsAccess->timeStepCount());
for (int i = 0; i < fractureResultNames.size(); ++i) for (int i = 0; i < fractureResultNames.size(); ++i)
{ {
@@ -729,9 +729,9 @@ void RifReaderEclipseOutput::buildMetaData()
{ {
QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, QStringList matrixResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts,
m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL),
m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL),
RiaPorosityModel::MATRIX_MODEL, 1); RiaDefines::MATRIX_MODEL, 1);
// Add ACTNUM // Add ACTNUM
matrixResultNames += "ACTNUM"; matrixResultNames += "ACTNUM";
@@ -745,9 +745,9 @@ void RifReaderEclipseOutput::buildMetaData()
{ {
QStringList fractureResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts, QStringList fractureResultNames = validKeywordsForPorosityModel(resultNames, resultNamesDataItemCounts,
m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL),
m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL), m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL),
RiaPorosityModel::FRACTURE_MODEL, 1); RiaDefines::FRACTURE_MODEL, 1);
// Add ACTNUM // Add ACTNUM
fractureResultNames += "ACTNUM"; fractureResultNames += "ACTNUM";
@@ -791,7 +791,7 @@ RifEclipseRestartDataAccess* RifReaderEclipseOutput::createDynamicResultsAccess(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Get all values of a given static result as doubles /// Get all values of a given static result as doubles
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RifReaderEclipseOutput::staticResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values) bool RifReaderEclipseOutput::staticResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values)
{ {
CVF_ASSERT(values); CVF_ASSERT(values);
@@ -827,7 +827,7 @@ bool RifReaderEclipseOutput::staticResult(const QString& result, RiaPorosityMode
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// Get dynamic result at given step index. Will concatenate values for the main grid and all sub grids. /// Get dynamic result at given step index. Will concatenate values for the main grid and all sub grids.
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RifReaderEclipseOutput::dynamicResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values) bool RifReaderEclipseOutput::dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values)
{ {
if (m_dynamicResultsAccess.isNull()) if (m_dynamicResultsAccess.isNull())
{ {
@@ -1666,7 +1666,7 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
const std::vector<size_t>& keywordDataItemCounts, const std::vector<size_t>& keywordDataItemCounts,
const RigActiveCellInfo* matrixActiveCellInfo, const RigActiveCellInfo* matrixActiveCellInfo,
const RigActiveCellInfo* fractureActiveCellInfo, const RigActiveCellInfo* fractureActiveCellInfo,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepCount) const size_t timeStepCount) const
{ {
CVF_ASSERT(matrixActiveCellInfo); CVF_ASSERT(matrixActiveCellInfo);
@@ -1676,7 +1676,7 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
return QStringList(); return QStringList();
} }
if (porosityModel == RiaPorosityModel::FRACTURE_MODEL) if (porosityModel == RiaDefines::FRACTURE_MODEL)
{ {
if (fractureActiveCellInfo->reservoirActiveCellCount() == 0) if (fractureActiveCellInfo->reservoirActiveCellCount() == 0)
{ {
@@ -1712,14 +1712,14 @@ QStringList RifReaderEclipseOutput::validKeywordsForPorosityModel(const QStringL
size_t sumFractureMatrixActiveCellCount = matrixActiveCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount(); size_t sumFractureMatrixActiveCellCount = matrixActiveCellInfo->reservoirActiveCellCount() + fractureActiveCellInfo->reservoirActiveCellCount();
size_t timeStepsMatrixAndFractureRest = keywordDataItemCount % sumFractureMatrixActiveCellCount; size_t timeStepsMatrixAndFractureRest = keywordDataItemCount % sumFractureMatrixActiveCellCount;
if (porosityModel == RiaPorosityModel::MATRIX_MODEL && timeStepsMatrixRest == 0) if (porosityModel == RiaDefines::MATRIX_MODEL && timeStepsMatrixRest == 0)
{ {
if (keywordDataItemCount <= timeStepCount * std::max(matrixActiveCellInfo->reservoirActiveCellCount(), sumFractureMatrixActiveCellCount)) if (keywordDataItemCount <= timeStepCount * std::max(matrixActiveCellInfo->reservoirActiveCellCount(), sumFractureMatrixActiveCellCount))
{ {
validKeyword = true; validKeyword = true;
} }
} }
else if (porosityModel == RiaPorosityModel::FRACTURE_MODEL && fractureActiveCellInfo->reservoirActiveCellCount() > 0 && timeStepsFractureRest == 0) else if (porosityModel == RiaDefines::FRACTURE_MODEL && fractureActiveCellInfo->reservoirActiveCellCount() > 0 && timeStepsFractureRest == 0)
{ {
if (keywordDataItemCount <= timeStepCount * std::max(fractureActiveCellInfo->reservoirActiveCellCount(), sumFractureMatrixActiveCellCount)) if (keywordDataItemCount <= timeStepCount * std::max(fractureActiveCellInfo->reservoirActiveCellCount(), sumFractureMatrixActiveCellCount))
{ {
@@ -1793,19 +1793,19 @@ std::vector<RigTimeStepInfo> RifReaderEclipseOutput::createFilteredTimeStepInfos
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* destinationResultValues, const std::vector<double>& sourceResultValues) void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* destinationResultValues, const std::vector<double>& sourceResultValues)
{ {
if (sourceResultValues.size() == 0) return; if (sourceResultValues.size() == 0) return;
RigActiveCellInfo* fracActCellInfo = m_eclipseCase->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL); RigActiveCellInfo* fracActCellInfo = m_eclipseCase->activeCellInfo(RiaDefines::FRACTURE_MODEL);
if (matrixOrFracture == RiaPorosityModel::MATRIX_MODEL && fracActCellInfo->reservoirActiveCellCount() == 0) if (matrixOrFracture == RiaDefines::MATRIX_MODEL && fracActCellInfo->reservoirActiveCellCount() == 0)
{ {
destinationResultValues->insert(destinationResultValues->end(), sourceResultValues.begin(), sourceResultValues.end()); destinationResultValues->insert(destinationResultValues->end(), sourceResultValues.begin(), sourceResultValues.end());
} }
else else
{ {
RigActiveCellInfo* actCellInfo = m_eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); RigActiveCellInfo* actCellInfo = m_eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL);
size_t sourceStartPosition = 0; size_t sourceStartPosition = 0;
@@ -1817,7 +1817,7 @@ void RifReaderEclipseOutput::extractResultValuesBasedOnPorosityModel(RiaPorosity
actCellInfo->gridActiveCellCounts(i, matrixActiveCellCount); actCellInfo->gridActiveCellCounts(i, matrixActiveCellCount);
fracActCellInfo->gridActiveCellCounts(i, fractureActiveCellCount); fracActCellInfo->gridActiveCellCounts(i, fractureActiveCellCount);
if (matrixOrFracture == RiaPorosityModel::MATRIX_MODEL) if (matrixOrFracture == RiaDefines::MATRIX_MODEL)
{ {
destinationResultValues->insert(destinationResultValues->end(), destinationResultValues->insert(destinationResultValues->end(),
sourceResultValues.begin() + sourceStartPosition, sourceResultValues.begin() + sourceStartPosition,

View File

@@ -54,8 +54,8 @@ public:
virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCaseData* eclipseCase); virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCaseData* eclipseCase);
void close(); void close();
bool staticResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values); bool staticResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values);
bool dynamicResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values); bool dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values);
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase); static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCaseData* eclipseCase);
static void transferCoarseningInfo(const ecl_grid_type* eclGrid, RigGridBase* grid); static void transferCoarseningInfo(const ecl_grid_type* eclGrid, RigGridBase* grid);
@@ -73,13 +73,13 @@ private:
void openInitFile(); void openInitFile();
void extractResultValuesBasedOnPorosityModel(RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values, const std::vector<double>& fileValues); void extractResultValuesBasedOnPorosityModel(RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values, const std::vector<double>& fileValues);
void transferNNCData( const ecl_grid_type * mainEclGrid , const ecl_file_type * init_file, void transferNNCData( const ecl_grid_type * mainEclGrid , const ecl_file_type * init_file,
RigMainGrid * mainGrid); RigMainGrid * mainGrid);
RifEclipseRestartDataAccess* createDynamicResultsAccess(); RifEclipseRestartDataAccess* createDynamicResultsAccess();
QStringList validKeywordsForPorosityModel(const QStringList& keywords, const std::vector<size_t>& keywordDataItemCounts, const RigActiveCellInfo* activeCellInfo, const RigActiveCellInfo* fractureActiveCellInfo, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t timeStepCount) const; QStringList validKeywordsForPorosityModel(const QStringList& keywords, const std::vector<size_t>& keywordDataItemCounts, const RigActiveCellInfo* activeCellInfo, const RigActiveCellInfo* fractureActiveCellInfo, RiaDefines::PorosityModelType matrixOrFracture, size_t timeStepCount) const;
std::vector<RigTimeStepInfo> createFilteredTimeStepInfos(); std::vector<RigTimeStepInfo> createFilteredTimeStepInfos();

View File

@@ -59,8 +59,8 @@ public:
virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase) = 0; virtual bool open(const QString& fileName, RigEclipseCaseData* eclipseCase) = 0;
virtual void close() = 0; virtual void close() = 0;
virtual bool staticResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values) = 0; virtual bool staticResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values) = 0;
virtual bool dynamicResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values) = 0; virtual bool dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values) = 0;
void setFilenamesWithFaults(const std::vector<QString>& filenames) { m_filenamesWithFaults = filenames; } void setFilenamesWithFaults(const std::vector<QString>& filenames) { m_filenamesWithFaults = filenames; }
std::vector<QString> filenamesWithFaults() { return m_filenamesWithFaults; } std::vector<QString> filenamesWithFaults() { return m_filenamesWithFaults; }

View File

@@ -33,7 +33,7 @@ bool RifReaderMockModel::open(const QString& fileName, RigEclipseCaseData* eclip
m_reservoir = eclipseCase; m_reservoir = eclipseCase;
RigCaseCellResultsData* cellResults = eclipseCase->results(RiaPorosityModel::MATRIX_MODEL); RigCaseCellResultsData* cellResults = eclipseCase->results(RiaDefines::MATRIX_MODEL);
std::vector<RigTimeStepInfo> timeStepInfos; std::vector<RigTimeStepInfo> timeStepInfos;
{ {
@@ -113,7 +113,7 @@ bool RifReaderMockModel::inputProperty(const QString& propertyName, std::vector<
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RifReaderMockModel::staticResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values) bool RifReaderMockModel::staticResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values)
{ {
m_reservoirBuilder.staticResult(m_reservoir, result, values); m_reservoirBuilder.staticResult(m_reservoir, result, values);
@@ -123,7 +123,7 @@ bool RifReaderMockModel::staticResult(const QString& result, RiaPorosityModel::P
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RifReaderMockModel::dynamicResult(const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values) bool RifReaderMockModel::dynamicResult(const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values)
{ {
m_reservoirBuilder.dynamicResult(m_reservoir, result, stepIndex, values); m_reservoirBuilder.dynamicResult(m_reservoir, result, stepIndex, values);

View File

@@ -39,8 +39,8 @@ public:
virtual bool open( const QString& fileName, RigEclipseCaseData* eclipseCase ); virtual bool open( const QString& fileName, RigEclipseCaseData* eclipseCase );
virtual void close(); virtual void close();
virtual bool staticResult( const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, std::vector<double>* values ); virtual bool staticResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, std::vector<double>* values );
virtual bool dynamicResult( const QString& result, RiaPorosityModel::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values ); virtual bool dynamicResult( const QString& result, RiaDefines::PorosityModelType matrixOrFracture, size_t stepIndex, std::vector<double>* values );
private: private:
void populateReservoir(RigEclipseCaseData* eclipseCase); void populateReservoir(RigEclipseCaseData* eclipseCase);

View File

@@ -325,7 +325,7 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeResultAccess
adjustedTimeStep = 0; adjustedTimeStep = 0;
} }
RiaPorosityModel::PorosityModelType porosityModel = cellResultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = cellResultColors->porosityModel();
cvf::ref<RigResultAccessor> daObj = RigResultAccessorFactory::createFromResultIdx(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStep, resultIndices[cubeFaceIdx]); cvf::ref<RigResultAccessor> daObj = RigResultAccessorFactory::createFromResultIdx(eclipseCase, grid->gridIndex(), porosityModel, adjustedTimeStep, resultIndices[cubeFaceIdx]);
cellEdgeResultAccessor->setDataAccessObjectForFace(static_cast<cvf::StructGridInterface::FaceType>(cubeFaceIdx), daObj.p()); cellEdgeResultAccessor->setDataAccessObjectForFace(static_cast<cvf::StructGridInterface::FaceType>(cubeFaceIdx), daObj.p());
} }

View File

@@ -55,7 +55,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0; if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RiaPorosityModel::PorosityModelType porosityModel = cellResultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = cellResultColors->porosityModel();
cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL");
cvf::ref<RigResultAccessor> sgas = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS"); cvf::ref<RigResultAccessor> sgas = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SGAS");
@@ -89,7 +89,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0; if (cellResultColors->hasStaticResult()) resTimeStepIdx = 0;
RiaPorosityModel::PorosityModelType porosityModel = cellResultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = cellResultColors->porosityModel();
size_t gridIndex = 0; size_t gridIndex = 0;
cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL"); cvf::ref<RigResultAccessor> soil = RigResultAccessorFactory::createFromUiResultName(eclipseCase, gridIndex, porosityModel, resTimeStepIdx, "SOIL");

View File

@@ -107,7 +107,7 @@ RigFlowDiagResults* RimFlowDiagSolution::flowDiagResults()
CVF_ASSERT(eclCase && eclCase->eclipseCaseData() ); CVF_ASSERT(eclCase && eclCase->eclipseCaseData() );
timeStepCount = eclCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->maxTimeStepCount(); timeStepCount = eclCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount();
} }
@@ -171,7 +171,7 @@ std::map<std::string, std::vector<int> > RimFlowDiagSolution::allTracerActiveCel
{ {
const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults(); const cvf::Collection<RigSingleWellResultsData>& wellResults = eclCase->eclipseCaseData()->wellResults();
RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid(); RigMainGrid* mainGrid = eclCase->eclipseCaseData()->mainGrid();
RigActiveCellInfo* activeCellInfo = eclCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); //Todo: Must come from the results definition RigActiveCellInfo* activeCellInfo = eclCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL); //Todo: Must come from the results definition
for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx ) for ( size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx )
{ {

View File

@@ -209,7 +209,7 @@ void RimWellAllocationPlot::updateFromWell()
{ {
bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER bool isProducer = ( wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::PRODUCER
|| wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE ); || wellResults->wellProductionType(m_timeStep) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)); RigEclCellIndexCalculator cellIdxCalc(m_case->eclipseCaseData()->mainGrid(), m_case->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL));
wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords, wfCalculator.reset(new RigAccWellFlowCalculator(pipeBranchesCLCoords,
pipeBranchesCellIds, pipeBranchesCellIds,
tracerFractionCellValues, tracerFractionCellValues,

View File

@@ -346,8 +346,8 @@ void Rim3dOverlayInfoConfig::updateEclipse3DInfo(RimEclipseView * eclipseView)
{ {
caseName = eclipseView->eclipseCase()->caseUserDescription(); caseName = eclipseView->eclipseCase()->caseUserDescription();
totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size()); totCellCount = QString::number(eclipseView->mainGrid()->globalCellArray().size());
size_t mxActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->reservoirActiveCellCount(); size_t mxActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->reservoirActiveCellCount();
size_t frActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL)->reservoirActiveCellCount(); size_t frActCellCount = eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->reservoirActiveCellCount();
if (frActCellCount > 0) activeCellCountText += "Matrix : "; if (frActCellCount > 0) activeCellCountText += "Matrix : ";
activeCellCountText += QString::number(mxActCellCount); activeCellCountText += QString::number(mxActCellCount);
if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount); if (frActCellCount > 0) activeCellCountText += " Fracture : " + QString::number(frActCellCount);

View File

@@ -380,7 +380,7 @@ void RimEclipseCase::computeCachedData()
pInf.setNextProgressIncrement(17); pInf.setNextProgressIncrement(17);
pInf.setProgressDescription("Calculating faults"); pInf.setProgressDescription("Calculating faults");
rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)); rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL));
pInf.incrementProgress(); pInf.incrementProgress();
pInf.setProgressDescription("Calculating Formation Names Result"); pInf.setProgressDescription("Calculating Formation Names Result");
@@ -414,8 +414,8 @@ void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
m_rigEclipseCase = eclipseCase; m_rigEclipseCase = eclipseCase;
if (this->eclipseCaseData()) if (this->eclipseCaseData())
{ {
m_fractureModelResults()->setCellResults(eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL)); m_fractureModelResults()->setCellResults(eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL));
m_matrixModelResults()->setCellResults(eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)); m_matrixModelResults()->setCellResults(eclipseCaseData()->results(RiaDefines::MATRIX_MODEL));
m_fractureModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid()); m_fractureModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid());
m_matrixModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid()); m_matrixModelResults()->setMainGrid(this->eclipseCaseData()->mainGrid());
} }
@@ -478,9 +478,9 @@ void RimEclipseCase::createTimeStepFormatString()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::BoundingBox RimEclipseCase::activeCellsBoundingBox() const cvf::BoundingBox RimEclipseCase::activeCellsBoundingBox() const
{ {
if (m_rigEclipseCase.notNull() && m_rigEclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)) if (m_rigEclipseCase.notNull() && m_rigEclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL))
{ {
return m_rigEclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->geometryBoundingBox(); return m_rigEclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL)->geometryBoundingBox();
} }
else else
{ {
@@ -521,9 +521,9 @@ cvf::Vec3d RimEclipseCase::displayModelOffset() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimReservoirCellResultsStorage* RimEclipseCase::results(RiaPorosityModel::PorosityModelType porosityModel) RimReservoirCellResultsStorage* RimEclipseCase::results(RiaDefines::PorosityModelType porosityModel)
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_matrixModelResults(); return m_matrixModelResults();
} }
@@ -534,9 +534,9 @@ RimReservoirCellResultsStorage* RimEclipseCase::results(RiaPorosityModel::Porosi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const RimReservoirCellResultsStorage* RimEclipseCase::results(RiaPorosityModel::PorosityModelType porosityModel) const const RimReservoirCellResultsStorage* RimEclipseCase::results(RiaDefines::PorosityModelType porosityModel) const
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_matrixModelResults(); return m_matrixModelResults();
} }
@@ -592,7 +592,7 @@ bool RimEclipseCase::openReserviorCase()
} }
{ {
RimReservoirCellResultsStorage* results = this->results(RiaPorosityModel::MATRIX_MODEL); RimReservoirCellResultsStorage* results = this->results(RiaDefines::MATRIX_MODEL);
if (results->cellResults()) if (results->cellResults())
{ {
results->cellResults()->createPlaceholderResultEntries(); results->cellResults()->createPlaceholderResultEntries();
@@ -607,7 +607,7 @@ bool RimEclipseCase::openReserviorCase()
} }
{ {
RimReservoirCellResultsStorage* results = this->results(RiaPorosityModel::FRACTURE_MODEL); RimReservoirCellResultsStorage* results = this->results(RiaDefines::FRACTURE_MODEL);
if (results->cellResults()) results->cellResults()->createPlaceholderResultEntries(); if (results->cellResults()) results->cellResults()->createPlaceholderResultEntries();
} }
@@ -636,7 +636,7 @@ QStringList RimEclipseCase::timeStepStrings() const
{ {
QStringList stringList; QStringList stringList;
int timeStepCount = static_cast<int>(results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->maxTimeStepCount()); int timeStepCount = static_cast<int>(results(RiaDefines::MATRIX_MODEL)->cellResults()->maxTimeStepCount());
for (int i = 0; i < timeStepCount; i++) for (int i = 0; i < timeStepCount; i++)
{ {
stringList += this->timeStepName(i); stringList += this->timeStepName(i);
@@ -665,13 +665,13 @@ void RimEclipseCase::reloadDataAndUpdate()
{ {
if (this->eclipseCaseData()) if (this->eclipseCaseData())
{ {
RigCaseCellResultsData* matrixModelResults = eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL); RigCaseCellResultsData* matrixModelResults = eclipseCaseData()->results(RiaDefines::MATRIX_MODEL);
if (matrixModelResults) if (matrixModelResults)
{ {
matrixModelResults->clearAllResults(); matrixModelResults->clearAllResults();
} }
RigCaseCellResultsData* fractureModelResults = eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL); RigCaseCellResultsData* fractureModelResults = eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL);
if (fractureModelResults) if (fractureModelResults)
{ {
fractureModelResults->clearAllResults(); fractureModelResults->clearAllResults();
@@ -738,5 +738,5 @@ double RimEclipseCase::characteristicCellSize() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<QDateTime> RimEclipseCase::timeStepDates() const std::vector<QDateTime> RimEclipseCase::timeStepDates() const
{ {
return results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->timeStepDates(); return results(RiaDefines::MATRIX_MODEL)->cellResults()->timeStepDates();
} }

View File

@@ -73,8 +73,8 @@ public:
const RigEclipseCaseData* eclipseCaseData() const; const RigEclipseCaseData* eclipseCaseData() const;
cvf::Color3f defaultWellColor(const QString& wellName); cvf::Color3f defaultWellColor(const QString& wellName);
RimReservoirCellResultsStorage* results(RiaPorosityModel::PorosityModelType porosityModel); RimReservoirCellResultsStorage* results(RiaDefines::PorosityModelType porosityModel);
const RimReservoirCellResultsStorage* results(RiaPorosityModel::PorosityModelType porosityModel) const; const RimReservoirCellResultsStorage* results(RiaDefines::PorosityModelType porosityModel) const;
RimEclipseView* createAndAddReservoirView(); RimEclipseView* createAndAddReservoirView();
RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView); RimEclipseView* createCopyAndAddView(const RimEclipseView* sourceView);

View File

@@ -171,7 +171,7 @@ RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection(RigEclipseCa
// This is the first insertion of this grid, compute cached data // This is the first insertion of this grid, compute cached data
rigEclipseCase->mainGrid()->computeCachedData(); rigEclipseCase->mainGrid()->computeCachedData();
rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)); rigEclipseCase->mainGrid()->calculateFaults(rigEclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL));
equalGrid = rigEclipseCase->mainGrid(); equalGrid = rigEclipseCase->mainGrid();
} }

View File

@@ -88,11 +88,11 @@ void RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
if (fileNames.contains(RiaDefines::mockModelBasicInputCase())) if (fileNames.contains(RiaDefines::mockModelBasicInputCase()))
{ {
cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]); cvf::ref<RifReaderInterface> readerInterface = this->createMockModel(fileNames[0]);
results(RiaPorosityModel::MATRIX_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
results(RiaPorosityModel::FRACTURE_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->computeDerivedData(); eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->computeDerivedData();
eclipseCaseData()->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL)->computeDerivedData(); eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->computeDerivedData();
QFileInfo gridFileName(fileNames[0]); QFileInfo gridFileName(fileNames[0]);
QString caseName = gridFileName.completeBaseName(); QString caseName = gridFileName.completeBaseName();
@@ -206,8 +206,8 @@ bool RimEclipseInputCase::openEclipseGridFile()
CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(this->eclipseCaseData());
CVF_ASSERT(readerInterface.notNull()); CVF_ASSERT(readerInterface.notNull());
results(RiaPorosityModel::MATRIX_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
results(RiaPorosityModel::FRACTURE_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis); this->eclipseCaseData()->mainGrid()->setFlipAxis(flipXAxis, flipYAxis);
@@ -219,8 +219,8 @@ bool RimEclipseInputCase::openEclipseGridFile()
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
if (app->preferences()->autocomputeDepthRelatedProperties) if (app->preferences()->autocomputeDepthRelatedProperties)
{ {
RimReservoirCellResultsStorage* matrixResults = results(RiaPorosityModel::MATRIX_MODEL); RimReservoirCellResultsStorage* matrixResults = results(RiaDefines::MATRIX_MODEL);
RimReservoirCellResultsStorage* fractureResults = results(RiaPorosityModel::FRACTURE_MODEL); RimReservoirCellResultsStorage* fractureResults = results(RiaDefines::FRACTURE_MODEL);
matrixResults->computeDepthRelatedResults(); matrixResults->computeDepthRelatedResults();
fractureResults->computeDepthRelatedResults(); fractureResults->computeDepthRelatedResults();
@@ -318,7 +318,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
for (const QString fileKeyword : fileKeywordSet) for (const QString fileKeyword : fileKeywordSet)
{ {
{ {
QString resultName = this->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->makeResultNameUnique(fileKeyword); QString resultName = this->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->makeResultNameUnique(fileKeyword);
if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), fileKeyword, resultName)) if (RifEclipseInputFileTools::readProperty(filenames[i], this->eclipseCaseData(), fileKeyword, resultName))
{ {
RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty; RimEclipseInputProperty* inputProperty = new RimEclipseInputProperty;

View File

@@ -91,7 +91,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change
QString oldName = oldValue.toString(); QString oldName = oldValue.toString();
QString newName = newValue.toString(); QString newName = newValue.toString();
RigCaseCellResultsData* matrixResults = rimCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL); RigCaseCellResultsData* matrixResults = rimCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL);
if (matrixResults) if (matrixResults)
{ {
if (matrixResults->updateResultName(RiaDefines::INPUT_PROPERTY, oldName, newName)) if (matrixResults->updateResultName(RiaDefines::INPUT_PROPERTY, oldName, newName))
@@ -100,7 +100,7 @@ void RimEclipseInputProperty::fieldChangedByUi(const caf::PdmFieldHandle* change
} }
} }
RigCaseCellResultsData* fracResults = rimCase->eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL); RigCaseCellResultsData* fracResults = rimCase->eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL);
if (fracResults) if (fracResults)
{ {
if (fracResults->updateResultName(RiaDefines::INPUT_PROPERTY, oldName, newName)) if (fracResults->updateResultName(RiaDefines::INPUT_PROPERTY, oldName, newName))

View File

@@ -128,8 +128,8 @@ bool RimEclipseResultCase::openEclipseGridFile()
this->setReservoirData( eclipseCase.p() ); this->setReservoirData( eclipseCase.p() );
} }
results(RiaPorosityModel::MATRIX_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
results(RiaPorosityModel::FRACTURE_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
progInfo.incrementProgress(); progInfo.incrementProgress();
@@ -188,7 +188,7 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEcl
CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid()); CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid());
eclipseCase->setMainGrid(mainEclipseCase->mainGrid()); eclipseCase->setMainGrid(mainEclipseCase->mainGrid());
std::vector<QDateTime> timeStepDates = mainEclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->timeStepDates(); std::vector<QDateTime> timeStepDates = mainEclipseCase->results(RiaDefines::MATRIX_MODEL)->timeStepDates();
if (timeStepDates.size() == 0) if (timeStepDates.size() == 0)
{ {
return false; return false;
@@ -207,8 +207,8 @@ bool RimEclipseResultCase::openAndReadActiveCellData(RigEclipseCaseData* mainEcl
readerInterface = readerEclipseOutput; readerInterface = readerEclipseOutput;
} }
results(RiaPorosityModel::MATRIX_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::MATRIX_MODEL)->setReaderInterface(readerInterface.p());
results(RiaPorosityModel::FRACTURE_MODEL)->setReaderInterface(readerInterface.p()); results(RiaDefines::FRACTURE_MODEL)->setReaderInterface(readerInterface.p());
CVF_ASSERT(this->eclipseCaseData()); CVF_ASSERT(this->eclipseCaseData());
CVF_ASSERT(readerInterface.notNull()); CVF_ASSERT(readerInterface.notNull());

View File

@@ -902,7 +902,7 @@ void RimEclipseResultDefinition::setResultType(RiaDefines::ResultCatType val)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseResultDefinition::setPorosityModel(RiaPorosityModel::PorosityModelType val) void RimEclipseResultDefinition::setPorosityModel(RiaDefines::PorosityModelType val)
{ {
m_porosityModel = val; m_porosityModel = val;
m_porosityModelUiField = val; m_porosityModelUiField = val;
@@ -991,8 +991,8 @@ bool RimEclipseResultDefinition::hasDualPorFractureResult()
{ {
if ( m_eclipseCase if ( m_eclipseCase
&& m_eclipseCase->eclipseCaseData() && m_eclipseCase->eclipseCaseData()
&& m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL) && m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)
&& m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL)->reservoirActiveCellCount() > 0 ) && m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->reservoirActiveCellCount() > 0 )
{ {
return true; return true;
} }

View File

@@ -66,8 +66,8 @@ public:
RiaDefines::ResultCatType resultType() const { return m_resultType(); } RiaDefines::ResultCatType resultType() const { return m_resultType(); }
void setResultType(RiaDefines::ResultCatType val); void setResultType(RiaDefines::ResultCatType val);
RiaPorosityModel::PorosityModelType porosityModel() const { return m_porosityModel(); } RiaDefines::PorosityModelType porosityModel() const { return m_porosityModel(); }
void setPorosityModel(RiaPorosityModel::PorosityModelType val); void setPorosityModel(RiaDefines::PorosityModelType val);
QString resultVariable() const { return m_resultVariable(); } QString resultVariable() const { return m_resultVariable(); }
virtual void setResultVariable(const QString& val); virtual void setResultVariable(const QString& val);
@@ -108,7 +108,7 @@ protected:
protected: protected:
caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultType; caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultType;
caf::PdmField< caf::AppEnum< RiaPorosityModel::PorosityModelType > > m_porosityModel; caf::PdmField< caf::AppEnum< RiaDefines::PorosityModelType > > m_porosityModel;
caf::PdmField<QString> m_resultVariable; caf::PdmField<QString> m_resultVariable;
caf::PdmPtrField<RimFlowDiagSolution*> m_flowSolution; caf::PdmPtrField<RimFlowDiagSolution*> m_flowSolution;
@@ -121,7 +121,7 @@ protected:
// User interface only fields, to support "filtering"-like behaviour etc. // User interface only fields, to support "filtering"-like behaviour etc.
caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultTypeUiField; caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultTypeUiField;
caf::PdmField< caf::AppEnum< RiaPorosityModel::PorosityModelType > > m_porosityModelUiField; caf::PdmField< caf::AppEnum< RiaDefines::PorosityModelType > > m_porosityModelUiField;
caf::PdmField<QString> m_resultVariableUiField; caf::PdmField<QString> m_resultVariableUiField;
caf::PdmField< caf::AppEnum< FlowTracerSelectionType > > m_flowTracerSelectionMode; caf::PdmField< caf::AppEnum< FlowTracerSelectionType > > m_flowTracerSelectionMode;

View File

@@ -159,8 +159,8 @@ bool RimEclipseStatisticsCase::openEclipseGridFile()
eclipseCase->setMainGrid(mainGrid); eclipseCase->setMainGrid(mainGrid);
eclipseCase->setActiveCellInfo(RiaPorosityModel::MATRIX_MODEL, gridCaseGroup->unionOfActiveCells(RiaPorosityModel::MATRIX_MODEL)); eclipseCase->setActiveCellInfo(RiaDefines::MATRIX_MODEL, gridCaseGroup->unionOfActiveCells(RiaDefines::MATRIX_MODEL));
eclipseCase->setActiveCellInfo(RiaPorosityModel::FRACTURE_MODEL, gridCaseGroup->unionOfActiveCells(RiaPorosityModel::FRACTURE_MODEL)); eclipseCase->setActiveCellInfo(RiaDefines::FRACTURE_MODEL, gridCaseGroup->unionOfActiveCells(RiaDefines::FRACTURE_MODEL));
this->setReservoirData( eclipseCase.p() ); this->setReservoirData( eclipseCase.p() );
@@ -218,15 +218,15 @@ void RimEclipseStatisticsCase::computeStatistics()
getSourceCases(sourceCases); getSourceCases(sourceCases);
if (sourceCases.size() == 0 if (sourceCases.size() == 0
|| !sourceCases.at(0)->results(RiaPorosityModel::MATRIX_MODEL) || !sourceCases.at(0)->results(RiaDefines::MATRIX_MODEL)
|| !sourceCases.at(0)->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()) || !sourceCases.at(0)->results(RiaDefines::MATRIX_MODEL)->cellResults())
{ {
return; return;
} }
// The first source has been read completely from disk, and contains grid and meta data // The first source has been read completely from disk, and contains grid and meta data
// Use this information for all cases in the case group // Use this information for all cases in the case group
size_t timeStepCount = sourceCases.at(0)->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->maxTimeStepCount(); size_t timeStepCount = sourceCases.at(0)->results(RiaDefines::MATRIX_MODEL)->cellResults()->maxTimeStepCount();
RimStatisticsConfig statisticsConfig; RimStatisticsConfig statisticsConfig;
@@ -248,42 +248,42 @@ void RimEclipseStatisticsCase::computeStatistics()
for(size_t pIdx = 0; pIdx < m_selectedDynamicProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedDynamicProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, m_selectedDynamicProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE, m_selectedDynamicProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedStaticProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedStaticProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::MATRIX_MODEL, RiaDefines::STATIC_NATIVE, m_selectedStaticProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::MATRIX_MODEL, RiaDefines::STATIC_NATIVE, m_selectedStaticProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedGeneratedProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedGeneratedProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::MATRIX_MODEL, RiaDefines::GENERATED, m_selectedGeneratedProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::MATRIX_MODEL, RiaDefines::GENERATED, m_selectedGeneratedProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedInputProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedInputProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::MATRIX_MODEL, RiaDefines::INPUT_PROPERTY, m_selectedInputProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::MATRIX_MODEL, RiaDefines::INPUT_PROPERTY, m_selectedInputProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedFractureDynamicProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedFractureDynamicProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::FRACTURE_MODEL, RiaDefines::DYNAMIC_NATIVE, m_selectedFractureDynamicProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::FRACTURE_MODEL, RiaDefines::DYNAMIC_NATIVE, m_selectedFractureDynamicProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedFractureStaticProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedFractureStaticProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::FRACTURE_MODEL, RiaDefines::STATIC_NATIVE, m_selectedFractureStaticProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::FRACTURE_MODEL, RiaDefines::STATIC_NATIVE, m_selectedFractureStaticProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedFractureGeneratedProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedFractureGeneratedProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::FRACTURE_MODEL, RiaDefines::GENERATED, m_selectedFractureGeneratedProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::FRACTURE_MODEL, RiaDefines::GENERATED, m_selectedFractureGeneratedProperties()[pIdx]));
} }
for(size_t pIdx = 0; pIdx < m_selectedFractureInputProperties().size(); ++pIdx) for(size_t pIdx = 0; pIdx < m_selectedFractureInputProperties().size(); ++pIdx)
{ {
resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaPorosityModel::FRACTURE_MODEL, RiaDefines::INPUT_PROPERTY, m_selectedFractureInputProperties()[pIdx])); resultSpecification.append(RimEclipseStatisticsCaseEvaluator::ResSpec(RiaDefines::FRACTURE_MODEL, RiaDefines::INPUT_PROPERTY, m_selectedFractureInputProperties()[pIdx]));
} }
RimEclipseStatisticsCaseEvaluator stat(sourceCases, timeStepIndices, statisticsConfig, resultCase, gridCaseGroup); RimEclipseStatisticsCaseEvaluator stat(sourceCases, timeStepIndices, statisticsConfig, resultCase, gridCaseGroup);
@@ -420,42 +420,42 @@ QList<caf::PdmOptionItemInfo> RimEclipseStatisticsCase::calculateValueOptions(co
if (&m_selectedDynamicProperties == fieldNeedingOptions) if (&m_selectedDynamicProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedStaticProperties == fieldNeedingOptions) else if (&m_selectedStaticProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::STATIC_NATIVE); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::STATIC_NATIVE);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedGeneratedProperties == fieldNeedingOptions) else if (&m_selectedGeneratedProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::GENERATED); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::GENERATED);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedInputProperties == fieldNeedingOptions) else if (&m_selectedInputProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::INPUT_PROPERTY); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::INPUT_PROPERTY);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedFractureDynamicProperties == fieldNeedingOptions) else if (&m_selectedFractureDynamicProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedFractureStaticProperties == fieldNeedingOptions) else if (&m_selectedFractureStaticProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::STATIC_NATIVE); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::STATIC_NATIVE);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedFractureGeneratedProperties == fieldNeedingOptions) else if (&m_selectedFractureGeneratedProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::GENERATED); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::GENERATED);
return toOptionList(varList); return toOptionList(varList);
} }
else if (&m_selectedFractureInputProperties == fieldNeedingOptions) else if (&m_selectedFractureInputProperties == fieldNeedingOptions)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::INPUT_PROPERTY); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::INPUT_PROPERTY);
return toOptionList(varList); return toOptionList(varList);
} }
@@ -636,17 +636,17 @@ void RimEclipseStatisticsCase::updateSelectionListVisibilities()
{ {
bool isLocked = hasComputedStatistics(); bool isLocked = hasComputedStatistics();
m_resultType.uiCapability()->setUiHidden(isLocked); m_resultType.uiCapability()->setUiHidden(isLocked);
m_porosityModel.uiCapability()->setUiHidden(isLocked ); // || !caseGroup()->mainCase()->reservoirData()->results(RiaPorosityModel::FRACTURE_MODEL)->resultCount() m_porosityModel.uiCapability()->setUiHidden(isLocked ); // || !caseGroup()->mainCase()->reservoirData()->results(RiaDefines::FRACTURE_MODEL)->resultCount()
m_selectedDynamicProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::MATRIX_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE)); m_selectedDynamicProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE));
m_selectedStaticProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::MATRIX_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE)); m_selectedStaticProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE));
m_selectedGeneratedProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::MATRIX_MODEL && m_resultType() == RiaDefines::GENERATED)); m_selectedGeneratedProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::GENERATED));
m_selectedInputProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::MATRIX_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY)); m_selectedInputProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::MATRIX_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY));
m_selectedFractureDynamicProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::FRACTURE_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE)); m_selectedFractureDynamicProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::DYNAMIC_NATIVE));
m_selectedFractureStaticProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::FRACTURE_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE)); m_selectedFractureStaticProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::STATIC_NATIVE));
m_selectedFractureGeneratedProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::FRACTURE_MODEL && m_resultType() == RiaDefines::GENERATED)); m_selectedFractureGeneratedProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::GENERATED));
m_selectedFractureInputProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaPorosityModel::FRACTURE_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY)); m_selectedFractureInputProperties.uiCapability()->setUiHidden( isLocked || !(m_porosityModel() == RiaDefines::FRACTURE_MODEL && m_resultType() == RiaDefines::INPUT_PROPERTY));
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -668,8 +668,8 @@ void RimEclipseStatisticsCase::updatePercentileUiVisibility()
bool RimEclipseStatisticsCase::hasComputedStatistics() const bool RimEclipseStatisticsCase::hasComputedStatistics() const
{ {
if ( eclipseCaseData() if ( eclipseCaseData()
&& ( eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->resultCount() && ( eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->resultCount()
|| eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL)->resultCount())) || eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL)->resultCount()))
{ {
return true; return true;
} }
@@ -707,14 +707,14 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseStatisticsCase::clearComputedStatistics() void RimEclipseStatisticsCase::clearComputedStatistics()
{ {
if (eclipseCaseData() && eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)) if (eclipseCaseData() && eclipseCaseData()->results(RiaDefines::MATRIX_MODEL))
{ {
eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->clearAllResults(); eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->clearAllResults();
} }
if (eclipseCaseData() && eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL)) if (eclipseCaseData() && eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL))
{ {
eclipseCaseData()->results(RiaPorosityModel::FRACTURE_MODEL)->clearAllResults(); eclipseCaseData()->results(RiaDefines::FRACTURE_MODEL)->clearAllResults();
} }
updateConnectedEditorsAndReservoirViews(); updateConnectedEditorsAndReservoirViews();
@@ -750,28 +750,28 @@ void RimEclipseStatisticsCase::populateResultSelection()
if (m_selectedDynamicProperties().size() == 0) if (m_selectedDynamicProperties().size() == 0)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE);
if (varList.contains("SOIL")) m_selectedDynamicProperties.v().push_back("SOIL"); if (varList.contains("SOIL")) m_selectedDynamicProperties.v().push_back("SOIL");
if (varList.contains("PRESSURE")) m_selectedDynamicProperties.v().push_back("PRESSURE"); if (varList.contains("PRESSURE")) m_selectedDynamicProperties.v().push_back("PRESSURE");
} }
if (m_selectedStaticProperties().size() == 0) if (m_selectedStaticProperties().size() == 0)
{ {
QStringList varList = caseData->results(RiaPorosityModel::MATRIX_MODEL)->resultNames(RiaDefines::STATIC_NATIVE); QStringList varList = caseData->results(RiaDefines::MATRIX_MODEL)->resultNames(RiaDefines::STATIC_NATIVE);
if (varList.contains("PERMX")) m_selectedStaticProperties.v().push_back("PERMX"); if (varList.contains("PERMX")) m_selectedStaticProperties.v().push_back("PERMX");
if (varList.contains("PORO")) m_selectedStaticProperties.v().push_back("PORO"); if (varList.contains("PORO")) m_selectedStaticProperties.v().push_back("PORO");
} }
if (m_selectedFractureDynamicProperties().size() == 0) if (m_selectedFractureDynamicProperties().size() == 0)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::DYNAMIC_NATIVE);
if (varList.contains("SOIL")) m_selectedFractureDynamicProperties.v().push_back("SOIL"); if (varList.contains("SOIL")) m_selectedFractureDynamicProperties.v().push_back("SOIL");
if (varList.contains("PRESSURE")) m_selectedFractureDynamicProperties.v().push_back("PRESSURE"); if (varList.contains("PRESSURE")) m_selectedFractureDynamicProperties.v().push_back("PRESSURE");
} }
if (m_selectedFractureStaticProperties().size() == 0) if (m_selectedFractureStaticProperties().size() == 0)
{ {
QStringList varList = caseData->results(RiaPorosityModel::FRACTURE_MODEL)->resultNames(RiaDefines::STATIC_NATIVE); QStringList varList = caseData->results(RiaDefines::FRACTURE_MODEL)->resultNames(RiaDefines::STATIC_NATIVE);
if (varList.contains("PERMX")) m_selectedFractureStaticProperties.v().push_back("PERMX"); if (varList.contains("PERMX")) m_selectedFractureStaticProperties.v().push_back("PERMX");
if (varList.contains("PORO")) m_selectedFractureStaticProperties.v().push_back("PORO"); if (varList.contains("PORO")) m_selectedFractureStaticProperties.v().push_back("PORO");
} }

View File

@@ -102,7 +102,7 @@ private:
// Fields // Fields
caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultType; caf::PdmField< caf::AppEnum< RiaDefines::ResultCatType > > m_resultType;
caf::PdmField< caf::AppEnum< RiaPorosityModel::PorosityModelType > > m_porosityModel; caf::PdmField< caf::AppEnum< RiaDefines::PorosityModelType > > m_porosityModel;
caf::PdmField<QString> m_selectionSummary; caf::PdmField<QString> m_selectionSummary;

View File

@@ -44,7 +44,7 @@ void RimEclipseStatisticsCaseEvaluator::addNamedResult(RigCaseCellResultsData* d
// Use time step dates from first result in first source case // Use time step dates from first result in first source case
CVF_ASSERT(m_sourceCases.size() > 0); CVF_ASSERT(m_sourceCases.size() > 0);
std::vector<RigTimeStepInfo> sourceTimeStepInfos = m_sourceCases[0]->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->timeStepInfos(0); std::vector<RigTimeStepInfo> sourceTimeStepInfos = m_sourceCases[0]->results(RiaDefines::MATRIX_MODEL)->cellResults()->timeStepInfos(0);
size_t destinationScalarResultIndex = destinationCellResults->addEmptyScalarResult(resultType, resultName, true); size_t destinationScalarResultIndex = destinationCellResults->addEmptyScalarResult(resultType, resultName, true);
CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T); CVF_ASSERT(destinationScalarResultIndex != cvf::UNDEFINED_SIZE_T);
@@ -82,7 +82,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
for (int i = 0; i < resultSpecification.size(); i++) for (int i = 0; i < resultSpecification.size(); i++)
{ {
RiaPorosityModel::PorosityModelType poroModel = resultSpecification[i].m_poroModel; RiaDefines::PorosityModelType poroModel = resultSpecification[i].m_poroModel;
RiaDefines::ResultCatType resultType = resultSpecification[i].m_resType; RiaDefines::ResultCatType resultType = resultSpecification[i].m_resType;
QString resultName = resultSpecification[i].m_resVarName; QString resultName = resultSpecification[i].m_resVarName;
@@ -133,7 +133,7 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
for (int resSpecIdx = 0; resSpecIdx < resultSpecification.size(); resSpecIdx++) for (int resSpecIdx = 0; resSpecIdx < resultSpecification.size(); resSpecIdx++)
{ {
RiaPorosityModel::PorosityModelType poroModel = resultSpecification[resSpecIdx].m_poroModel; RiaDefines::PorosityModelType poroModel = resultSpecification[resSpecIdx].m_poroModel;
RiaDefines::ResultCatType resultType = resultSpecification[resSpecIdx].m_resType; RiaDefines::ResultCatType resultType = resultSpecification[resSpecIdx].m_resType;
QString resultName = resultSpecification[resSpecIdx].m_resVarName; QString resultName = resultSpecification[resSpecIdx].m_resVarName;
@@ -301,13 +301,13 @@ void RimEclipseStatisticsCaseEvaluator::evaluateForResults(const QList<ResSpec>&
if (!eclipseCase->reservoirViews.size()) if (!eclipseCase->reservoirViews.size())
{ {
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->freeAllocatedResultsData(); eclipseCase->results(RiaDefines::MATRIX_MODEL)->cellResults()->freeAllocatedResultsData();
eclipseCase->results(RiaPorosityModel::FRACTURE_MODEL)->cellResults()->freeAllocatedResultsData(); eclipseCase->results(RiaDefines::FRACTURE_MODEL)->cellResults()->freeAllocatedResultsData();
} }
// Todo : These calls really do nothing right now the access actually closes automatically in ert i belive ... // Todo : These calls really do nothing right now the access actually closes automatically in ert i belive ...
eclipseCase->results(RiaPorosityModel::MATRIX_MODEL)->readerInterface()->close(); eclipseCase->results(RiaDefines::MATRIX_MODEL)->readerInterface()->close();
eclipseCase->results(RiaPorosityModel::FRACTURE_MODEL)->readerInterface()->close(); eclipseCase->results(RiaDefines::FRACTURE_MODEL)->readerInterface()->close();
} }
progressInfo.setProgress(timeIndicesIdx); progressInfo.setProgress(timeIndicesIdx);

View File

@@ -64,12 +64,12 @@ public:
struct ResSpec struct ResSpec
{ {
ResSpec() : m_resType(RiaDefines::DYNAMIC_NATIVE), m_poroModel(RiaPorosityModel::MATRIX_MODEL) {} ResSpec() : m_resType(RiaDefines::DYNAMIC_NATIVE), m_poroModel(RiaDefines::MATRIX_MODEL) {}
ResSpec( RiaPorosityModel::PorosityModelType poroModel, ResSpec( RiaDefines::PorosityModelType poroModel,
RiaDefines::ResultCatType resType, RiaDefines::ResultCatType resType,
QString resVarName) : m_poroModel(poroModel), m_resType(resType), m_resVarName(resVarName) {} QString resVarName) : m_poroModel(poroModel), m_resType(resType), m_resVarName(resVarName) {}
RiaPorosityModel::PorosityModelType m_poroModel; RiaDefines::PorosityModelType m_poroModel;
RiaDefines::ResultCatType m_resType; RiaDefines::ResultCatType m_resType;
QString m_resVarName; QString m_resVarName;
}; };
@@ -80,7 +80,7 @@ public:
private: private:
void addNamedResult(RigCaseCellResultsData* cellResults, RiaDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount); void addNamedResult(RigCaseCellResultsData* cellResults, RiaDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
void buildSourceMetaData(RiaPorosityModel::PorosityModelType poroModel, RiaDefines::ResultCatType resultType, const QString& resultName); void buildSourceMetaData(RiaDefines::PorosityModelType poroModel, RiaDefines::ResultCatType resultType, const QString& resultName);
enum StatisticsParamType { MIN, MAX, SUM, RANGE, MEAN, STDEV, PMIN, PMID, PMAX, STAT_PARAM_COUNT }; enum StatisticsParamType { MIN, MAX, SUM, RANGE, MEAN, STDEV, PMIN, PMID, PMAX, STAT_PARAM_COUNT };

View File

@@ -184,7 +184,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
RigEclipseCaseData* rigCaseData = mainCase->eclipseCaseData(); RigEclipseCaseData* rigCaseData = mainCase->eclipseCaseData();
CVF_ASSERT(rigCaseData); CVF_ASSERT(rigCaseData);
RiaPorosityModel::PorosityModelType poroModel = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType poroModel = RiaDefines::MATRIX_MODEL;
mainCase->results(poroModel)->cellResults()->createPlaceholderResultEntries(); mainCase->results(poroModel)->cellResults()->createPlaceholderResultEntries();
@@ -217,8 +217,8 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
RimEclipseCase* rimReservoir = statisticsCaseCollection()->reservoirs[i]; RimEclipseCase* rimReservoir = statisticsCaseCollection()->reservoirs[i];
// Check if any results are stored in cache // Check if any results are stored in cache
if (rimReservoir->results(RiaPorosityModel::MATRIX_MODEL)->storedResultsCount() > 0 || if (rimReservoir->results(RiaDefines::MATRIX_MODEL)->storedResultsCount() > 0 ||
rimReservoir->results(RiaPorosityModel::FRACTURE_MODEL)->storedResultsCount() > 0) rimReservoir->results(RiaDefines::FRACTURE_MODEL)->storedResultsCount() > 0)
{ {
foundResultsInCache = true; foundResultsInCache = true;
break; break;
@@ -236,7 +236,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
// for all cases // for all cases
{ {
RiaPorosityModel::PorosityModelType poroModel = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType poroModel = RiaDefines::MATRIX_MODEL;
std::vector<RigTimeStepInfo> timeStepInfos = rigCaseData->results(poroModel)->timeStepInfos(0); std::vector<RigTimeStepInfo> timeStepInfos = rigCaseData->results(poroModel)->timeStepInfos(0);
@@ -330,7 +330,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
if (activeM[gridLocalCellIndex] == 0) if (activeM[gridLocalCellIndex] == 0)
{ {
if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->isActive(reservoirCellIndex)) if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->isActive(reservoirCellIndex))
{ {
activeM[gridLocalCellIndex] = 1; activeM[gridLocalCellIndex] = 1;
} }
@@ -338,7 +338,7 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
if (activeF[gridLocalCellIndex] == 0) if (activeF[gridLocalCellIndex] == 0)
{ {
if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RiaPorosityModel::FRACTURE_MODEL)->isActive(reservoirCellIndex)) if (caseCollection->reservoirs[caseIdx]->eclipseCaseData()->activeCellInfo(RiaDefines::FRACTURE_MODEL)->isActive(reservoirCellIndex))
{ {
activeF[gridLocalCellIndex] = 1; activeF[gridLocalCellIndex] = 1;
} }
@@ -422,13 +422,13 @@ void RimIdenticalGridCaseGroup::clearStatisticsResults()
RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i]; RimEclipseCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
if (!rimStaticsCase) continue; if (!rimStaticsCase) continue;
if (rimStaticsCase->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()) if (rimStaticsCase->results(RiaDefines::MATRIX_MODEL)->cellResults())
{ {
rimStaticsCase->results(RiaPorosityModel::MATRIX_MODEL)->cellResults()->clearAllResults(); rimStaticsCase->results(RiaDefines::MATRIX_MODEL)->cellResults()->clearAllResults();
} }
if (rimStaticsCase->results(RiaPorosityModel::FRACTURE_MODEL)->cellResults()) if (rimStaticsCase->results(RiaDefines::FRACTURE_MODEL)->cellResults())
{ {
rimStaticsCase->results(RiaPorosityModel::FRACTURE_MODEL)->cellResults()->clearAllResults(); rimStaticsCase->results(RiaDefines::FRACTURE_MODEL)->cellResults()->clearAllResults();
} }
for (size_t j = 0; j < rimStaticsCase->reservoirViews.size(); j++) for (size_t j = 0; j < rimStaticsCase->reservoirViews.size(); j++)
@@ -472,9 +472,9 @@ bool RimIdenticalGridCaseGroup::contains(RimEclipseCase* reservoir) const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RimIdenticalGridCaseGroup::unionOfActiveCells(RiaPorosityModel::PorosityModelType porosityType) RigActiveCellInfo* RimIdenticalGridCaseGroup::unionOfActiveCells(RiaDefines::PorosityModelType porosityType)
{ {
if (porosityType == RiaPorosityModel::MATRIX_MODEL) if (porosityType == RiaDefines::MATRIX_MODEL)
{ {
return m_unionOfMatrixActiveCells.p(); return m_unionOfMatrixActiveCells.p();
} }

View File

@@ -68,7 +68,7 @@ public:
RigMainGrid* mainGrid(); RigMainGrid* mainGrid();
RigActiveCellInfo* unionOfActiveCells(RiaPorosityModel::PorosityModelType porosityType); RigActiveCellInfo* unionOfActiveCells(RiaDefines::PorosityModelType porosityType);
void computeUnionOfActiveCells(); void computeUnionOfActiveCells();
static bool isStatisticsCaseCollection(RimCaseCollection* rimCaseCollection); static bool isStatisticsCaseCollection(RimCaseCollection* rimCaseCollection);

View File

@@ -391,7 +391,7 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RiaDefines::Result
for (i = 0; i < timeStepCount; i++) for (i = 0; i < timeStepCount; i++)
{ {
std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[i]; std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[i];
if (!m_readerInterface->dynamicResult(resultName, RiaPorosityModel::MATRIX_MODEL, i, &values)) if (!m_readerInterface->dynamicResult(resultName, RiaDefines::MATRIX_MODEL, i, &values))
{ {
resultLoadingSucess = false; resultLoadingSucess = false;
} }
@@ -402,7 +402,7 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(RiaDefines::Result
m_cellResults->cellScalarResults(scalarResultIndex).resize(1); m_cellResults->cellScalarResults(scalarResultIndex).resize(1);
std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[0]; std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[0];
if (!m_readerInterface->staticResult(resultName, RiaPorosityModel::MATRIX_MODEL, &values)) if (!m_readerInterface->staticResult(resultName, RiaDefines::MATRIX_MODEL, &values))
{ {
resultLoadingSucess = false; resultLoadingSucess = false;
} }
@@ -472,7 +472,7 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResultForTimeStep(RiaDefi
std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[timeStepIndex]; std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[timeStepIndex];
if (values.size() == 0) if (values.size() == 0)
{ {
if (!m_readerInterface->dynamicResult(resultName, RiaPorosityModel::MATRIX_MODEL, timeStepIndex, &values)) if (!m_readerInterface->dynamicResult(resultName, RiaDefines::MATRIX_MODEL, timeStepIndex, &values))
{ {
resultLoadingSucess = false; resultLoadingSucess = false;
} }
@@ -483,7 +483,7 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResultForTimeStep(RiaDefi
m_cellResults->cellScalarResults(scalarResultIndex).resize(1); m_cellResults->cellScalarResults(scalarResultIndex).resize(1);
std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[0]; std::vector<double>& values = m_cellResults->cellScalarResults(scalarResultIndex)[0];
if (!m_readerInterface->staticResult(resultName, RiaPorosityModel::MATRIX_MODEL, &values)) if (!m_readerInterface->staticResult(resultName, RiaDefines::MATRIX_MODEL, &values))
{ {
resultLoadingSucess = false; resultLoadingSucess = false;
} }

View File

@@ -434,9 +434,9 @@ void RigEclipseCaseData::computeActiveCellBoundingBoxes()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaPorosityModel::PorosityModelType porosityModel) RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaDefines::PorosityModelType porosityModel)
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_activeCellInfo.p(); return m_activeCellInfo.p();
} }
@@ -447,9 +447,9 @@ RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaPorosityModel::Porosity
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaPorosityModel::PorosityModelType porosityModel) const const RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaDefines::PorosityModelType porosityModel) const
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_activeCellInfo.p(); return m_activeCellInfo.p();
} }
@@ -460,9 +460,9 @@ const RigActiveCellInfo* RigEclipseCaseData::activeCellInfo(RiaPorosityModel::Po
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RigEclipseCaseData::setActiveCellInfo(RiaPorosityModel::PorosityModelType porosityModel, RigActiveCellInfo* activeCellInfo) void RigEclipseCaseData::setActiveCellInfo(RiaDefines::PorosityModelType porosityModel, RigActiveCellInfo* activeCellInfo)
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
m_activeCellInfo = activeCellInfo; m_activeCellInfo = activeCellInfo;
m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p()); m_matrixModelResults->setActiveCellInfo(m_activeCellInfo.p());
@@ -604,9 +604,9 @@ RigFormationNames* RigEclipseCaseData::activeFormationNames()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RigCaseCellResultsData* RigEclipseCaseData::results(RiaPorosityModel::PorosityModelType porosityModel) RigCaseCellResultsData* RigEclipseCaseData::results(RiaDefines::PorosityModelType porosityModel)
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_matrixModelResults.p(); return m_matrixModelResults.p();
} }
@@ -617,9 +617,9 @@ RigCaseCellResultsData* RigEclipseCaseData::results(RiaPorosityModel::PorosityMo
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
const RigCaseCellResultsData* RigEclipseCaseData::results(RiaPorosityModel::PorosityModelType porosityModel) const const RigCaseCellResultsData* RigEclipseCaseData::results(RiaDefines::PorosityModelType porosityModel) const
{ {
if (porosityModel == RiaPorosityModel::MATRIX_MODEL) if (porosityModel == RiaDefines::MATRIX_MODEL)
{ {
return m_matrixModelResults.p(); return m_matrixModelResults.p();
} }

View File

@@ -64,12 +64,12 @@ public:
RigGridBase* grid(size_t index); RigGridBase* grid(size_t index);
size_t gridCount() const; size_t gridCount() const;
RigCaseCellResultsData* results(RiaPorosityModel::PorosityModelType porosityModel); RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel);
const RigCaseCellResultsData* results(RiaPorosityModel::PorosityModelType porosityModel) const; const RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel) const;
RigActiveCellInfo* activeCellInfo(RiaPorosityModel::PorosityModelType porosityModel); RigActiveCellInfo* activeCellInfo(RiaDefines::PorosityModelType porosityModel);
const RigActiveCellInfo* activeCellInfo(RiaPorosityModel::PorosityModelType porosityModel) const; const RigActiveCellInfo* activeCellInfo(RiaDefines::PorosityModelType porosityModel) const;
void setActiveCellInfo(RiaPorosityModel::PorosityModelType porosityModel, RigActiveCellInfo* activeCellInfo); void setActiveCellInfo(RiaDefines::PorosityModelType porosityModel, RigActiveCellInfo* activeCellInfo);
void setActiveFormationNames(RigFormationNames* activeFormationNames); void setActiveFormationNames(RigFormationNames* activeFormationNames);
RigFormationNames* activeFormationNames(); RigFormationNames* activeFormationNames();

View File

@@ -70,7 +70,7 @@ const RigActiveCellInfo * RigFlowDiagResults::activeCellInfo(const RigFlowDiagRe
RimEclipseResultCase* eclCase; RimEclipseResultCase* eclCase;
m_flowDiagSolution->firstAncestorOrThisOfType(eclCase); m_flowDiagSolution->firstAncestorOrThisOfType(eclCase);
return eclCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); // Todo: base on resVarAddr member return eclCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL); // Todo: base on resVarAddr member
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -158,7 +158,7 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
{ {
using namespace Opm::FlowDiagnostics; using namespace Opm::FlowDiagnostics;
RigFlowDiagTimeStepResult result(m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaPorosityModel::MATRIX_MODEL)->reservoirActiveCellCount()); RigFlowDiagTimeStepResult result(m_eclipseCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->reservoirActiveCellCount());
caf::ProgressInfo progressInfo(8, "Calculating Flow Diagnostics"); caf::ProgressInfo progressInfo(8, "Calculating Flow Diagnostics");
@@ -206,7 +206,7 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
QStringList restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE); QStringList restartFileNames = RifEclipseOutputFileTools::filterFileNamesOfType(m_filesWithSameBaseName, ECL_RESTART_FILE);
size_t restartFileCount = static_cast<size_t>(restartFileNames.size()); size_t restartFileCount = static_cast<size_t>(restartFileNames.size());
size_t maxTimeStepCount = m_eclipseCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->maxTimeStepCount(); size_t maxTimeStepCount = m_eclipseCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount();
if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount ) if (restartFileCount <= timeStepIndex && restartFileCount != maxTimeStepCount )
{ {
@@ -241,9 +241,9 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
CVF_ASSERT(currentRestartData); CVF_ASSERT(currentRestartData);
size_t resultIndexWithMaxTimeSteps = cvf::UNDEFINED_SIZE_T; size_t resultIndexWithMaxTimeSteps = cvf::UNDEFINED_SIZE_T;
m_eclipseCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->maxTimeStepCount(&resultIndexWithMaxTimeSteps); m_eclipseCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount(&resultIndexWithMaxTimeSteps);
int reportStepNumber = m_eclipseCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->reportStepNumber(resultIndexWithMaxTimeSteps, timeStepIndex); int reportStepNumber = m_eclipseCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->reportStepNumber(resultIndexWithMaxTimeSteps, timeStepIndex);
if ( !currentRestartData->selectReportStep(reportStepNumber) ) if ( !currentRestartData->selectReportStep(reportStepNumber) )
{ {
@@ -256,7 +256,7 @@ RigFlowDiagTimeStepResult RigFlowDiagSolverInterface::calculate(size_t timeStepI
Opm::FlowDiagnostics::CellSetValues sumWellFluxPrCell; Opm::FlowDiagnostics::CellSetValues sumWellFluxPrCell;
{ {
if (m_eclipseCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->hasFlowDiagUsableFluxes()) if (m_eclipseCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->hasFlowDiagUsableFluxes())
{ {
Opm::FlowDiagnostics::ConnectionValues connectionsVals = RigFlowDiagInterfaceTools::extractFluxFieldFromRestartFile(*(m_opmFlowDiagStaticData->m_eclGraph), Opm::FlowDiagnostics::ConnectionValues connectionsVals = RigFlowDiagInterfaceTools::extractFluxFieldFromRestartFile(*(m_opmFlowDiagStaticData->m_eclGraph),
*currentRestartData, *currentRestartData,

View File

@@ -250,7 +250,7 @@ void RigReservoirBuilderMock::populateReservoir(RigEclipseCaseData* eclipseCase)
addFaults(eclipseCase); addFaults(eclipseCase);
// Set all cells active // Set all cells active
RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RiaPorosityModel::MATRIX_MODEL); RigActiveCellInfo* activeCellInfo = eclipseCase->activeCellInfo(RiaDefines::MATRIX_MODEL);
activeCellInfo->setReservoirCellCount(eclipseCase->mainGrid()->globalCellArray().size()); activeCellInfo->setReservoirCellCount(eclipseCase->mainGrid()->globalCellArray().size());
for (size_t i = 0; i < eclipseCase->mainGrid()->globalCellArray().size(); i++) for (size_t i = 0; i < eclipseCase->mainGrid()->globalCellArray().size(); i++)
{ {

View File

@@ -41,7 +41,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromUiResultName(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromUiResultName(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& uiResultName) const QString& uiResultName)
{ {
@@ -134,7 +134,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromUiResultName(Rig
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromNameAndType(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromNameAndType(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& uiResultName, const QString& uiResultName,
RiaDefines::ResultCatType resultType) RiaDefines::ResultCatType resultType)
@@ -209,7 +209,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultDefinition
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RigResultAccessorFactory::createNativeFromUiResultName(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultAccessor> RigResultAccessorFactory::createNativeFromUiResultName(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& uiResultName) const QString& uiResultName)
{ {
@@ -237,7 +237,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createNativeFromUiResultNa
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultIdx(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultIdx(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
size_t resultIndex) size_t resultIndex)
{ {

View File

@@ -41,14 +41,14 @@ public:
static cvf::ref<RigResultAccessor> static cvf::ref<RigResultAccessor>
createFromUiResultName(RigEclipseCaseData* eclipseCase, createFromUiResultName(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& uiResultName); const QString& uiResultName);
static cvf::ref<RigResultAccessor> static cvf::ref<RigResultAccessor>
createFromNameAndType(RigEclipseCaseData* eclipseCase, createFromNameAndType(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& uiResultName, const QString& uiResultName,
RiaDefines::ResultCatType resultType); RiaDefines::ResultCatType resultType);
@@ -56,7 +56,7 @@ public:
static cvf::ref<RigResultAccessor> static cvf::ref<RigResultAccessor>
createFromResultIdx(RigEclipseCaseData* eclipseCase, createFromResultIdx(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
size_t resultIndex); size_t resultIndex);
@@ -64,7 +64,7 @@ private:
static cvf::ref<RigResultAccessor> static cvf::ref<RigResultAccessor>
createNativeFromUiResultName(RigEclipseCaseData* eclipseCase, createNativeFromUiResultName(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
const QString& resultName); const QString& resultName);

View File

@@ -31,7 +31,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
QString& uiResultName) QString& uiResultName)
{ {
@@ -53,7 +53,7 @@ cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier(RigEc
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase, cvf::ref<RigResultModifier> RigResultModifierFactory::createResultModifier(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t scalarResultIndex) size_t timeStepIndex, size_t scalarResultIndex)
{ {
if ( !eclipseCase ) return NULL; if ( !eclipseCase ) return NULL;

View File

@@ -30,14 +30,14 @@ public:
static cvf::ref<RigResultModifier> static cvf::ref<RigResultModifier>
createResultModifier(RigEclipseCaseData* eclipseCase, createResultModifier(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
QString& uiResultName); QString& uiResultName);
static cvf::ref<RigResultModifier> static cvf::ref<RigResultModifier>
createResultModifier(RigEclipseCaseData* eclipseCase, createResultModifier(RigEclipseCaseData* eclipseCase,
size_t gridIndex, size_t gridIndex,
RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::PorosityModelType porosityModel,
size_t timeStepIndex, size_t timeStepIndex,
size_t scalarResultIndex); size_t scalarResultIndex);
}; };

View File

@@ -95,14 +95,14 @@ public:
RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args); RimEclipseCase* rimCase = RiaSocketTools::findCaseFromArgs(server, args);
if (!rimCase) return true; if (!rimCase) return true;
RiaPorosityModel::PorosityModelType porosityModel = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModel = RiaDefines::MATRIX_MODEL;
if (args.size() > 2) if (args.size() > 2)
{ {
QString prorosityModelString = args[2]; QString prorosityModelString = args[2];
if (prorosityModelString.toUpper() == "FRACTURE") if (prorosityModelString.toUpper() == "FRACTURE")
{ {
porosityModel = RiaPorosityModel::FRACTURE_MODEL; porosityModel = RiaDefines::FRACTURE_MODEL;
} }
} }
@@ -144,7 +144,7 @@ public:
return true; return true;
} }
static void calculateMatrixModelActiveCellInfo(RimEclipseCase* reservoirCase, RiaPorosityModel::PorosityModelType porosityModel, std::vector<qint32>& gridNumber, std::vector<qint32>& cellI, std::vector<qint32>& cellJ, std::vector<qint32>& cellK, std::vector<qint32>& parentGridNumber, std::vector<qint32>& hostCellI, std::vector<qint32>& hostCellJ, std::vector<qint32>& hostCellK, std::vector<qint32>& globalCoarseningBoxIdx) static void calculateMatrixModelActiveCellInfo(RimEclipseCase* reservoirCase, RiaDefines::PorosityModelType porosityModel, std::vector<qint32>& gridNumber, std::vector<qint32>& cellI, std::vector<qint32>& cellJ, std::vector<qint32>& cellK, std::vector<qint32>& parentGridNumber, std::vector<qint32>& hostCellI, std::vector<qint32>& hostCellJ, std::vector<qint32>& hostCellK, std::vector<qint32>& globalCoarseningBoxIdx)
{ {
gridNumber.clear(); gridNumber.clear();
cellI.clear(); cellI.clear();
@@ -412,7 +412,7 @@ public:
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
if (rimCase && rimCase->eclipseCaseData()) if (rimCase && rimCase->eclipseCaseData())
{ {
rimCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); rimCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T) if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
{ {
canFetchData = false; canFetchData = false;
@@ -431,7 +431,7 @@ public:
return true; return true;
} }
std::vector<QDateTime> timeStepDates = rimCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->timeStepDates(scalarIndexWithMaxTimeStepCount); std::vector<QDateTime> timeStepDates = rimCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->timeStepDates(scalarIndexWithMaxTimeStepCount);
quint64 timeStepCount = timeStepDates.size(); quint64 timeStepCount = timeStepDates.size();
quint64 byteCount = sizeof(quint64) + 6 * timeStepCount * sizeof(qint32); quint64 byteCount = sizeof(quint64) + 6 * timeStepCount * sizeof(qint32);
@@ -499,7 +499,7 @@ public:
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T; size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
if (rimCase && rimCase->eclipseCaseData()) if (rimCase && rimCase->eclipseCaseData())
{ {
rimCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount); rimCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T) if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
{ {
canFetchData = false; canFetchData = false;
@@ -518,7 +518,7 @@ public:
return true; return true;
} }
std::vector<double> daysSinceSimulationStart = rimCase->eclipseCaseData()->results(RiaPorosityModel::MATRIX_MODEL)->daysSinceSimulationStart(scalarIndexWithMaxTimeStepCount); std::vector<double> daysSinceSimulationStart = rimCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->daysSinceSimulationStart(scalarIndexWithMaxTimeStepCount);
quint64 timeStepCount = daysSinceSimulationStart.size(); quint64 timeStepCount = daysSinceSimulationStart.size();
quint64 byteCount = sizeof(quint64) + timeStepCount * sizeof(qint32); quint64 byteCount = sizeof(quint64) + timeStepCount * sizeof(qint32);

View File

@@ -165,10 +165,10 @@ public:
QString porosityModelName; QString porosityModelName;
porosityModelName = args[2]; porosityModelName = args[2];
RiaPorosityModel::PorosityModelType porosityModelEnum = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModelEnum = RiaDefines::MATRIX_MODEL;
if (porosityModelName.toUpper() == "FRACTURE") if (porosityModelName.toUpper() == "FRACTURE")
{ {
porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
if (!rimCase || !rimCase->eclipseCaseData()) if (!rimCase || !rimCase->eclipseCaseData())
@@ -336,10 +336,10 @@ public:
QString porosityModelName; QString porosityModelName;
porosityModelName = args[2]; porosityModelName = args[2];
RiaPorosityModel::PorosityModelType porosityModelEnum = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModelEnum = RiaDefines::MATRIX_MODEL;
if (porosityModelName.toUpper() == "FRACTURE") if (porosityModelName.toUpper() == "FRACTURE")
{ {
porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
if (!rimCase || !rimCase->eclipseCaseData() ) if (!rimCase || !rimCase->eclipseCaseData() )

View File

@@ -60,10 +60,10 @@ public:
QString propertyName = args[2]; QString propertyName = args[2];
QString porosityModelName = args[3]; QString porosityModelName = args[3];
RiaPorosityModel::PorosityModelType porosityModelEnum = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModelEnum = RiaDefines::MATRIX_MODEL;
if (porosityModelName == "Fracture") if (porosityModelName == "Fracture")
{ {
porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
// Find the requested data // Find the requested data
@@ -233,10 +233,10 @@ public:
return true; return true;
} }
RiaPorosityModel::PorosityModelType porosityModelEnum = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModelEnum = RiaDefines::MATRIX_MODEL;
if (porosityModelName == "Fracture") if (porosityModelName == "Fracture")
{ {
porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T; size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
@@ -383,7 +383,7 @@ public:
m_bytesPerTimeStepToRead(0), m_bytesPerTimeStepToRead(0),
m_currentTimeStepNumberToRead(0), m_currentTimeStepNumberToRead(0),
m_invalidActiveCellCountDetected(false), m_invalidActiveCellCountDetected(false),
m_porosityModelEnum(RiaPorosityModel::MATRIX_MODEL) m_porosityModelEnum(RiaDefines::MATRIX_MODEL)
{} {}
static QString commandName () { return QString("SetActiveCellProperty"); } static QString commandName () { return QString("SetActiveCellProperty"); }
@@ -397,7 +397,7 @@ public:
if (porosityModelName == "Fracture") if (porosityModelName == "Fracture")
{ {
m_porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; m_porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
// Find the requested data, Or create a set if we are setting data and it is not found // Find the requested data, Or create a set if we are setting data and it is not found
@@ -697,7 +697,7 @@ private:
size_t m_currentScalarIndex; size_t m_currentScalarIndex;
QString m_currentPropertyName; QString m_currentPropertyName;
std::vector<size_t> m_requestedTimesteps; std::vector<size_t> m_requestedTimesteps;
RiaPorosityModel::PorosityModelType m_porosityModelEnum; RiaDefines::PorosityModelType m_porosityModelEnum;
quint64 m_timeStepCountToRead; quint64 m_timeStepCountToRead;
quint64 m_bytesPerTimeStepToRead; quint64 m_bytesPerTimeStepToRead;
@@ -724,7 +724,7 @@ public:
m_bytesPerTimeStepToRead(0), m_bytesPerTimeStepToRead(0),
m_currentTimeStepNumberToRead(0), m_currentTimeStepNumberToRead(0),
m_invalidDataDetected(false), m_invalidDataDetected(false),
m_porosityModelEnum(RiaPorosityModel::MATRIX_MODEL) m_porosityModelEnum(RiaDefines::MATRIX_MODEL)
{} {}
static QString commandName () { return QString("SetGridProperty"); } static QString commandName () { return QString("SetGridProperty"); }
@@ -746,7 +746,7 @@ public:
if (porosityModelName == "Fracture") if (porosityModelName == "Fracture")
{ {
m_porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; m_porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
RigGridBase* grid = rimCase->eclipseCaseData()->grid(m_currentGridIndex); RigGridBase* grid = rimCase->eclipseCaseData()->grid(m_currentGridIndex);
@@ -1061,7 +1061,7 @@ private:
size_t m_currentScalarIndex; size_t m_currentScalarIndex;
QString m_currentPropertyName; QString m_currentPropertyName;
std::vector<size_t> m_requestedTimesteps; std::vector<size_t> m_requestedTimesteps;
RiaPorosityModel::PorosityModelType m_porosityModelEnum; RiaDefines::PorosityModelType m_porosityModelEnum;
quint64 m_timeStepCountToRead; quint64 m_timeStepCountToRead;
quint64 m_bytesPerTimeStepToRead; quint64 m_bytesPerTimeStepToRead;
@@ -1092,11 +1092,11 @@ public:
} }
QString porosityModelName = args[2]; QString porosityModelName = args[2];
RiaPorosityModel::PorosityModelType porosityModelEnum = RiaPorosityModel::MATRIX_MODEL; RiaDefines::PorosityModelType porosityModelEnum = RiaDefines::MATRIX_MODEL;
if (porosityModelName == "Fracture") if (porosityModelName == "Fracture")
{ {
porosityModelEnum = RiaPorosityModel::FRACTURE_MODEL; porosityModelEnum = RiaDefines::FRACTURE_MODEL;
} }
std::vector<QString> propNames; std::vector<QString> propNames;

View File

@@ -260,7 +260,7 @@ TEST(RigReservoirTest, UnifiedTestFile)
void buildResultInfoString(RigReservoir* reservoir, RiaPorosityModel::PorosityModelType porosityModel, RiaDefines::ResultCatType resultType) void buildResultInfoString(RigReservoir* reservoir, RiaDefines::PorosityModelType porosityModel, RiaDefines::ResultCatType resultType)
{ {
RigCaseCellResultsData* matrixResults = reservoir->results(porosityModel); RigCaseCellResultsData* matrixResults = reservoir->results(porosityModel);
{ {
@@ -302,22 +302,22 @@ TEST(RigReservoirTest, DualPorosityTest)
qDebug() << "\n\n" << qDebug() << "\n\n" <<
"Matrix porosities, DYNAMIC results" << "Matrix porosities, DYNAMIC results" <<
"----------------------------------"; "----------------------------------";
buildResultInfoString(reservoir.p(), RiaPorosityModel::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE); buildResultInfoString(reservoir.p(), RiaDefines::MATRIX_MODEL, RiaDefines::DYNAMIC_NATIVE);
qDebug() << "\n\n" << qDebug() << "\n\n" <<
"Matrix porosities, STATIC results" << "Matrix porosities, STATIC results" <<
"----------------------------------"; "----------------------------------";
buildResultInfoString(reservoir.p(), RiaPorosityModel::MATRIX_MODEL, RiaDefines::STATIC_NATIVE); buildResultInfoString(reservoir.p(), RiaDefines::MATRIX_MODEL, RiaDefines::STATIC_NATIVE);
qDebug() << "\n\n" << qDebug() << "\n\n" <<
"Fracture porosities, DYNAMIC results" << "Fracture porosities, DYNAMIC results" <<
"----------------------------------"; "----------------------------------";
buildResultInfoString(reservoir.p(), RiaPorosityModel::FRACTURE_MODEL, RiaDefines::DYNAMIC_NATIVE); buildResultInfoString(reservoir.p(), RiaDefines::FRACTURE_MODEL, RiaDefines::DYNAMIC_NATIVE);
qDebug() << "\n\n" << qDebug() << "\n\n" <<
"Fracture porosities, STATIC results" << "Fracture porosities, STATIC results" <<
"----------------------------------"; "----------------------------------";
buildResultInfoString(reservoir.p(), RiaPorosityModel::FRACTURE_MODEL, RiaDefines::STATIC_NATIVE); buildResultInfoString(reservoir.p(), RiaDefines::FRACTURE_MODEL, RiaDefines::STATIC_NATIVE);
} }

View File

@@ -374,7 +374,7 @@ void RiuResultTextBuilder::appendTextFromResultColors(RigEclipseCaseData* eclips
return; return;
} }
RiaPorosityModel::PorosityModelType porosityModel = resultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = resultColors->porosityModel();
if (resultColors->isTernarySaturationSelected()) if (resultColors->isTernarySaturationSelected())
{ {
RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults(); RimReservoirCellResultsStorage* gridCellResults = resultColors->currentGridCellResults();
@@ -537,7 +537,7 @@ QString RiuResultTextBuilder::cellEdgeResultDetails()
adjustedTimeStep = 0; adjustedTimeStep = 0;
} }
RiaPorosityModel::PorosityModelType porosityModel = m_reservoirView->cellResult()->porosityModel(); RiaDefines::PorosityModelType porosityModel = m_reservoirView->cellResult()->porosityModel();
cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->eclipseCaseData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex); cvf::ref<RigResultAccessor> resultAccessor = RigResultAccessorFactory::createFromResultIdx(m_reservoirView->eclipseCase()->eclipseCaseData(), m_gridIndex, porosityModel, adjustedTimeStep, resultIndex);
if (resultAccessor.notNull()) if (resultAccessor.notNull())
{ {
@@ -664,7 +664,7 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors)
size_t sgasScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS"); size_t sgasScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
size_t swatScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT"); size_t swatScalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
RiaPorosityModel::PorosityModelType porosityModel = resultColors->porosityModel(); RiaDefines::PorosityModelType porosityModel = resultColors->porosityModel();
cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, soilScalarSetIndex); cvf::ref<RigResultAccessor> dataAccessObjectX = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, soilScalarSetIndex);
cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, sgasScalarSetIndex); cvf::ref<RigResultAccessor> dataAccessObjectY = RigResultAccessorFactory::createFromResultIdx(eclipseCaseData, m_gridIndex, porosityModel, m_timeStepIndex, sgasScalarSetIndex);

View File

@@ -113,7 +113,7 @@ void RiuSelectionChangedHandler::addCurveFromSelectionItem(const RiuEclipseSelec
eclipseView->eclipseCase() && eclipseView->eclipseCase() &&
eclipseView->eclipseCase()->eclipseCaseData()) eclipseView->eclipseCase()->eclipseCaseData())
{ {
RiaPorosityModel::PorosityModelType porosityModel = eclipseView->cellResult()->porosityModel(); RiaDefines::PorosityModelType porosityModel = eclipseView->cellResult()->porosityModel();
std::vector<QDateTime> timeStepDates = eclipseView->eclipseCase()->eclipseCaseData()->results(porosityModel)->timeStepDates(); std::vector<QDateTime> timeStepDates = eclipseView->eclipseCase()->eclipseCaseData()->results(porosityModel)->timeStepDates();