Major renaming of classes. Filenames not done yet.

RimReservoir		RimCase
RimResultReservoir	RimResultCase
RimInputReservoir	RimInputCase
RigEclipseCase		RigCaseData
RigReservoirCellResults	RigCaseCellResultsData
RigWellResults		RigSingleWellResultsData
RigGridCollection	RigGridManager
p4#: 21064
This commit is contained in:
Jacob Støren 2013-03-22 15:43:42 +01:00
parent bd33a64e84
commit e493db37d0
62 changed files with 349 additions and 349 deletions

View File

@ -273,7 +273,7 @@ bool RIApplication::loadProject(const QString& projectFileName)
// Now load the ReservoirViews for the cases
std::vector<RimReservoir*> casesToLoad;
std::vector<RimCase*> casesToLoad;
// Add all "native" cases in the project
for (size_t cIdx = 0; cIdx < m_project->reservoirs().size(); ++cIdx)
@ -286,7 +286,7 @@ bool RIApplication::loadProject(const QString& projectFileName)
{
if (m_project->caseGroups[cgIdx]->statisticsCaseCollection())
{
caf::PdmPointersField<RimReservoir*> & statCases = m_project->caseGroups[cgIdx]->statisticsCaseCollection()->reservoirs();
caf::PdmPointersField<RimCase*> & statCases = m_project->caseGroups[cgIdx]->statisticsCaseCollection()->reservoirs();
for (size_t scIdx = 0; scIdx < statCases.size(); ++scIdx)
{
casesToLoad.push_back(statCases[scIdx]);
@ -298,7 +298,7 @@ bool RIApplication::loadProject(const QString& projectFileName)
for (size_t cIdx = 0; cIdx < casesToLoad.size(); ++cIdx)
{
RimReservoir* ri = casesToLoad[cIdx];
RimCase* ri = casesToLoad[cIdx];
CVF_ASSERT(ri);
caseProgress.setProgressDescription(ri->caseName());
@ -494,7 +494,7 @@ bool RIApplication::openEclipseCase(const QString& caseName, const QString& case
QFileInfo gridFileName(caseFileName);
QString casePath = gridFileName.absolutePath();
RimResultReservoir* rimResultReservoir = new RimResultReservoir();
RimResultCase* rimResultReservoir = new RimResultCase();
rimResultReservoir->caseName = caseName;
rimResultReservoir->caseFileName = caseFileName;
rimResultReservoir->caseDirectory = casePath;
@ -529,7 +529,7 @@ bool RIApplication::openEclipseCase(const QString& caseName, const QString& case
//--------------------------------------------------------------------------------------------------
bool RIApplication::openInputEclipseCase(const QString& caseName, const QStringList& caseFileNames)
{
RimInputReservoir* rimInputReservoir = new RimInputReservoir();
RimInputCase* rimInputReservoir = new RimInputCase();
rimInputReservoir->caseName = caseName;
rimInputReservoir->openDataFileSet(caseFileNames);
@ -1189,7 +1189,7 @@ void RIApplication::saveSnapshotForAllViews(const QString& snapshotFolderName)
for (size_t i = 0; i < m_project->reservoirs().size(); ++i)
{
RimReservoir* ri = m_project->reservoirs()[i];
RimCase* ri = m_project->reservoirs()[i];
if (!ri) continue;
for (size_t j = 0; j < ri->reservoirViews().size(); j++)
@ -1360,7 +1360,7 @@ bool RIApplication::addEclipseCases(const QStringList& fileNames)
// First file is read completely including grid.
// The main grid from the first case is reused directly in for the other cases.
// When reading active cell info, only the total cell count is tested for consistency
RigEclipseCase* mainEclipseCase = NULL;
RigCaseData* mainEclipseCase = NULL;
{
QString firstFileName = fileNames[0];
@ -1369,7 +1369,7 @@ bool RIApplication::addEclipseCases(const QStringList& fileNames)
QString caseName = gridFileName.completeBaseName();
QString casePath = gridFileName.absolutePath();
RimResultReservoir* rimResultReservoir = new RimResultReservoir();
RimResultCase* rimResultReservoir = new RimResultCase();
rimResultReservoir->caseName = caseName;
rimResultReservoir->caseFileName = firstFileName;
rimResultReservoir->caseDirectory = casePath;
@ -1396,7 +1396,7 @@ bool RIApplication::addEclipseCases(const QStringList& fileNames)
QString caseName = gridFileName.completeBaseName();
QString casePath = gridFileName.absolutePath();
RimResultReservoir* rimResultReservoir = new RimResultReservoir();
RimResultCase* rimResultReservoir = new RimResultCase();
rimResultReservoir->caseName = caseName;
rimResultReservoir->caseFileName = fileName;
rimResultReservoir->caseDirectory = casePath;

View File

@ -30,8 +30,8 @@
#include "RimProject.h"
class RIProcess;
class RigEclipseCase;
class RimReservoir;
class RigCaseData;
class RimCase;
class Drawable;
class RiaSocketServer;
class RIPreferences;

View File

@ -247,7 +247,7 @@ TEST(RigReservoirTest, BasicTest)
TEST(RigReservoirTest, WellTest)
{
cvf::ref<RifReaderEclipseOutput> readerInterfaceEcl = new RifReaderEclipseOutput;
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
cvf::ref<RigCaseData> reservoir = new RigCaseData;
// Location of test dataset received from Håkon Høgstøl in July 2011 with 10k active cells
#ifdef WIN32

View File

@ -61,7 +61,7 @@ RifEclipseInputFileTools::~RifEclipseInputFileTools()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseCase* eclipseCase)
bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigCaseData* eclipseCase)
{
CVF_ASSERT(eclipseCase);
@ -176,7 +176,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
//--------------------------------------------------------------------------------------------------
/// Read known properties from the input file
//--------------------------------------------------------------------------------------------------
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString &fileName, RigEclipseCase *reservoir)
std::map<QString, QString> RifEclipseInputFileTools::readProperties(const QString &fileName, RigCaseData *reservoir)
{
CVF_ASSERT(reservoir);
@ -282,7 +282,7 @@ std::vector< RifKeywordAndFilePos > RifEclipseInputFileTools::findKeywordsOnFile
/// Reads the property data requested into the \a reservoir, overwriting any previous
/// propeties with the same name.
//--------------------------------------------------------------------------------------------------
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, const QString& resultName)
bool RifEclipseInputFileTools::readProperty(const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName)
{
CVF_ASSERT(eclipseCase);
@ -370,7 +370,7 @@ const std::vector<QString>& RifEclipseInputFileTools::knownPropertyKeywords()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord)
{
CVF_ASSERT(eclipseCase);
@ -402,7 +402,7 @@ bool RifEclipseInputFileTools::writePropertyToTextFile(const QString& fileName,
/// Create and write a result vector with values for all cells.
/// undefinedValue is used for cells with no result
//--------------------------------------------------------------------------------------------------
bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue)
bool RifEclipseInputFileTools::writeBinaryResultToTextFile(const QString& fileName, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue)
{
CVF_ASSERT(eclipseCase);
@ -519,7 +519,7 @@ void RifEclipseInputFileTools::findGridKeywordPositions(const QString& filename,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifEclipseInputFileTools::readPropertyAtFilePosition(const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName)
bool RifEclipseInputFileTools::readPropertyAtFilePosition(const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName)
{
CVF_ASSERT(eclipseCase);

View File

@ -27,7 +27,7 @@
#include "RifReaderInterface.h"
class RigEclipseCase;
class RigCaseData;
class QFile;
@ -52,19 +52,19 @@ public:
RifEclipseInputFileTools();
virtual ~RifEclipseInputFileTools();
static bool openGridFile(const QString& fileName, RigEclipseCase* eclipseCase);
static bool openGridFile(const QString& fileName, RigCaseData* eclipseCase);
// Returns map of assigned resultName and Eclipse Keyword.
static std::map<QString, QString> readProperties(const QString& fileName, RigEclipseCase* eclipseCase);
static bool readProperty (const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, const QString& resultName );
static bool readPropertyAtFilePosition (const QString& fileName, RigEclipseCase* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName );
static std::map<QString, QString> readProperties(const QString& fileName, RigCaseData* eclipseCase);
static bool readProperty (const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, const QString& resultName );
static bool readPropertyAtFilePosition (const QString& fileName, RigCaseData* eclipseCase, const QString& eclipseKeyWord, qint64 filePos, const QString& resultName );
static std::vector< RifKeywordAndFilePos > findKeywordsOnFile(const QString &fileName);
static const std::vector<QString>& knownPropertyKeywords();
static bool writePropertyToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
static bool writeBinaryResultToTextFile(const QString& fileName, RigEclipseCase* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
static bool writePropertyToTextFile(const QString& fileName, RigCaseData* eclipseCase, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord);
static bool writeBinaryResultToTextFile(const QString& fileName, RigCaseData* eclipseCase, RifReaderInterface::PorosityModelResultType porosityModel, size_t timeStep, const QString& resultName, const QString& eclipseKeyWord, const double undefinedValue);
private:
static void writeDataToTextFile(QFile* file, const QString& eclipseKeyWord, const std::vector<double>& resultData);

View File

@ -57,7 +57,7 @@ RifReaderEclipseInput::~RifReaderEclipseInput()
//--------------------------------------------------------------------------------------------------
/// Open file and read geometry into given reservoir object
//--------------------------------------------------------------------------------------------------
bool RifReaderEclipseInput::open(const QString& fileName, RigEclipseCase* eclipseCase)
bool RifReaderEclipseInput::open(const QString& fileName, RigCaseData* eclipseCase)
{
CVF_ASSERT(eclipseCase);

View File

@ -32,7 +32,7 @@ public:
virtual ~RifReaderEclipseInput();
// Virtual interface implementation
virtual bool open(const QString& fileName, RigEclipseCase* eclipseCase);
virtual bool open(const QString& fileName, RigCaseData* eclipseCase);

View File

@ -231,7 +231,7 @@ void RifReaderEclipseOutput::close()
//--------------------------------------------------------------------------------------------------
/// Read geometry from file given by name into given reservoir object
//--------------------------------------------------------------------------------------------------
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCase* eclipseCase)
bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid, RigCaseData* eclipseCase)
{
CVF_ASSERT(eclipseCase);
@ -337,7 +337,7 @@ bool RifReaderEclipseOutput::transferGeometry(const ecl_grid_type* mainEclGrid,
//--------------------------------------------------------------------------------------------------
/// Open file and read geometry into given reservoir object
//--------------------------------------------------------------------------------------------------
bool RifReaderEclipseOutput::open(const QString& fileName, RigEclipseCase* eclipseCase)
bool RifReaderEclipseOutput::open(const QString& fileName, RigCaseData* eclipseCase)
{
CVF_ASSERT(eclipseCase);
caf::ProgressInfo progInfo(100, "");
@ -394,7 +394,7 @@ bool RifReaderEclipseOutput::open(const QString& fileName, RigEclipseCase* eclip
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCase* eclipseCase)
bool RifReaderEclipseOutput::openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigCaseData* eclipseCase)
{
CVF_ASSERT(eclipseCase);
@ -544,8 +544,8 @@ bool RifReaderEclipseOutput::buildMetaData()
progInfo.incrementProgress();
RigReservoirCellResults* matrixModelResults = m_eclipseCase->results(RifReaderInterface::MATRIX_RESULTS);
RigReservoirCellResults* fractureModelResults = m_eclipseCase->results(RifReaderInterface::FRACTURE_RESULTS);
RigCaseCellResultsData* matrixModelResults = m_eclipseCase->results(RifReaderInterface::MATRIX_RESULTS);
RigCaseCellResultsData* fractureModelResults = m_eclipseCase->results(RifReaderInterface::FRACTURE_RESULTS);
if (m_dynamicResultsAccess.notNull())
{
@ -741,7 +741,7 @@ void RifReaderEclipseOutput::readWellCells()
std::vector<RigGridBase*> grids;
m_eclipseCase->allGrids(&grids);
cvf::Collection<RigWellResults> wells;
cvf::Collection<RigSingleWellResultsData> wells;
caf::ProgressInfo progress(well_info_get_num_wells(ert_well_info), "");
int wellIdx;
@ -750,7 +750,7 @@ void RifReaderEclipseOutput::readWellCells()
const char* wellName = well_info_iget_well_name(ert_well_info, wellIdx);
CVF_ASSERT(wellName);
cvf::ref<RigWellResults> wellResults = new RigWellResults;
cvf::ref<RigSingleWellResultsData> wellResults = new RigSingleWellResultsData;
wellResults->m_wellName = wellName;
well_ts_type* ert_well_time_series = well_info_get_ts(ert_well_info , wellName);

View File

@ -43,14 +43,14 @@ public:
RifReaderEclipseOutput();
virtual ~RifReaderEclipseOutput();
bool open(const QString& fileName, RigEclipseCase* eclipseCase);
virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigEclipseCase* eclipseCase);
bool open(const QString& fileName, RigCaseData* eclipseCase);
virtual bool openAndReadActiveCellData(const QString& fileName, const std::vector<QDateTime>& mainCaseTimeSteps, RigCaseData* eclipseCase);
void close();
bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values);
bool dynamicResult(const QString& result, PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector<double>* values);
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigEclipseCase* eclipseCase);
static bool transferGeometry(const ecl_grid_type* mainEclGrid, RigCaseData* eclipseCase);
private:
bool readActiveCellInfo();
@ -71,7 +71,7 @@ private:
QString m_fileName; // Name of file used to start accessing Eclipse output files
QStringList m_fileSet; // Set of files in filename's path with same base name as filename
RigEclipseCase* m_eclipseCase;
RigCaseData* m_eclipseCase;
std::vector<QDateTime> m_timeSteps;

View File

@ -27,7 +27,7 @@
#include <QDateTime>
class RigEclipseCase;
class RigCaseData;
//==================================================================================================
//
@ -47,7 +47,7 @@ public:
RifReaderInterface() {}
virtual ~RifReaderInterface() {}
virtual bool open(const QString& fileName, RigEclipseCase* eclipseCase) = 0;
virtual bool open(const QString& fileName, RigCaseData* eclipseCase) = 0;
virtual void close() = 0;
virtual bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values) = 0;

View File

@ -25,13 +25,13 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifReaderMockModel::open(const QString& fileName, RigEclipseCase* eclipseCase)
bool RifReaderMockModel::open(const QString& fileName, RigCaseData* eclipseCase)
{
m_reservoirBuilder.populateReservoir(eclipseCase);
m_reservoir = eclipseCase;
RigReservoirCellResults* cellResults = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS);
RigCaseCellResultsData* cellResults = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS);
std::vector<QDateTime> dates;
@ -170,7 +170,7 @@ void RifReaderMockModel::addLocalGridRefinement(const cvf::Vec3st& minCellPositi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifReaderMockModel::populateReservoir(RigEclipseCase* eclipseCase)
void RifReaderMockModel::populateReservoir(RigCaseData* eclipseCase)
{
m_reservoirBuilder.populateReservoir(eclipseCase);
}

View File

@ -33,17 +33,17 @@ public:
void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors);
virtual bool open( const QString& fileName, RigEclipseCase* eclipseCase );
virtual bool open( const QString& fileName, RigCaseData* eclipseCase );
virtual void close();
virtual bool staticResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, std::vector<double>* values );
virtual bool dynamicResult( const QString& result, RifReaderInterface::PorosityModelResultType matrixOrFracture, size_t stepIndex, std::vector<double>* values );
private:
void populateReservoir(RigEclipseCase* eclipseCase);
void populateReservoir(RigCaseData* eclipseCase);
bool inputProperty( const QString& propertyName, std::vector<double>* values );
RigReservoirBuilderMock m_reservoirBuilder;
RigEclipseCase* m_reservoir;
RigCaseData* m_reservoir;
};

View File

@ -96,7 +96,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
const RigGridBase* grid = dynamic_cast<const RigGridBase*>(generator->activeGrid());
CVF_ASSERT(grid != NULL);
RigEclipseCase* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
CVF_ASSERT(eclipseCase != NULL);
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = NULL;
@ -108,7 +108,7 @@ void RivCellEdgeGeometryGenerator::addCellEdgeResultsToDrawableGeo(
timeStepIndex = 0;
}
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
cellCenterDataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, timeStepIndex, cellResultSlot->gridScalarIndex());
}

View File

@ -221,9 +221,9 @@ void RivGridPartMgr::updateCellResultColor(size_t timeStepIndex, RimResultSlot*
size_t resTimeStepIdx = timeStepIndex;
if (cellResultSlot->hasStaticResult()) resTimeStepIdx = 0;
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResultSlot->porosityModel());
RigEclipseCase* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
RigCaseData* eclipseCase = cellResultSlot->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(m_grid.p(), porosityModel, resTimeStepIdx, scalarSetIndex);
if (dataAccessObject.isNull()) return;

View File

@ -26,7 +26,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivReservoirPartMgr::clearAndSetReservoir(const RigEclipseCase* eclipseCase)
void RivReservoirPartMgr::clearAndSetReservoir(const RigCaseData* eclipseCase)
{
m_allGrids.clear();
if (eclipseCase)

View File

@ -30,7 +30,7 @@ namespace cvf
class RimResultSlot;
class RimCellEdgeResultSlot;
class RivGridPartMgr;
class RigEclipseCase;
class RigCaseData;
//==================================================================================================
@ -43,7 +43,7 @@ class RigEclipseCase;
class RivReservoirPartMgr: public cvf::Object
{
public:
void clearAndSetReservoir(const RigEclipseCase* eclipseCase);
void clearAndSetReservoir(const RigCaseData* eclipseCase);
void setTransform(cvf::Transform* scaleTransform);
void setCellVisibility(size_t gridIndex, cvf::UByteArray* cellVisibilities );

View File

@ -125,7 +125,7 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(ReservoirGeometryCacheType g
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::clearGeometryCache(ReservoirGeometryCacheType geomType)
{
RigEclipseCase* eclipseCase = NULL;
RigCaseData* eclipseCase = NULL;
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
{
eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
@ -224,7 +224,7 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::createGeometry(ReservoirGeometryCacheType geometryType)
{
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
m_geometries[geometryType].clearAndSetReservoir(res);
m_geometries[geometryType].setTransform(m_scaleTransform.p());
std::vector<RigGridBase*> grids;
@ -246,7 +246,7 @@ void RivReservoirViewPartMgr::createGeometry(ReservoirGeometryCacheType geometry
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility, ReservoirGeometryCacheType geometryType, RigGridBase* grid, size_t gridIdx)
{
RigEclipseCase* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
RigCaseData* eclipseCase = m_reservoirView->eclipseCase()->reservoirData();
RigActiveCellInfo* activeCellInfo = m_reservoirView->currentActiveCellInfo();
switch (geometryType)
@ -370,7 +370,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex)
{
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
if ( frameIndex >= m_propFilteredGeometryFrames.size())
{
@ -418,7 +418,7 @@ void RivReservoirViewPartMgr::createPropertyFilteredGeometry(size_t frameIndex)
//--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameIndex)
{
RigEclipseCase* res = m_reservoirView->eclipseCase()->reservoirData();
RigCaseData* res = m_reservoirView->eclipseCase()->reservoirData();
if ( frameIndex >= m_propFilteredWellGeometryFrames.size())
{
@ -606,8 +606,8 @@ void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVis
const RimCellFilter::FilterModeType filterType = (*pfIt)->filterMode();
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel((*pfIt)->resultDefinition()->porosityModel());
RigEclipseCase* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel((*pfIt)->resultDefinition()->porosityModel());
RigCaseData* eclipseCase = propFilterColl->reservoirView()->eclipseCase()->reservoirData();
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, timeStepIndex, scalarResultIndex);
CVF_ASSERT(dataAccessObject.notNull());

View File

@ -72,11 +72,11 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
if (m_rimReservoirView.isNull()) return;
RigEclipseCase* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
RigCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
RimWell* well = m_rimWell;
RigWellResults* wellResults = well->wellResults();
RigSingleWellResultsData* wellResults = well->wellResults();
if (wellResults->m_staticWellCells.m_wellResultBranches.size() == 0)
{

View File

@ -158,8 +158,8 @@ void RivWellPipesPartMgr::calculateWellPipeCenterline( std::vector< std::vector
bool isAutoDetectBranches = m_rimReservoirView->wellCollection()->isAutoDetectingBranches();
RigEclipseCase* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
RigWellResults* wellResults = m_rimWell->wellResults();
RigCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->reservoirData();
RigSingleWellResultsData* wellResults = m_rimWell->wellResults();
const RigWellResultFrame& staticWellFrame = m_rimWell->wellResults()->m_staticWellCells;
@ -357,7 +357,7 @@ void RivWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
{
if (m_rimWell == NULL) return;
RigWellResults* wRes = m_rimWell->wellResults();
RigSingleWellResultsData* wRes = m_rimWell->wellResults();
if (wRes == NULL) return;
if (frameIndex < wRes->firstResultTimeStep()) return; // Or reset colors or something

View File

@ -39,7 +39,7 @@ public:
RimCaseCollection();
virtual ~RimCaseCollection();
caf::PdmPointersField<RimReservoir*> reservoirs;
caf::PdmPointersField<RimCase*> reservoirs;
RimIdenticalGridCaseGroup* parentCaseGroup();

View File

@ -23,7 +23,7 @@
#include "cafAppEnum.h"
#include "RimDefines.h"
class RigReservoirCellResults;
class RigCaseCellResultsData;
namespace caf
{

View File

@ -32,7 +32,7 @@ class RimCellPropertyFilterCollection;
class RimResultDefinition;
class RigGridBase;
class RigReservoirCellResults;
class RigCaseCellResultsData;
namespace cvf
{

View File

@ -72,7 +72,7 @@ RimIdenticalGridCaseGroup::~RimIdenticalGridCaseGroup()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIdenticalGridCaseGroup::addCase(RimReservoir* reservoir)
void RimIdenticalGridCaseGroup::addCase(RimCase* reservoir)
{
CVF_ASSERT(reservoir);
@ -102,7 +102,7 @@ void RimIdenticalGridCaseGroup::addCase(RimReservoir* reservoir)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIdenticalGridCaseGroup::removeCase(RimReservoir* reservoir)
void RimIdenticalGridCaseGroup::removeCase(RimCase* reservoir)
{
caseCollection()->reservoirs().removeChildObject(reservoir);
@ -148,9 +148,9 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
// The mainGrid from the first case is reused directly in for the other cases.
// When reading active cell info, only the total cell count is tested for consistency
RimReservoir* mainCase = caseCollection()->reservoirs[0];
RimCase* mainCase = caseCollection()->reservoirs[0];
mainCase->openEclipseGridFile();
RigEclipseCase* mainEclipseCase = mainCase->reservoirData();
RigCaseData* mainEclipseCase = mainCase->reservoirData();
CVF_ASSERT(mainEclipseCase);
// Read active cell info from all source cases
@ -158,7 +158,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
caf::ProgressInfo info(caseCollection()->reservoirs.size(), "Case group - Reading Active Cell data");
for (size_t i = 1; i < caseCollection()->reservoirs.size(); i++)
{
RimResultReservoir* rimReservoir = dynamic_cast<RimResultReservoir*>(caseCollection()->reservoirs[i]);
RimResultCase* rimReservoir = dynamic_cast<RimResultCase*>(caseCollection()->reservoirs[i]);
if(!rimReservoir) continue; // Input reservoir
if (!rimReservoir->openAndReadActiveCellData(mainEclipseCase))
@ -176,7 +176,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
bool foundResultsInCache = false;
for (size_t i = 0; i < statisticsCaseCollection()->reservoirs.size(); i++)
{
RimReservoir* rimReservoir = statisticsCaseCollection()->reservoirs[i];
RimCase* rimReservoir = statisticsCaseCollection()->reservoirs[i];
// Check if any results are stored in cache
if (rimReservoir->results(RifReaderInterface::MATRIX_RESULTS)->storedResultsCount() > 0 ||
@ -196,7 +196,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
for (size_t i = 0; i < statisticsCaseCollection()->reservoirs.size(); i++)
{
RimReservoir* rimReservoir = statisticsCaseCollection()->reservoirs[i];
RimCase* rimReservoir = statisticsCaseCollection()->reservoirs[i];
rimReservoir->openEclipseGridFile();
@ -314,7 +314,7 @@ void RimIdenticalGridCaseGroup::updateMainGridAndActiveCellsForStatisticsCases()
{
for (size_t i = 0; i < statisticsCaseCollection->reservoirs().size(); i++)
{
RimReservoir* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
RimCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
rimStaticsCase->reservoirData()->setMainGrid(this->mainGrid());
@ -332,7 +332,7 @@ void RimIdenticalGridCaseGroup::clearStatisticsResults()
{
for (size_t i = 0; i < statisticsCaseCollection->reservoirs().size(); i++)
{
RimReservoir* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
RimCase* rimStaticsCase = statisticsCaseCollection->reservoirs[i];
if (!rimStaticsCase) continue;
rimStaticsCase->results(RifReaderInterface::MATRIX_RESULTS)->cellResults()->clearAllResults();
@ -360,13 +360,13 @@ void RimIdenticalGridCaseGroup::clearActiveCellUnions()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIdenticalGridCaseGroup::contains(RimReservoir* reservoir) const
bool RimIdenticalGridCaseGroup::contains(RimCase* reservoir) const
{
CVF_ASSERT(reservoir);
for (size_t i = 0; i < caseCollection()->reservoirs().size(); i++)
{
RimReservoir* rimReservoir = caseCollection()->reservoirs()[i];
RimCase* rimReservoir = caseCollection()->reservoirs()[i];
if (reservoir->caseName == reservoir->caseName)
{
return true;

View File

@ -26,7 +26,7 @@
#include "RimStatisticsCaseCollection.h"
#include "RimCaseCollection.h"
class RimReservoir;
class RimCase;
class RigMainGrid;
class RigActiveCellInfo;
@ -45,9 +45,9 @@ public:
caf::PdmField<QString> name;
void addCase(RimReservoir* reservoir);
void removeCase(RimReservoir* reservoir);
bool contains(RimReservoir* reservoir) const;
void addCase(RimCase* reservoir);
void removeCase(RimCase* reservoir);
bool contains(RimCase* reservoir) const;
RimStatisticsCase* createAndAppendStatisticsCase();

View File

@ -38,12 +38,12 @@
#include "RIPreferences.h"
CAF_PDM_SOURCE_INIT(RimInputReservoir, "RimInputReservoir");
CAF_PDM_SOURCE_INIT(RimInputCase, "RimInputReservoir");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimInputReservoir::RimInputReservoir()
: RimReservoir()
RimInputCase::RimInputCase()
: RimCase()
{
CAF_PDM_InitObject("RimInputReservoir", ":/EclipseInput48x48.png", "", "");
CAF_PDM_InitField(&m_gridFileName, "GridFileName", QString(), "Case grid filename", "", "" ,"");
@ -58,7 +58,7 @@ RimInputReservoir::RimInputReservoir()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimInputReservoir::~RimInputReservoir()
RimInputCase::~RimInputCase()
{
delete m_inputPropertyCollection;
}
@ -67,7 +67,7 @@ RimInputReservoir::~RimInputReservoir()
/// Open the supplied file set. If no grid data has been read, it will first find the possible
/// grid data among the files then read all supported properties from the files matching the grid
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::openDataFileSet(const QStringList& filenames)
void RimInputCase::openDataFileSet(const QStringList& filenames)
{
if (caseName().contains("Input Mock Debug Model"))
{
@ -83,7 +83,7 @@ void RimInputReservoir::openDataFileSet(const QStringList& filenames)
if (this->reservoirData() == NULL)
{
this->setReservoirData(new RigEclipseCase);
this->setReservoirData(new RigCaseData);
}
// First find and read the grid data
@ -154,7 +154,7 @@ void RimInputReservoir::openDataFileSet(const QStringList& filenames)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimInputReservoir::openEclipseGridFile()
bool RimInputCase::openEclipseGridFile()
{
// Early exit if reservoir data is created
if (this->reservoirData() == NULL)
@ -167,7 +167,7 @@ bool RimInputReservoir::openEclipseGridFile()
}
else
{
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
readerInterface = new RifReaderEclipseInput;
if (!readerInterface->open(m_gridFileName, eclipseCase.p()))
{
@ -206,7 +206,7 @@ bool RimInputReservoir::openEclipseGridFile()
/// Loads input property data from the gridFile and additional files
/// Creates new InputProperties if necessary, and flags the unused ones as obsolete
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::loadAndSyncronizeInputProperties()
void RimInputCase::loadAndSyncronizeInputProperties()
{
// Make sure we actually have reservoir data
@ -313,7 +313,7 @@ void RimInputReservoir::loadAndSyncronizeInputProperties()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
void RimInputCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
}
@ -321,7 +321,7 @@ void RimInputReservoir::fieldChangedByUi(const caf::PdmFieldHandle* changedField
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::addFiles(const QStringList& newFileNames)
void RimInputCase::addFiles(const QStringList& newFileNames)
{
}
@ -330,7 +330,7 @@ void RimInputReservoir::addFiles(const QStringList& newFileNames)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::removeFiles(const QStringList& obsoleteFileNames)
void RimInputCase::removeFiles(const QStringList& obsoleteFileNames)
{
}
@ -338,7 +338,7 @@ void RimInputReservoir::removeFiles(const QStringList& obsoleteFileNames)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimInputReservoir::removeProperty(RimInputProperty* inputProperty)
void RimInputCase::removeProperty(RimInputProperty* inputProperty)
{
bool isPropertyFileReferencedByOthers = false;
@ -359,7 +359,7 @@ void RimInputReservoir::removeProperty(RimInputProperty* inputProperty)
}
// Remove the results pointed to by this input property
RigReservoirCellResults* results = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
RigCaseCellResultsData* results = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
results->removeResult(inputProperty->resultName);
this->removeResult(inputProperty->resultName);
@ -368,9 +368,9 @@ void RimInputReservoir::removeProperty(RimInputProperty* inputProperty)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelName)
cvf::ref<RifReaderInterface> RimInputCase::createMockModel(QString modelName)
{
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
cvf::ref<RigCaseData> reservoir = new RigCaseData;
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
if (modelName == "Input Mock Debug Model Simple")
@ -412,7 +412,7 @@ cvf::ref<RifReaderInterface> RimInputReservoir::createMockModel(QString modelNam
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimInputReservoir::locationOnDisc() const
QString RimInputCase::locationOnDisc() const
{
if (m_gridFileName().isEmpty()) return QString();

View File

@ -36,13 +36,13 @@ class RifReaderInterface;
//
//
//==================================================================================================
class RimInputReservoir : public RimReservoir
class RimInputCase : public RimCase
{
CAF_PDM_HEADER_INIT;
public:
RimInputReservoir();
virtual ~RimInputReservoir();
RimInputCase();
virtual ~RimInputCase();
// Fields
caf::PdmField<std::vector<QString> > m_additionalFileNames;

View File

@ -44,7 +44,7 @@ RimProject::RimProject(void)
scriptCollection = new RimScriptCollection();
scriptCollection->directory.setUiHidden(true);
m_gridCollection = new RigGridCollection;
m_gridCollection = new RigGridManager;
initAfterRead();
}
@ -130,11 +130,11 @@ QString RimProject::projectFileVersionString() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimProject::moveEclipseCaseIntoCaseGroup(RimReservoir* rimReservoir)
void RimProject::moveEclipseCaseIntoCaseGroup(RimCase* rimReservoir)
{
CVF_ASSERT(rimReservoir);
RigEclipseCase* rigEclipseCase = rimReservoir->reservoirData();
RigCaseData* rigEclipseCase = rimReservoir->reservoirData();
RigMainGrid* equalGrid = registerCaseInGridCollection(rigEclipseCase);
CVF_ASSERT(equalGrid);
@ -167,7 +167,7 @@ void RimProject::moveEclipseCaseIntoCaseGroup(RimReservoir* rimReservoir)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimProject::removeCaseFromAllGroups(RimReservoir* reservoir)
void RimProject::removeCaseFromAllGroups(RimCase* reservoir)
{
m_gridCollection->removeCase(reservoir->reservoirData());
@ -185,7 +185,7 @@ void RimProject::removeCaseFromAllGroups(RimReservoir* reservoir)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigMainGrid* RimProject::registerCaseInGridCollection(RigEclipseCase* rigEclipseCase)
RigMainGrid* RimProject::registerCaseInGridCollection(RigCaseData* rigEclipseCase)
{
CVF_ASSERT(rigEclipseCase);
@ -221,11 +221,11 @@ RigMainGrid* RimProject::registerCaseInGridCollection(RigEclipseCase* rigEclipse
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimProject::insertCaseInCaseGroup(RimIdenticalGridCaseGroup* caseGroup, RimReservoir* rimReservoir)
void RimProject::insertCaseInCaseGroup(RimIdenticalGridCaseGroup* caseGroup, RimCase* rimReservoir)
{
CVF_ASSERT(rimReservoir);
RigEclipseCase* rigEclipseCase = rimReservoir->reservoirData();
RigCaseData* rigEclipseCase = rimReservoir->reservoirData();
registerCaseInGridCollection(rigEclipseCase);
caseGroup->addCase(rimReservoir);

View File

@ -22,8 +22,8 @@
#include "RimScriptCollection.h"
#include "RimIdenticalGridCaseGroup.h"
class RimReservoir;
class RigGridCollection;
class RimCase;
class RigGridManager;
//==================================================================================================
///
@ -34,7 +34,7 @@ class RimProject : public caf::PdmDocument
CAF_PDM_HEADER_INIT;
public:
caf::PdmPointersField<RimReservoir*> reservoirs;
caf::PdmPointersField<RimCase*> reservoirs;
caf::PdmPointersField<RimIdenticalGridCaseGroup*> caseGroups;
caf::PdmField<RimScriptCollection*> scriptCollection;
@ -48,13 +48,13 @@ public:
void close();
void insertCaseInCaseGroup(RimIdenticalGridCaseGroup* caseGroup, RimReservoir* rimReservoir);
void insertCaseInCaseGroup(RimIdenticalGridCaseGroup* caseGroup, RimCase* rimReservoir);
void moveEclipseCaseIntoCaseGroup(RimReservoir* rimReservoir);
void removeCaseFromAllGroups(RimReservoir* rimReservoir);
void moveEclipseCaseIntoCaseGroup(RimCase* rimReservoir);
void removeCaseFromAllGroups(RimCase* rimReservoir);
private:
RigMainGrid* registerCaseInGridCollection(RigEclipseCase* rigEclipseCase);
RigMainGrid* registerCaseInGridCollection(RigCaseData* rigEclipseCase);
protected:
// Overridden methods
@ -64,5 +64,5 @@ protected:
private:
caf::PdmField<QString> m_projectFileVersionString;
cvf::ref<RigGridCollection> m_gridCollection;
cvf::ref<RigGridManager> m_gridCollection;
};

View File

@ -36,12 +36,12 @@
#include "RimProject.h"
#include "RimReservoirCellResultsCacher.h"
CAF_PDM_SOURCE_INIT(RimReservoir, "RimReservoir");
CAF_PDM_SOURCE_INIT(RimCase, "RimReservoir");
//------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimReservoir::RimReservoir()
RimCase::RimCase()
{
CAF_PDM_InitField(&caseName, "CaseName", QString(), "Case name", "", "" ,"");
CAF_PDM_InitFieldNoDefault(&reservoirViews, "ReservoirViews", "", "", "", "");
@ -60,7 +60,7 @@ RimReservoir::RimReservoir()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimReservoir::~RimReservoir()
RimCase::~RimCase()
{
reservoirViews.deleteAllChildObjects();
@ -77,7 +77,7 @@ RimReservoir::~RimReservoir()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseCase* RimReservoir::reservoirData()
RigCaseData* RimCase::reservoirData()
{
return m_rigEclipseCase.p();
}
@ -85,7 +85,7 @@ RigEclipseCase* RimReservoir::reservoirData()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigEclipseCase* RimReservoir::reservoirData() const
const RigCaseData* RimCase::reservoirData() const
{
return m_rigEclipseCase.p();
}
@ -93,7 +93,7 @@ const RigEclipseCase* RimReservoir::reservoirData() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoir::initAfterRead()
void RimCase::initAfterRead()
{
size_t j;
for (j = 0; j < reservoirViews().size(); j++)
@ -108,7 +108,7 @@ void RimReservoir::initAfterRead()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimReservoirView* RimReservoir::createAndAddReservoirView()
RimReservoirView* RimCase::createAndAddReservoirView()
{
// If parent is collection, and number of views is zero, make sure rig is set to NULL to initiate normal case loading
if (parentCaseCollection() != NULL && reservoirViews().size() == 0)
@ -135,7 +135,7 @@ RimReservoirView* RimReservoir::createAndAddReservoirView()
//--------------------------------------------------------------------------------------------------
/// TODO: Move this functionality to PdmPointersField
//--------------------------------------------------------------------------------------------------
void RimReservoir::removeReservoirView(RimReservoirView* reservoirView)
void RimCase::removeReservoirView(RimReservoirView* reservoirView)
{
std::vector<size_t> indices;
@ -159,7 +159,7 @@ void RimReservoir::removeReservoirView(RimReservoirView* reservoirView)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoir::removeResult(const QString& resultName)
void RimCase::removeResult(const QString& resultName)
{
size_t i;
for (i = 0; i < reservoirViews().size(); i++)
@ -210,7 +210,7 @@ void RimReservoir::removeResult(const QString& resultName)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoir::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
void RimCase::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
if (changedField == &releaseResultMemory)
{
@ -236,13 +236,13 @@ void RimReservoir::fieldChangedByUi(const caf::PdmFieldHandle* changedField, con
reservoirView->createDisplayModelAndRedraw();
}
RigReservoirCellResults* matrixModelResults = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
RigCaseCellResultsData* matrixModelResults = reservoirData()->results(RifReaderInterface::MATRIX_RESULTS);
if (matrixModelResults)
{
matrixModelResults->clearAllResults();
}
RigReservoirCellResults* fractureModelResults = reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS);
RigCaseCellResultsData* fractureModelResults = reservoirData()->results(RifReaderInterface::FRACTURE_RESULTS);
if (fractureModelResults)
{
fractureModelResults->clearAllResults();
@ -256,9 +256,9 @@ void RimReservoir::fieldChangedByUi(const caf::PdmFieldHandle* changedField, con
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoir::computeCachedData()
void RimCase::computeCachedData()
{
RigEclipseCase* rigEclipseCase = reservoirData();
RigCaseData* rigEclipseCase = reservoirData();
if (rigEclipseCase)
{
rigEclipseCase->computeActiveCellBoundingBoxes();
@ -280,7 +280,7 @@ void RimReservoir::computeCachedData()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimCaseCollection* RimReservoir::parentCaseCollection()
RimCaseCollection* RimCase::parentCaseCollection()
{
std::vector<RimCaseCollection*> parentObjects;
this->parentObjectsOfType(parentObjects);
@ -296,7 +296,7 @@ RimCaseCollection* RimReservoir::parentCaseCollection()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoir::setReservoirData(RigEclipseCase* eclipseCase)
void RimCase::setReservoirData(RigCaseData* eclipseCase)
{
m_rigEclipseCase = eclipseCase;
if (this->reservoirData())
@ -318,7 +318,7 @@ void RimReservoir::setReservoirData(RigEclipseCase* eclipseCase)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimReservoirCellResultsStorage* RimReservoir::results(RifReaderInterface::PorosityModelResultType porosityModel)
RimReservoirCellResultsStorage* RimCase::results(RifReaderInterface::PorosityModelResultType porosityModel)
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{

View File

@ -27,7 +27,7 @@
class QString;
class RigEclipseCase;
class RigCaseData;
class RigGridBase;
class RimReservoirView;
class RimCaseCollection;
@ -38,12 +38,12 @@ class RimCaseCollection;
// Interface for reservoirs.
//
//==================================================================================================
class RimReservoir : public caf::PdmObject
class RimCase : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimReservoir();
virtual ~RimReservoir();
RimCase();
virtual ~RimCase();
// Fields:
caf::PdmField<QString> caseName;
@ -52,8 +52,8 @@ public:
virtual bool openEclipseGridFile() { return false;}; // Should be pure virtual but PDM does not allow that.
RigEclipseCase* reservoirData();
const RigEclipseCase* reservoirData() const;
RigCaseData* reservoirData();
const RigCaseData* reservoirData() const;
RimReservoirCellResultsStorage* results(RifReaderInterface::PorosityModelResultType porosityModel);
@ -76,11 +76,11 @@ protected:
// Internal methods
protected:
void computeCachedData();
void setReservoirData(RigEclipseCase* eclipseCase);
void setReservoirData(RigCaseData* eclipseCase);
private:
cvf::ref<RigEclipseCase> m_rigEclipseCase;
cvf::ref<RigCaseData> m_rigEclipseCase;
private:
caf::PdmField<RimReservoirCellResultsStorage*> m_matrixModelResults;

View File

@ -73,7 +73,7 @@ void RimReservoirCellResultsStorage::setupBeforeSave()
if (!m_cellResults) return;
const std::vector<RigReservoirCellResults::ResultInfo>& resInfo = m_cellResults->infoForEachResultIndex();
const std::vector<RigCaseCellResultsData::ResultInfo>& resInfo = m_cellResults->infoForEachResultIndex();
bool hasResultsToStore = false;
for (size_t rIdx = 0; rIdx < resInfo.size(); ++rIdx)
@ -574,7 +574,7 @@ size_t RimReservoirCellResultsStorage::findOrLoadScalarResult(const QString& res
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoirCellResultsStorage::setCellResults(RigReservoirCellResults* cellResults)
void RimReservoirCellResultsStorage::setCellResults(RigCaseCellResultsData* cellResults)
{
m_cellResults = cellResults;

View File

@ -25,7 +25,7 @@
#include "RimDefines.h"
class RimReservoirCellResultsStorageEntryInfo;
class RigReservoirCellResults;
class RigCaseCellResultsData;
class RifReaderInterface;
class RigMainGrid;
@ -36,9 +36,9 @@ public:
RimReservoirCellResultsStorage();
virtual ~RimReservoirCellResultsStorage();
void setCellResults(RigReservoirCellResults* cellResults);
RigReservoirCellResults* cellResults() { return m_cellResults; }
const RigReservoirCellResults* cellResults() const { return m_cellResults; }
void setCellResults(RigCaseCellResultsData* cellResults);
RigCaseCellResultsData* cellResults() { return m_cellResults; }
const RigCaseCellResultsData* cellResults() const { return m_cellResults; }
size_t storedResultsCount();
@ -70,7 +70,7 @@ private:
m_resultCacheMetaData;
cvf::ref<RifReaderInterface> m_readerInterface;
RigReservoirCellResults* m_cellResults;
RigCaseCellResultsData* m_cellResults;
RigMainGrid* m_ownerMainGrid;
};

View File

@ -847,7 +847,7 @@ bool RimReservoirView::pickInfo(size_t gridIndex, size_t cellIndex, const cvf::V
if (m_reservoir)
{
const RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
const RigCaseData* eclipseCase = m_reservoir->reservoirData();
if (eclipseCase)
{
size_t i = 0;
@ -880,12 +880,12 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
if (m_reservoir && m_reservoir->reservoirData())
{
RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
RigCaseData* eclipseCase = m_reservoir->reservoirData();
RigGridBase* grid = eclipseCase->grid(gridIndex);
if (this->cellResult()->hasResult())
{
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, m_currentTimeStep, this->cellResult()->gridScalarIndex());
if (dataAccessObject.notNull())
{
@ -906,7 +906,7 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
if (resultIndices[idx] == cvf::UNDEFINED_SIZE_T) continue;
// Cell edge results are static, results are loaded for first time step only
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
cvf::ref<cvf::StructGridScalarDataAccess> dataAccessObject = eclipseCase->dataAccessObject(grid, porosityModel, 0, resultIndices[idx]);
if (dataAccessObject.notNull())
{
@ -974,7 +974,7 @@ RimReservoirCellResultsStorage* RimReservoirView::currentGridCellResults()
{
if (m_reservoir)
{
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel());
return m_reservoir->results(porosityModel);
}
@ -991,7 +991,7 @@ RigActiveCellInfo* RimReservoirView::currentActiveCellInfo()
m_reservoir->reservoirData()
)
{
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult->porosityModel());
return m_reservoir->reservoirData()->activeCellInfo(porosityModel);
}
@ -1059,11 +1059,11 @@ void RimReservoirView::updateLegends()
return;
}
RigEclipseCase* eclipseCase = m_reservoir->reservoirData();
RigCaseData* eclipseCase = m_reservoir->reservoirData();
CVF_ASSERT(eclipseCase);
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
RigReservoirCellResults* results = eclipseCase->results(porosityModel);
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(cellResult()->porosityModel());
RigCaseCellResultsData* results = eclipseCase->results(porosityModel);
CVF_ASSERT(results);
if (this->cellResult()->hasResult())
@ -1112,7 +1112,7 @@ void RimReservoirView::updateLegends()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimReservoirView::setEclipseCase(RimReservoir* reservoir)
void RimReservoirView::setEclipseCase(RimCase* reservoir)
{
m_reservoir = reservoir;
}
@ -1120,7 +1120,7 @@ void RimReservoirView::setEclipseCase(RimReservoir* reservoir)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimReservoir* RimReservoirView::eclipseCase()
RimCase* RimReservoirView::eclipseCase()
{
return m_reservoir;
}
@ -1142,7 +1142,7 @@ void RimReservoirView::syncronizeWellsWithResults()
{
if (!(m_reservoir && m_reservoir->reservoirData()) ) return;
cvf::Collection<RigWellResults> wellResults = m_reservoir->reservoirData()->wellResults();
cvf::Collection<RigSingleWellResultsData> wellResults = m_reservoir->reservoirData()->wellResults();
// Find corresponding well from well result, or create a new
size_t wIdx;
@ -1164,7 +1164,7 @@ void RimReservoirView::syncronizeWellsWithResults()
for (wIdx = 0; wIdx < this->wellCollection()->wells().size(); ++wIdx)
{
RimWell* well = this->wellCollection()->wells()[wIdx];
RigWellResults* wellRes = well->wellResults();
RigSingleWellResultsData* wellRes = well->wellResults();
if (wellRes == NULL)
{
delete well;
@ -1208,7 +1208,7 @@ void RimReservoirView::calculateVisibleWellCellsIncFence(cvf::UByteArray* visibl
RimWell* well = this->wellCollection()->wells()[wIdx];
if (this->wellCollection()->wellCellVisibility() == RimWellCollection::FORCE_ALL_ON || well->showWellCells())
{
RigWellResults* wres = well->wellResults();
RigSingleWellResultsData* wres = well->wellResults();
if (!wres) continue;
const std::vector< RigWellResultFrame >& wellResFrames = wres->m_wellCellsTimeSteps;

View File

@ -120,8 +120,8 @@ public:
RimReservoirCellResultsStorage* currentGridCellResults();
RigActiveCellInfo* currentActiveCellInfo();
void setEclipseCase(RimReservoir* reservoir);
RimReservoir* eclipseCase();
void setEclipseCase(RimCase* reservoir);
RimCase* eclipseCase();
// Animation
int currentTimeStep() { return m_currentTimeStep;}
@ -179,7 +179,7 @@ private:
private:
caf::PdmField<int> m_currentTimeStep;
QPointer<RIViewer> m_viewer;
caf::PdmPointer<RimReservoir> m_reservoir;
caf::PdmPointer<RimCase> m_reservoir;
};

View File

@ -166,7 +166,7 @@ bool RimResultDefinition::hasResult() const
{
if (m_gridScalarResultIndex != cvf::UNDEFINED_SIZE_T) return true;
const RigReservoirCellResults* gridCellResults = m_reservoirView->currentGridCellResults()->cellResults();
const RigCaseCellResultsData* gridCellResults = m_reservoirView->currentGridCellResults()->cellResults();
if (gridCellResults)
{
m_gridScalarResultIndex = gridCellResults->findScalarResultIndex(resultType(), resultVariable());
@ -182,7 +182,7 @@ bool RimResultDefinition::hasResult() const
//--------------------------------------------------------------------------------------------------
bool RimResultDefinition::hasDynamicResult() const
{
const RigReservoirCellResults* gridCellResults = m_reservoirView->currentGridCellResults()->cellResults();
const RigCaseCellResultsData* gridCellResults = m_reservoirView->currentGridCellResults()->cellResults();
if (hasResult() && gridCellResults->timeStepCount(m_gridScalarResultIndex) > 1 )
return true;
else

View File

@ -26,7 +26,7 @@
class RimReservoirView;
class RigReservoirCellResults;
class RigCaseCellResultsData;
//==================================================================================================
///

View File

@ -28,12 +28,12 @@
#include "RimProject.h"
CAF_PDM_SOURCE_INIT(RimResultReservoir, "EclipseCase");
CAF_PDM_SOURCE_INIT(RimResultCase, "EclipseCase");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimResultReservoir::RimResultReservoir()
: RimReservoir()
RimResultCase::RimResultCase()
: RimCase()
{
CAF_PDM_InitObject("Eclipse Case", ":/AppLogo48x48.png", "", "");
@ -45,7 +45,7 @@ RimResultReservoir::RimResultReservoir()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimResultReservoir::openEclipseGridFile()
bool RimResultCase::openEclipseGridFile()
{
caf::ProgressInfo progInfo(50, "Reading Eclipse Grid File");
@ -69,7 +69,7 @@ bool RimResultReservoir::openEclipseGridFile()
return false;
}
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
readerInterface = new RifReaderEclipseOutput;
if (!readerInterface->open(fname, eclipseCase.p()))
{
@ -96,7 +96,7 @@ bool RimResultReservoir::openEclipseGridFile()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimResultReservoir::openAndReadActiveCellData(RigEclipseCase* mainEclipseCase)
bool RimResultCase::openAndReadActiveCellData(RigCaseData* mainEclipseCase)
{
cvf::ref<RifReaderInterface> readerInterface;
@ -112,7 +112,7 @@ bool RimResultReservoir::openAndReadActiveCellData(RigEclipseCase* mainEclipseCa
return false;
}
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid());
eclipseCase->setMainGrid(mainEclipseCase->mainGrid());
@ -155,10 +155,10 @@ bool RimResultReservoir::openAndReadActiveCellData(RigEclipseCase* mainEclipseCa
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelName)
cvf::ref<RifReaderInterface> RimResultCase::createMockModel(QString modelName)
{
cvf::ref<RifReaderMockModel> mockFileInterface = new RifReaderMockModel;
cvf::ref<RigEclipseCase> reservoir = new RigEclipseCase;
cvf::ref<RigCaseData> reservoir = new RigCaseData;
if (modelName == "Result Mock Debug Model Simple")
{
@ -233,7 +233,7 @@ cvf::ref<RifReaderInterface> RimResultReservoir::createMockModel(QString modelNa
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimResultReservoir::~RimResultReservoir()
RimResultCase::~RimResultCase()
{
reservoirViews.deleteAllChildObjects();
}
@ -241,7 +241,7 @@ RimResultReservoir::~RimResultReservoir()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimResultReservoir::locationOnDisc() const
QString RimResultCase::locationOnDisc() const
{
return caseDirectory;
}
@ -249,7 +249,7 @@ QString RimResultReservoir::locationOnDisc() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimResultReservoir::createAbsoluteFilenameFromCase(const QString& caseName)
QString RimResultCase::createAbsoluteFilenameFromCase(const QString& caseName)
{
QString candidate;

View File

@ -32,13 +32,13 @@ class RigMainGrid;
//
//
//==================================================================================================
class RimResultReservoir : public RimReservoir
class RimResultCase : public RimCase
{
CAF_PDM_HEADER_INIT;
public:
RimResultReservoir();
virtual ~RimResultReservoir();
RimResultCase();
virtual ~RimResultCase();
// Fields:
@ -46,7 +46,7 @@ public:
caf::PdmField<QString> caseDirectory;
virtual bool openEclipseGridFile();
bool openAndReadActiveCellData(RigEclipseCase* mainEclipseCase);
bool openAndReadActiveCellData(RigCaseData* mainEclipseCase);
//virtual caf::PdmFieldHandle* userDescriptionField() { return &caseName;}

View File

@ -34,7 +34,7 @@ CAF_PDM_SOURCE_INIT(RimStatisticsCase, "RimStatisticalCalculation");
///
//--------------------------------------------------------------------------------------------------
RimStatisticsCase::RimStatisticsCase()
: RimReservoir()
: RimCase()
{
CAF_PDM_InitObject("Case Group Statistics", ":/Histogram16x16.png", "", "");
CAF_PDM_InitField(&m_resultName, "ResultName", QString("PRESSURE"), "ResultName", "", "", "");
@ -68,7 +68,7 @@ bool RimStatisticsCase::openEclipseGridFile()
{
if (this->reservoirData()) return true;
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
CVF_ASSERT(parentStatisticsCaseCollection());
@ -125,7 +125,7 @@ void RimStatisticsCase::computeStatistics()
CVF_ASSERT(gridCaseGroup);
gridCaseGroup->computeUnionOfActiveCells();
std::vector<RimReservoir*> sourceCases;
std::vector<RimCase*> sourceCases;
getSourceCases(sourceCases);
@ -146,7 +146,7 @@ void RimStatisticsCase::computeStatistics()
timeStepIndices.push_back(i);
}
RigEclipseCase* resultCase = reservoirData();
RigCaseData* resultCase = reservoirData();
QList<QPair<RimDefines::ResultCatType, QString> > resultSpecification;
@ -187,7 +187,7 @@ void RimStatisticsCase::computeStatistics()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStatisticsCase::getSourceCases(std::vector<RimReservoir*>& sourceCases)
void RimStatisticsCase::getSourceCases(std::vector<RimCase*>& sourceCases)
{
RimIdenticalGridCaseGroup* gridCaseGroup = caseGroup();
if (gridCaseGroup)
@ -199,7 +199,7 @@ void RimStatisticsCase::getSourceCases(std::vector<RimReservoir*>& sourceCases)
CVF_ASSERT(gridCaseGroup->caseCollection->reservoirs[i]);
CVF_ASSERT(gridCaseGroup->caseCollection->reservoirs[i]->reservoirData());
RimReservoir* sourceCase = gridCaseGroup->caseCollection->reservoirs[i];
RimCase* sourceCase = gridCaseGroup->caseCollection->reservoirs[i];
sourceCases.push_back(sourceCase);
}
}

View File

@ -36,7 +36,7 @@ class RigMainGrid;
//
//
//==================================================================================================
class RimStatisticsCase : public RimReservoir
class RimStatisticsCase : public RimCase
{
CAF_PDM_HEADER_INIT;
@ -58,6 +58,6 @@ public:
private:
RimIdenticalGridCaseGroup* caseGroup();
void getSourceCases(std::vector<RimReservoir*>& sourceCases);
void getSourceCases(std::vector<RimCase*>& sourceCases);
};

View File

@ -107,7 +107,7 @@ private:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStatisticsCaseEvaluator::addNamedResult(RigReservoirCellResults* destinationCellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeUnionCellCount)
void RimStatisticsCaseEvaluator::addNamedResult(RigCaseCellResultsData* destinationCellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeUnionCellCount)
{
// Use time step dates from first result in first source case
CVF_ASSERT(m_sourceCases.size() > 0);
@ -148,7 +148,7 @@ void RimStatisticsCaseEvaluator::buildSourceMetaData(RimDefines::ResultCatType r
for (size_t caseIdx = 1; caseIdx < m_sourceCases.size(); caseIdx++)
{
RigEclipseCase* eclipseCase = m_sourceCases.at(caseIdx)->reservoirData();
RigCaseData* eclipseCase = m_sourceCases.at(caseIdx)->reservoirData();
RimReservoirCellResultsStorage* matrixResults = m_sourceCases[caseIdx]->results(RifReaderInterface::MATRIX_RESULTS);
size_t scalarResultIndex = matrixResults->findOrLoadScalarResult(resultType, resultName);
@ -171,7 +171,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<QPair<RimDefines
CVF_ASSERT(m_destinationCase);
size_t activeMatrixCellCount = m_destinationCase->activeCellInfo(RifReaderInterface::MATRIX_RESULTS)->globalActiveCellCount();
RigReservoirCellResults* matrixResults = m_destinationCase->results(RifReaderInterface::MATRIX_RESULTS);
RigCaseCellResultsData* matrixResults = m_destinationCase->results(RifReaderInterface::MATRIX_RESULTS);
for (int i = 0; i < resultSpecification.size(); i++)
{
@ -249,7 +249,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<QPair<RimDefines
cvf::Collection<cvf::StructGridScalarDataAccess> dataAccesObjectList;
for (size_t caseIdx = 0; caseIdx < m_sourceCases.size(); caseIdx++)
{
RimReservoir* eclipseCase = m_sourceCases.at(caseIdx);
RimCase* eclipseCase = m_sourceCases.at(caseIdx);
size_t scalarResultIndex = eclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->findOrLoadScalarResultForTimeStep(resultType, resultName, dataAccessTimeStepIndex);
@ -371,7 +371,7 @@ void RimStatisticsCaseEvaluator::evaluateForResults(const QList<QPair<RimDefines
for (size_t caseIdx = 0; caseIdx < m_sourceCases.size(); caseIdx++)
{
RimReservoir* eclipseCase = m_sourceCases.at(caseIdx);
RimCase* eclipseCase = m_sourceCases.at(caseIdx);
// When one time step is completed, close all result files.
// Microsoft note: On Windows, the maximum number of files open at the same time is 512
@ -408,7 +408,7 @@ void RimStatisticsCaseEvaluator::debugOutput(RimDefines::ResultCatType resultTyp
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimStatisticsCaseEvaluator::RimStatisticsCaseEvaluator(const std::vector<RimReservoir*>& sourceCases, const std::vector<size_t>& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigEclipseCase* destinationCase)
RimStatisticsCaseEvaluator::RimStatisticsCaseEvaluator(const std::vector<RimCase*>& sourceCases, const std::vector<size_t>& timeStepIndices, const RimStatisticsConfig& statisticsConfig, RigCaseData* destinationCase)
: m_sourceCases(sourceCases),
m_statisticsConfig(statisticsConfig),
m_destinationCase(destinationCase),

View File

@ -27,9 +27,9 @@
#include <QPair>
#include "RimDefines.h"
class RimReservoir;
class RigEclipseCase;
class RigReservoirCellResults;
class RimCase;
class RigCaseData;
class RigCaseCellResultsData;
class RimStatisticsConfig
@ -54,10 +54,10 @@ public:
class RimStatisticsCaseEvaluator
{
public:
RimStatisticsCaseEvaluator(const std::vector<RimReservoir*>& sourceCases,
RimStatisticsCaseEvaluator(const std::vector<RimCase*>& sourceCases,
const std::vector<size_t>& timeStepIndices,
const RimStatisticsConfig& statisticsConfig,
RigEclipseCase* destinationCase);
RigCaseData* destinationCase);
void evaluateForResults(const QList<QPair<RimDefines::ResultCatType, QString> >& resultSpecification);
@ -65,15 +65,15 @@ public:
void debugOutput(RimDefines::ResultCatType resultType, const QString& resultName, size_t timeStepIdx);
private:
void addNamedResult(RigReservoirCellResults* cellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
void addNamedResult(RigCaseCellResultsData* cellResults, RimDefines::ResultCatType resultType, const QString& resultName, size_t activeCellCount);
void buildSourceMetaData(RimDefines::ResultCatType resultType, const QString& resultName);
private:
std::vector<RimReservoir*> m_sourceCases;
std::vector<RimCase*> m_sourceCases;
std::vector<size_t> m_timeStepIndices;
size_t m_globalCellCount;
RimStatisticsConfig m_statisticsConfig;
RigEclipseCase* m_destinationCase;
RigCaseData* m_destinationCase;
};

View File

@ -213,7 +213,7 @@ bool RimUiTreeModelPdm::deleteReservoirView(const QModelIndex& itemIndex)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimUiTreeModelPdm::deleteReservoir(RimReservoir* reservoir)
void RimUiTreeModelPdm::deleteReservoir(RimCase* reservoir)
{
RimCaseCollection* caseCollection = reservoir->parentCaseCollection();
QModelIndex caseCollectionModelIndex = getModelIndexFromPdmObject(caseCollection);
@ -355,7 +355,7 @@ RimReservoirView* RimUiTreeModelPdm::addReservoirView(const QModelIndex& itemInd
collectionItem = currentItem->parent();
collectionIndex = itemIndex.parent();
}
else if (dynamic_cast<RimReservoir*>(currentItem->dataObject().p()))
else if (dynamic_cast<RimCase*>(currentItem->dataObject().p()))
{
collectionItem = currentItem;
collectionIndex = itemIndex;
@ -363,7 +363,7 @@ RimReservoirView* RimUiTreeModelPdm::addReservoirView(const QModelIndex& itemInd
if (collectionItem)
{
RimReservoir* rimReservoir = dynamic_cast<RimReservoir*>(collectionItem->dataObject().p());
RimCase* rimReservoir = dynamic_cast<RimCase*>(collectionItem->dataObject().p());
RimReservoirView* insertedView = rimReservoir->createAndAddReservoirView();
int viewCount = rowCount(collectionIndex);
@ -430,11 +430,11 @@ void RimUiTreeModelPdm::addInputProperty(const QModelIndex& itemIndex, const QSt
RimInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimInputPropertyCollection*>(currentItem->dataObject().p());
CVF_ASSERT(inputPropertyCollection);
std::vector<RimInputReservoir*> parentObjects;
std::vector<RimInputCase*> parentObjects;
inputPropertyCollection->parentObjectsOfType(parentObjects);
CVF_ASSERT(parentObjects.size() == 1);
RimInputReservoir* inputReservoir = parentObjects[0];
RimInputCase* inputReservoir = parentObjects[0];
CVF_ASSERT(inputReservoir);
if (inputReservoir)
{
@ -468,11 +468,11 @@ void RimUiTreeModelPdm::deleteInputProperty(const QModelIndex& itemIndex)
RimInputPropertyCollection* inputPropertyCollection = parentObjects[0];
if (!inputPropertyCollection) return;
std::vector<RimInputReservoir*> parentObjects2;
std::vector<RimInputCase*> parentObjects2;
inputPropertyCollection->parentObjectsOfType(parentObjects2);
CVF_ASSERT(parentObjects2.size() == 1);
RimInputReservoir* inputReservoir = parentObjects2[0];
RimInputCase* inputReservoir = parentObjects2[0];
if (!inputReservoir) return;
inputReservoir->removeProperty(inputProperty);
@ -541,7 +541,7 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(itemIndex);
if (dynamic_cast<RimIdenticalGridCaseGroup*>(currentItem->dataObject().p()) ||
dynamic_cast<RimReservoir*>(currentItem->dataObject().p()))
dynamic_cast<RimCase*>(currentItem->dataObject().p()))
{
QModelIndex rootIndex = itemIndex.parent();
caf::PdmUiTreeItem* rootTreeItem = currentItem->parent();
@ -590,9 +590,9 @@ void RimUiTreeModelPdm::addObjects(const QModelIndex& itemIndex, caf::PdmObjectG
gridCaseGroup = caseCollection->parentCaseGroup();
}
else if (dynamic_cast<RimReservoir*>(currentItem->dataObject().p()))
else if (dynamic_cast<RimCase*>(currentItem->dataObject().p()))
{
RimReservoir* rimReservoir = dynamic_cast<RimReservoir*>(currentItem->dataObject().p());
RimCase* rimReservoir = dynamic_cast<RimCase*>(currentItem->dataObject().p());
CVF_ASSERT(rimReservoir);
caseCollection = rimReservoir->parentCaseCollection();
@ -608,19 +608,19 @@ void RimUiTreeModelPdm::addObjects(const QModelIndex& itemIndex, caf::PdmObjectG
if (gridCaseGroup)
{
std::vector<caf::PdmPointer<RimResultReservoir> > typedObjects;
std::vector<caf::PdmPointer<RimResultCase> > typedObjects;
pdmObjects.createCopyByType(&typedObjects);
RigEclipseCase* mainEclipseCase = NULL;
RigCaseData* mainEclipseCase = NULL;
if (gridCaseGroup->caseCollection()->reservoirs().size() > 0)
{
RimReservoir* mainReservoir = gridCaseGroup->caseCollection()->reservoirs()[0];;
RimCase* mainReservoir = gridCaseGroup->caseCollection()->reservoirs()[0];;
mainEclipseCase = mainReservoir->reservoirData();
}
for (size_t i = 0; i < typedObjects.size(); i++)
{
RimResultReservoir* rimResultReservoir = typedObjects[i];
RimResultCase* rimResultReservoir = typedObjects[i];
if (gridCaseGroup->contains(rimResultReservoir))
{
@ -748,7 +748,7 @@ Qt::ItemFlags RimUiTreeModelPdm::flags(const QModelIndex &index) const
{
return Qt::ItemIsDropEnabled | defaultFlags;
}
else if (dynamic_cast<RimReservoir*>(currentItem->dataObject().p()))
else if (dynamic_cast<RimCase*>(currentItem->dataObject().p()))
{
// TODO: Remember to handle reservoir holding the main grid
return Qt::ItemIsDragEnabled | defaultFlags;
@ -781,12 +781,12 @@ bool RimUiTreeModelPdm::dropMimeData(const QMimeData *data, Qt::DropAction actio
if (action == Qt::MoveAction)
{
std::vector<caf::PdmPointer<RimResultReservoir> > typedObjects;
std::vector<caf::PdmPointer<RimResultCase> > typedObjects;
pog.objectsByType(&typedObjects);
for (size_t i = 0; i < typedObjects.size(); i++)
{
RimReservoir* rimReservoir = typedObjects[i];
RimCase* rimReservoir = typedObjects[i];
deleteReservoir(rimReservoir);
}
}

View File

@ -29,7 +29,7 @@ class QFileSystemWatcher;
class RimCellPropertyFilter;
class RimCellRangeFilter;
class RimReservoir;
class RimCase;
class RimReservoirView;
class RimInputProperty;
class RimStatisticsCase;
@ -105,7 +105,7 @@ public:
bool deletePropertyFilter(const QModelIndex& itemIndex);
bool deleteReservoirView(const QModelIndex& itemIndex);
void deleteInputProperty(const QModelIndex& itemIndex);
void deleteReservoir(RimReservoir* reservoir);
void deleteReservoir(RimCase* reservoir);
RimCellPropertyFilter* addPropertyFilter(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);
RimCellRangeFilter* addRangeFilter(const QModelIndex& itemIndex, QModelIndex& insertedModelIndex);

View File

@ -174,7 +174,7 @@ void RimUiTreeView::contextMenuEvent(QContextMenuEvent* event)
menu.addAction(QString("Close"), this, SLOT(slotCloseCase()));
menu.exec(event->globalPos());
}
else if (dynamic_cast<RimReservoir*>(uiItem->dataObject().p()))
else if (dynamic_cast<RimCase*>(uiItem->dataObject().p()))
{
QMenu menu;
menu.addAction(QString("Copy"), this, SLOT(slotCopyPdmObjectToClipboard()));
@ -686,7 +686,7 @@ void RimUiTreeView::slotWriteInputProperty()
exportSettings.eclipseKeyword = inputProperty->eclipseKeyword;
// Find input reservoir for this property
RimInputReservoir* inputReservoir = NULL;
RimInputCase* inputReservoir = NULL;
{
std::vector<RimInputPropertyCollection*> parentObjects;
inputProperty->parentObjectsOfType(parentObjects);
@ -695,7 +695,7 @@ void RimUiTreeView::slotWriteInputProperty()
RimInputPropertyCollection* inputPropertyCollection = parentObjects[0];
if (!inputPropertyCollection) return;
std::vector<RimInputReservoir*> parentObjects2;
std::vector<RimInputCase*> parentObjects2;
inputPropertyCollection->parentObjectsOfType(parentObjects2);
CVF_ASSERT(parentObjects2.size() == 1);
@ -781,7 +781,7 @@ void RimUiTreeView::slotWriteBinaryResultAsInputProperty()
if (preferencesDialog.exec() == QDialog::Accepted)
{
size_t timeStep = resultSlot->reservoirView()->currentTimeStep();
RifReaderInterface::PorosityModelResultType porosityModel = RigReservoirCellResults::convertFromProjectModelPorosityModel(resultSlot->porosityModel());
RifReaderInterface::PorosityModelResultType porosityModel = RigCaseCellResultsData::convertFromProjectModelPorosityModel(resultSlot->porosityModel());
bool isOk = RifEclipseInputFileTools::writeBinaryResultToTextFile(exportSettings.fileName, resultSlot->reservoirView()->eclipseCase()->reservoirData(), porosityModel, timeStep, resultSlot->resultVariable, exportSettings.eclipseKeyword, exportSettings.undefinedValue);
if (!isOk)
@ -811,12 +811,12 @@ void RimUiTreeView::slotCloseCase()
group.addObject(uiItem->dataObject().p());
}
std::vector<caf::PdmPointer<RimReservoir> > typedObjects;
std::vector<caf::PdmPointer<RimCase> > typedObjects;
group.objectsByType(&typedObjects);
for (size_t i = 0; i < typedObjects.size(); i++)
{
RimReservoir* rimReservoir = typedObjects[i];
RimCase* rimReservoir = typedObjects[i];
myModel->deleteReservoir(rimReservoir);
}
}
@ -955,7 +955,7 @@ void RimUiTreeView::keyPressEvent(QKeyEvent* keyEvent)
RimUiTreeModelPdm* myModel = dynamic_cast<RimUiTreeModelPdm*>(model());
caf::PdmUiTreeItem* uiItem = myModel->getTreeItemFromIndex(currentIndex());
if (dynamic_cast<RimReservoir*>(uiItem->dataObject().p()))
if (dynamic_cast<RimCase*>(uiItem->dataObject().p()))
{
if (keyEvent->matches(QKeySequence::Copy))
{
@ -968,7 +968,7 @@ void RimUiTreeView::keyPressEvent(QKeyEvent* keyEvent)
if (dynamic_cast<RimIdenticalGridCaseGroup*>(uiItem->dataObject().p())
|| dynamic_cast<RimCaseCollection*>(uiItem->dataObject().p())
|| dynamic_cast<RimReservoir*>(uiItem->dataObject().p()))
|| dynamic_cast<RimCase*>(uiItem->dataObject().p()))
{
if (keyEvent->matches(QKeySequence::Paste))
{

View File

@ -41,8 +41,8 @@ public:
void setReservoirView(RimReservoirView* ownerReservoirView);
void setWellResults(RigWellResults* wellResults) { m_wellResults = wellResults;}
RigWellResults* wellResults() { return m_wellResults.p();}
void setWellResults(RigSingleWellResultsData* wellResults) { m_wellResults = wellResults;}
RigSingleWellResultsData* wellResults() { return m_wellResults.p();}
virtual caf::PdmFieldHandle* userDescriptionField();
@ -61,7 +61,7 @@ public:
caf::PdmField<double> pipeRadiusScaleFactor;
private:
cvf::ref<RigWellResults> m_wellResults;
cvf::ref<RigSingleWellResultsData> m_wellResults;
RimReservoirView* m_reservoirView;
};

View File

@ -28,17 +28,17 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(RigGridCollection, BasicTest)
TEST(RigGridManager, BasicTest)
{
cvf::ref<RigMainGrid> mainGridA = new RigMainGrid;
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
eclipseCase->setMainGrid(mainGridA.p());
int count = mainGridA->refCount();
EXPECT_EQ(mainGridA->refCount(), 2);
RigGridCollection gridCollection;
RigGridManager gridCollection;
gridCollection.addCase(eclipseCase.p());
EXPECT_EQ(mainGridA->refCount(), 2);
@ -52,18 +52,18 @@ TEST(RigGridCollection, BasicTest)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(RigGridCollection, EqualTests)
TEST(RigGridManager, EqualTests)
{
cvf::ref<RigMainGrid> mainGridA = new RigMainGrid;
mainGridA->nodes().push_back(cvf::Vec3d(0, 0, 0));
mainGridA->nodes().push_back(cvf::Vec3d(0, 0, 1));
mainGridA->nodes().push_back(cvf::Vec3d(0, 0, 2));
cvf::ref<RigEclipseCase> eclipseCase = new RigEclipseCase;
cvf::ref<RigCaseData> eclipseCase = new RigCaseData;
eclipseCase->setMainGrid(mainGridA.p());
RigGridCollection gridCollection;
RigGridManager gridCollection;
gridCollection.addCase(eclipseCase.p());

View File

@ -24,12 +24,12 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseCase::RigEclipseCase()
RigCaseData::RigCaseData()
{
m_mainGrid = new RigMainGrid();
m_matrixModelResults = new RigReservoirCellResults(m_mainGrid.p());
m_fractureModelResults = new RigReservoirCellResults(m_mainGrid.p());
m_matrixModelResults = new RigCaseCellResultsData(m_mainGrid.p());
m_fractureModelResults = new RigCaseCellResultsData(m_mainGrid.p());
m_activeCellInfo = new RigActiveCellInfo;
m_fractureActiveCellInfo = new RigActiveCellInfo;
@ -38,7 +38,7 @@ RigEclipseCase::RigEclipseCase()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigEclipseCase::~RigEclipseCase()
RigCaseData::~RigCaseData()
{
}
@ -46,7 +46,7 @@ RigEclipseCase::~RigEclipseCase()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::setMainGrid(RigMainGrid* mainGrid)
void RigCaseData::setMainGrid(RigMainGrid* mainGrid)
{
m_mainGrid = mainGrid;
@ -57,7 +57,7 @@ void RigEclipseCase::setMainGrid(RigMainGrid* mainGrid)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::allGrids(std::vector<RigGridBase*>* grids)
void RigCaseData::allGrids(std::vector<RigGridBase*>* grids)
{
CVF_ASSERT(grids);
@ -76,7 +76,7 @@ void RigEclipseCase::allGrids(std::vector<RigGridBase*>* grids)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::allGrids(std::vector<const RigGridBase*>* grids) const
void RigCaseData::allGrids(std::vector<const RigGridBase*>* grids) const
{
CVF_ASSERT(grids);
@ -95,7 +95,7 @@ void RigEclipseCase::allGrids(std::vector<const RigGridBase*>* grids) const
//--------------------------------------------------------------------------------------------------
/// Get grid by index. The main grid has index 0, so the first lgr has index 1
//--------------------------------------------------------------------------------------------------
const RigGridBase* RigEclipseCase::grid(size_t index) const
const RigGridBase* RigCaseData::grid(size_t index) const
{
CVF_ASSERT(m_mainGrid.notNull());
return m_mainGrid->gridByIndex(index);
@ -105,7 +105,7 @@ const RigGridBase* RigEclipseCase::grid(size_t index) const
//--------------------------------------------------------------------------------------------------
/// Get grid by index. The main grid has index 0, so the first lgr has index 1
//--------------------------------------------------------------------------------------------------
RigGridBase* RigEclipseCase::grid(size_t index)
RigGridBase* RigCaseData::grid(size_t index)
{
CVF_ASSERT(m_mainGrid.notNull());
return m_mainGrid->gridByIndex(index);
@ -114,7 +114,7 @@ RigGridBase* RigEclipseCase::grid(size_t index)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigEclipseCase::gridCount() const
size_t RigCaseData::gridCount() const
{
CVF_ASSERT(m_mainGrid.notNull());
return m_mainGrid->gridCount();
@ -124,7 +124,7 @@ size_t RigEclipseCase::gridCount() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::computeWellCellsPrGrid()
void RigCaseData::computeWellCellsPrGrid()
{
// If we have computed this already, return
if (m_wellCellsInGrid.size()) return;
@ -185,7 +185,7 @@ void RigEclipseCase::computeWellCellsPrGrid()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::setWellResults(const cvf::Collection<RigWellResults>& data)
void RigCaseData::setWellResults(const cvf::Collection<RigSingleWellResultsData>& data)
{
m_wellResults = data;
m_wellCellsInGrid.clear();
@ -195,7 +195,7 @@ void RigEclipseCase::setWellResults(const cvf::Collection<RigWellResults>& data)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::UByteArray* RigEclipseCase::wellCellsInGrid(size_t gridIndex)
cvf::UByteArray* RigCaseData::wellCellsInGrid(size_t gridIndex)
{
computeWellCellsPrGrid();
CVF_ASSERT(gridIndex < m_wellCellsInGrid.size());
@ -206,7 +206,7 @@ cvf::UByteArray* RigEclipseCase::wellCellsInGrid(size_t gridIndex)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigCell& RigEclipseCase::cellFromWellResultCell(const RigWellResultCell& wellResultCell)
RigCell& RigCaseData::cellFromWellResultCell(const RigWellResultCell& wellResultCell)
{
size_t gridIndex = wellResultCell.m_gridIndex;
size_t gridCellIndex = wellResultCell.m_gridCellIndex;
@ -220,7 +220,7 @@ RigCell& RigEclipseCase::cellFromWellResultCell(const RigWellResultCell& wellRes
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigEclipseCase::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const
bool RigCaseData::findSharedSourceFace(cvf::StructGridInterface::FaceType& sharedSourceFace,const RigWellResultCell& sourceWellCellResult, const RigWellResultCell& otherWellCellResult) const
{
size_t gridIndex = sourceWellCellResult.m_gridIndex;
size_t gridCellIndex = sourceWellCellResult.m_gridCellIndex;
@ -291,7 +291,7 @@ public:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::computeActiveCellIJKBBox()
void RigCaseData::computeActiveCellIJKBBox()
{
if (m_mainGrid.notNull() && m_activeCellInfo.notNull() && m_fractureActiveCellInfo.notNull())
{
@ -322,7 +322,7 @@ void RigEclipseCase::computeActiveCellIJKBBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::computeActiveCellBoundingBoxes()
void RigCaseData::computeActiveCellBoundingBoxes()
{
computeActiveCellIJKBBox();
computeActiveCellsGeometryBoundingBox();
@ -331,7 +331,7 @@ void RigEclipseCase::computeActiveCellBoundingBoxes()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RigEclipseCase::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel)
RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel)
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
@ -344,7 +344,7 @@ RigActiveCellInfo* RigEclipseCase::activeCellInfo(RifReaderInterface::PorosityMo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigActiveCellInfo* RigEclipseCase::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const
const RigActiveCellInfo* RigCaseData::activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
@ -357,7 +357,7 @@ const RigActiveCellInfo* RigEclipseCase::activeCellInfo(RifReaderInterface::Poro
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo)
void RigCaseData::setActiveCellInfo(RifReaderInterface::PorosityModelResultType porosityModel, RigActiveCellInfo* activeCellInfo)
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
@ -373,7 +373,7 @@ void RigEclipseCase::setActiveCellInfo(RifReaderInterface::PorosityModelResultTy
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
void RigCaseData::computeActiveCellsGeometryBoundingBox()
{
if (m_activeCellInfo.notNull() || m_fractureActiveCellInfo.notNull())
{
@ -427,7 +427,7 @@ void RigEclipseCase::computeActiveCellsGeometryBoundingBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::PorosityModelResultType porosityModel)
RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel)
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
@ -440,7 +440,7 @@ RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::PorosityMod
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::PorosityModelResultType porosityModel) const
const RigCaseCellResultsData* RigCaseData::results(RifReaderInterface::PorosityModelResultType porosityModel) const
{
if (porosityModel == RifReaderInterface::MATRIX_RESULTS)
{
@ -453,7 +453,7 @@ const RigReservoirCellResults* RigEclipseCase::results(RifReaderInterface::Poros
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::StructGridScalarDataAccess> RigEclipseCase::dataAccessObject(const RigGridBase* grid,
cvf::ref<cvf::StructGridScalarDataAccess> RigCaseData::dataAccessObject(const RigGridBase* grid,
RifReaderInterface::PorosityModelResultType porosityModel,
size_t timeStepIndex,
size_t scalarSetIndex)

View File

@ -27,14 +27,14 @@
#include "RigWellResults.h"
#include "RigActiveCellInfo.h"
class RigReservoirCellResults;
class RigCaseCellResultsData;
class RigEclipseCase: public cvf::Object
class RigCaseData: public cvf::Object
{
public:
RigEclipseCase();
~RigEclipseCase();
RigCaseData();
~RigCaseData();
RigMainGrid* mainGrid() { return m_mainGrid.p(); }
const RigMainGrid* mainGrid() const { return m_mainGrid.p(); }
@ -46,8 +46,8 @@ public:
RigGridBase* grid(size_t index);
size_t gridCount() const;
RigReservoirCellResults* results(RifReaderInterface::PorosityModelResultType porosityModel);
const RigReservoirCellResults* results(RifReaderInterface::PorosityModelResultType porosityModel) const;
RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel);
const RigCaseCellResultsData* results(RifReaderInterface::PorosityModelResultType porosityModel) const;
RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel);
const RigActiveCellInfo* activeCellInfo(RifReaderInterface::PorosityModelResultType porosityModel) const;
@ -59,8 +59,8 @@ public:
size_t timeStepIndex,
size_t scalarSetIndex);
void setWellResults(const cvf::Collection<RigWellResults>& data);
const cvf::Collection<RigWellResults>& wellResults() { return m_wellResults; }
void setWellResults(const cvf::Collection<RigSingleWellResultsData>& data);
const cvf::Collection<RigSingleWellResultsData>& wellResults() { return m_wellResults; }
cvf::UByteArray* wellCellsInGrid(size_t gridIndex);
@ -80,9 +80,9 @@ private:
cvf::ref<RigActiveCellInfo> m_activeCellInfo;
cvf::ref<RigActiveCellInfo> m_fractureActiveCellInfo;
cvf::ref<RigReservoirCellResults> m_matrixModelResults;
cvf::ref<RigReservoirCellResults> m_fractureModelResults;
cvf::ref<RigCaseCellResultsData> m_matrixModelResults;
cvf::ref<RigCaseCellResultsData> m_fractureModelResults;
cvf::Collection<RigWellResults> m_wellResults; //< A WellResults object for each well in the reservoir
cvf::Collection<RigSingleWellResultsData> m_wellResults; //< A WellResults object for each well in the reservoir
cvf::Collection<cvf::UByteArray> m_wellCellsInGrid; //< A bool array pr grid with one bool pr cell telling wether the cell is a well cell or not
};

View File

@ -24,7 +24,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigGridCollection::addCase(RigEclipseCase* eclipseCase)
void RigGridManager::addCase(RigCaseData* eclipseCase)
{
cvf::ref<CaseToGridMap> caseAndGrid = new CaseToGridMap(eclipseCase, eclipseCase->mainGrid());
m_caseToGrid.push_back(caseAndGrid.p());
@ -33,7 +33,7 @@ void RigGridCollection::addCase(RigEclipseCase* eclipseCase)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigGridCollection::removeCase(RigEclipseCase* eclipseCase)
void RigGridManager::removeCase(RigCaseData* eclipseCase)
{
size_t indexToErase = cvf::UNDEFINED_SIZE_T;
@ -50,12 +50,12 @@ void RigGridCollection::removeCase(RigEclipseCase* eclipseCase)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigMainGrid* RigGridCollection::findEqualGrid(RigMainGrid* candidateGrid)
RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid)
{
for (size_t i = 0; i < m_caseToGrid.size(); i++)
{
RigMainGrid* mainGrid = m_caseToGrid.at(i)->m_mainGrid;
if (RigGridCollection::isEqual(mainGrid, candidateGrid))
if (RigGridManager::isEqual(mainGrid, candidateGrid))
{
return mainGrid;
}
@ -67,7 +67,7 @@ RigMainGrid* RigGridCollection::findEqualGrid(RigMainGrid* candidateGrid)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigGridCollection::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
{
if (gridA == NULL || gridB == NULL) return false;
@ -91,7 +91,7 @@ bool RigGridCollection::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigGridCollection::clear()
void RigGridManager::clear()
{
m_caseToGrid.clear();
}
@ -99,7 +99,7 @@ void RigGridCollection::clear()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigGridCollection::CaseToGridMap::CaseToGridMap(RigEclipseCase* eclipseCase, RigMainGrid* mainGrid) :
RigGridManager::CaseToGridMap::CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid) :
m_eclipseCase(eclipseCase),
m_mainGrid(mainGrid)
{

View File

@ -25,14 +25,14 @@
#include <vector>
class RigMainGrid;
class RigEclipseCase;
class RigCaseData;
class RigGridCollection : public cvf::Object
class RigGridManager : public cvf::Object
{
public:
void addCase(RigEclipseCase* eclipseCase);
void addCase(RigCaseData* eclipseCase);
void removeCase(RigEclipseCase* eclipseCase);
void removeCase(RigCaseData* eclipseCase);
RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid);
@ -45,9 +45,9 @@ private:
class CaseToGridMap : public cvf::Object
{
public:
CaseToGridMap(RigEclipseCase* eclipseCase, RigMainGrid* mainGrid);
CaseToGridMap(RigCaseData* eclipseCase, RigMainGrid* mainGrid);
RigEclipseCase* m_eclipseCase;
RigCaseData* m_eclipseCase;
RigMainGrid* m_mainGrid;
};

View File

@ -133,7 +133,7 @@ private:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::createPerGridDataAccessObject(RigEclipseCase* eclipseCase,
cvf::ref<cvf::StructGridScalarDataAccess> RigGridScalarDataAccessFactory::createPerGridDataAccessObject(RigCaseData* eclipseCase,
size_t gridIndex,
RifReaderInterface::PorosityModelResultType porosityModel,
size_t timeStepIndex,

View File

@ -30,7 +30,7 @@ class RigGridScalarDataAccessFactory
{
public:
static cvf::ref<cvf::StructGridScalarDataAccess>
createPerGridDataAccessObject(RigEclipseCase* eclipseCase,
createPerGridDataAccessObject(RigCaseData* eclipseCase,
size_t gridIndex,
RifReaderInterface::PorosityModelResultType porosityModel,
size_t timeStepIndex,

View File

@ -172,7 +172,7 @@ void RigReservoirBuilderMock::appendCells(size_t nodeStartIndex, size_t cellCoun
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirBuilderMock::populateReservoir(RigEclipseCase* eclipseCase)
void RigReservoirBuilderMock::populateReservoir(RigCaseData* eclipseCase)
{
std::vector<cvf::Vec3d>& mainGridNodes = eclipseCase->mainGrid()->nodes();
appendNodes(m_minWorldCoordinate, m_maxWorldCoordinate, cellDimension(), mainGridNodes);
@ -278,7 +278,7 @@ void RigReservoirBuilderMock::setWorldCoordinates(cvf::Vec3d minWorldCoordinate,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigReservoirBuilderMock::inputProperty(RigEclipseCase* eclipseCase, const QString& propertyName, std::vector<double>* values)
bool RigReservoirBuilderMock::inputProperty(RigCaseData* eclipseCase, const QString& propertyName, std::vector<double>* values)
{
size_t k;
@ -299,7 +299,7 @@ bool RigReservoirBuilderMock::inputProperty(RigEclipseCase* eclipseCase, const Q
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigReservoirBuilderMock::staticResult(RigEclipseCase* eclipseCase, const QString& result, std::vector<double>* values)
bool RigReservoirBuilderMock::staticResult(RigCaseData* eclipseCase, const QString& result, std::vector<double>* values)
{
size_t k;
@ -316,7 +316,7 @@ bool RigReservoirBuilderMock::staticResult(RigEclipseCase* eclipseCase, const QS
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigReservoirBuilderMock::dynamicResult(RigEclipseCase* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values)
bool RigReservoirBuilderMock::dynamicResult(RigCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values)
{
int resultIndex = 1;
@ -352,19 +352,19 @@ bool RigReservoirBuilderMock::dynamicResult(RigEclipseCase* eclipseCase, const Q
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirBuilderMock::addWellData(RigEclipseCase* eclipseCase, RigGridBase* grid)
void RigReservoirBuilderMock::addWellData(RigCaseData* eclipseCase, RigGridBase* grid)
{
CVF_ASSERT(eclipseCase);
CVF_ASSERT(grid);
cvf::Vec3st dim = grid->gridPointDimensions();
cvf::Collection<RigWellResults> wells;
cvf::Collection<RigSingleWellResultsData> wells;
int wellIdx;
for (wellIdx = 0; wellIdx < 1; wellIdx++)
{
cvf::ref<RigWellResults> wellCellsTimeHistory = new RigWellResults;
cvf::ref<RigSingleWellResultsData> wellCellsTimeHistory = new RigSingleWellResultsData;
wellCellsTimeHistory->m_wellName = QString("Well %1").arg(wellIdx);
wellCellsTimeHistory->m_wellCellsTimeSteps.resize(m_timeStepCount);

View File

@ -55,14 +55,14 @@ public:
void addLocalGridRefinement(const cvf::Vec3st& minCellPosition, const cvf::Vec3st& maxCellPosition, const cvf::Vec3st& singleCellRefinementFactors);
void populateReservoir(RigEclipseCase* eclipseCase);
void populateReservoir(RigCaseData* eclipseCase);
bool inputProperty(RigEclipseCase* eclipseCase, const QString& propertyName, std::vector<double>* values );
bool staticResult(RigEclipseCase* eclipseCase, const QString& result, std::vector<double>* values );
bool dynamicResult(RigEclipseCase* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values );
bool inputProperty(RigCaseData* eclipseCase, const QString& propertyName, std::vector<double>* values );
bool staticResult(RigCaseData* eclipseCase, const QString& result, std::vector<double>* values );
bool dynamicResult(RigCaseData* eclipseCase, const QString& result, size_t stepIndex, std::vector<double>* values );
private:
void addWellData(RigEclipseCase* eclipseCase, RigGridBase* grid);
void addWellData(RigCaseData* eclipseCase, RigGridBase* grid);
static void appendCells(size_t nodeStartIndex, size_t cellCount, RigGridBase* hostGrid, std::vector<RigCell>& cells);
static void appendNodes(const cvf::Vec3d& min, const cvf::Vec3d& max, const cvf::Vec3st& cubeDimension, std::vector<cvf::Vec3d>& nodes);

View File

@ -27,7 +27,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigReservoirCellResults::RigReservoirCellResults(RigMainGrid* ownerGrid)
RigCaseCellResultsData::RigCaseCellResultsData(RigMainGrid* ownerGrid)
{
CVF_ASSERT(ownerGrid != NULL);
m_ownerMainGrid = ownerGrid;
@ -37,7 +37,7 @@ RigReservoirCellResults::RigReservoirCellResults(RigMainGrid* ownerGrid)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::setMainGrid(RigMainGrid* ownerGrid)
void RigCaseCellResultsData::setMainGrid(RigMainGrid* ownerGrid)
{
m_ownerMainGrid = ownerGrid;
}
@ -45,7 +45,7 @@ void RigReservoirCellResults::setMainGrid(RigMainGrid* ownerGrid)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::minMaxCellScalarValues( size_t scalarResultIndex, double& min, double& max )
void RigCaseCellResultsData::minMaxCellScalarValues( size_t scalarResultIndex, double& min, double& max )
{
min = HUGE_VAL;
max = -HUGE_VAL;
@ -83,7 +83,7 @@ void RigReservoirCellResults::minMaxCellScalarValues( size_t scalarResultIndex,
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::minMaxCellScalarValues(size_t scalarResultIndex, size_t timeStepIndex, double& min, double& max)
void RigCaseCellResultsData::minMaxCellScalarValues(size_t scalarResultIndex, size_t timeStepIndex, double& min, double& max)
{
min = HUGE_VAL;
max = -HUGE_VAL;
@ -137,7 +137,7 @@ void RigReservoirCellResults::minMaxCellScalarValues(size_t scalarResultIndex, s
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RigReservoirCellResults::cellScalarValuesHistogram(size_t scalarResultIndex)
const std::vector<size_t>& RigCaseCellResultsData::cellScalarValuesHistogram(size_t scalarResultIndex)
{
CVF_ASSERT(scalarResultIndex < resultCount());
@ -178,7 +178,7 @@ const std::vector<size_t>& RigReservoirCellResults::cellScalarValuesHistogram(si
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::p10p90CellScalarValues(size_t scalarResultIndex, double& p10, double& p90)
void RigCaseCellResultsData::p10p90CellScalarValues(size_t scalarResultIndex, double& p10, double& p90)
{
const std::vector<size_t>& histogr = cellScalarValuesHistogram( scalarResultIndex);
p10 = m_p10p90[scalarResultIndex].first;
@ -188,7 +188,7 @@ void RigReservoirCellResults::p10p90CellScalarValues(size_t scalarResultIndex, d
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::meanCellScalarValues(size_t scalarResultIndex, double& meanValue)
void RigCaseCellResultsData::meanCellScalarValues(size_t scalarResultIndex, double& meanValue)
{
CVF_ASSERT(scalarResultIndex < resultCount());
@ -224,7 +224,7 @@ void RigReservoirCellResults::meanCellScalarValues(size_t scalarResultIndex, dou
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::resultCount() const
size_t RigCaseCellResultsData::resultCount() const
{
return m_cellScalarResults.size();
}
@ -232,7 +232,7 @@ size_t RigReservoirCellResults::resultCount() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::timeStepCount(size_t scalarResultIndex) const
size_t RigCaseCellResultsData::timeStepCount(size_t scalarResultIndex) const
{
CVF_TIGHT_ASSERT(scalarResultIndex < resultCount());
@ -242,7 +242,7 @@ size_t RigReservoirCellResults::timeStepCount(size_t scalarResultIndex) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector< std::vector<double> > & RigReservoirCellResults::cellScalarResults( size_t scalarResultIndex ) const
const std::vector< std::vector<double> > & RigCaseCellResultsData::cellScalarResults( size_t scalarResultIndex ) const
{
CVF_TIGHT_ASSERT(scalarResultIndex < resultCount());
@ -252,7 +252,7 @@ const std::vector< std::vector<double> > & RigReservoirCellResults::cellScalarRe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector< std::vector<double> > & RigReservoirCellResults::cellScalarResults( size_t scalarResultIndex )
std::vector< std::vector<double> > & RigCaseCellResultsData::cellScalarResults( size_t scalarResultIndex )
{
CVF_TIGHT_ASSERT(scalarResultIndex < resultCount());
@ -262,7 +262,7 @@ std::vector< std::vector<double> > & RigReservoirCellResults::cellScalarResults(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double>& RigReservoirCellResults::cellScalarResults(size_t scalarResultIndex, size_t timeStepIndex)
std::vector<double>& RigCaseCellResultsData::cellScalarResults(size_t scalarResultIndex, size_t timeStepIndex)
{
CVF_TIGHT_ASSERT(scalarResultIndex < resultCount());
CVF_TIGHT_ASSERT(timeStepIndex < m_cellScalarResults[scalarResultIndex].size());
@ -273,7 +273,7 @@ std::vector<double>& RigReservoirCellResults::cellScalarResults(size_t scalarRes
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RigReservoirCellResults::cellScalarResult( size_t scalarResultIndex, size_t timeStepIndex, size_t resultValueIndex)
double RigCaseCellResultsData::cellScalarResult( size_t scalarResultIndex, size_t timeStepIndex, size_t resultValueIndex)
{
if (scalarResultIndex < resultCount() &&
timeStepIndex < m_cellScalarResults[scalarResultIndex].size() &&
@ -292,7 +292,7 @@ double RigReservoirCellResults::cellScalarResult( size_t scalarResultIndex, size
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::findScalarResultIndex(RimDefines::ResultCatType type, const QString& resultName) const
size_t RigCaseCellResultsData::findScalarResultIndex(RimDefines::ResultCatType type, const QString& resultName) const
{
std::vector<ResultInfo>::const_iterator it;
for (it = m_resultInfos.begin(); it != m_resultInfos.end(); it++)
@ -309,7 +309,7 @@ size_t RigReservoirCellResults::findScalarResultIndex(RimDefines::ResultCatType
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::findScalarResultIndex(const QString& resultName) const
size_t RigCaseCellResultsData::findScalarResultIndex(const QString& resultName) const
{
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
@ -337,7 +337,7 @@ size_t RigReservoirCellResults::findScalarResultIndex(const QString& resultName)
/// Adds an empty scalar set, and returns the scalarResultIndex to it.
/// if resultName already exists, it returns the scalarResultIndex to the existing result.
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::addEmptyScalarResult(RimDefines::ResultCatType type, const QString& resultName, bool needsToBeStored)
size_t RigCaseCellResultsData::addEmptyScalarResult(RimDefines::ResultCatType type, const QString& resultName, bool needsToBeStored)
{
size_t scalarResultIndex = cvf::UNDEFINED_SIZE_T;
@ -356,7 +356,7 @@ size_t RigReservoirCellResults::addEmptyScalarResult(RimDefines::ResultCatType t
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QStringList RigReservoirCellResults::resultNames(RimDefines::ResultCatType resType) const
QStringList RigCaseCellResultsData::resultNames(RimDefines::ResultCatType resType) const
{
QStringList varList;
std::vector<ResultInfo>::const_iterator it;
@ -373,7 +373,7 @@ QStringList RigReservoirCellResults::resultNames(RimDefines::ResultCatType resTy
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::recalculateMinMax(size_t scalarResultIndex)
void RigCaseCellResultsData::recalculateMinMax(size_t scalarResultIndex)
{
// Make sure cached max min values are recalculated next time asked for, since
// the data could be changed.
@ -392,7 +392,7 @@ void RigReservoirCellResults::recalculateMinMax(size_t scalarResultIndex)
//--------------------------------------------------------------------------------------------------
/// Returns whether the result data in question is addressed by Active Cell Index
//--------------------------------------------------------------------------------------------------
bool RigReservoirCellResults::isUsingGlobalActiveIndex(size_t scalarResultIndex) const
bool RigCaseCellResultsData::isUsingGlobalActiveIndex(size_t scalarResultIndex) const
{
CVF_TIGHT_ASSERT(scalarResultIndex < m_cellScalarResults.size());
@ -407,7 +407,7 @@ bool RigReservoirCellResults::isUsingGlobalActiveIndex(size_t scalarResultIndex)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QDateTime RigReservoirCellResults::timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const
QDateTime RigCaseCellResultsData::timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const
{
if (scalarResultIndex < m_resultInfos.size() && (size_t)(m_resultInfos[scalarResultIndex].m_timeStepDates.size()) > timeStepIndex)
return m_resultInfos[scalarResultIndex].m_timeStepDates[static_cast<int>(timeStepIndex)];
@ -418,7 +418,7 @@ QDateTime RigReservoirCellResults::timeStepDate(size_t scalarResultIndex, size_t
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<QDateTime> RigReservoirCellResults::timeStepDates(size_t scalarResultIndex) const
std::vector<QDateTime> RigCaseCellResultsData::timeStepDates(size_t scalarResultIndex) const
{
if (scalarResultIndex < m_resultInfos.size() )
return m_resultInfos[scalarResultIndex].m_timeStepDates;
@ -429,7 +429,7 @@ std::vector<QDateTime> RigReservoirCellResults::timeStepDates(size_t scalarResul
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::setTimeStepDates(size_t scalarResultIndex, const std::vector<QDateTime>& dates)
void RigCaseCellResultsData::setTimeStepDates(size_t scalarResultIndex, const std::vector<QDateTime>& dates)
{
CVF_ASSERT(scalarResultIndex < m_resultInfos.size() );
@ -442,7 +442,7 @@ void RigReservoirCellResults::setTimeStepDates(size_t scalarResultIndex, const s
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::maxTimeStepCount(size_t* scalarResultIndexWithMostTimeSteps) const
size_t RigCaseCellResultsData::maxTimeStepCount(size_t* scalarResultIndexWithMostTimeSteps) const
{
size_t maxTsCount = 0;
size_t scalarResultIndexWithMaxTsCount = cvf::UNDEFINED_SIZE_T;
@ -467,7 +467,7 @@ size_t RigReservoirCellResults::maxTimeStepCount(size_t* scalarResultIndexWithMo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RigReservoirCellResults::makeResultNameUnique(const QString& resultNameProposal) const
QString RigCaseCellResultsData::makeResultNameUnique(const QString& resultNameProposal) const
{
QString newResultName = resultNameProposal;
size_t resultIndex = cvf::UNDEFINED_SIZE_T;
@ -489,7 +489,7 @@ QString RigReservoirCellResults::makeResultNameUnique(const QString& resultNameP
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::removeResult(const QString& resultName)
void RigCaseCellResultsData::removeResult(const QString& resultName)
{
size_t resultIdx = findScalarResultIndex(resultName);
if (resultIdx == cvf::UNDEFINED_SIZE_T) return;
@ -502,7 +502,7 @@ void RigReservoirCellResults::removeResult(const QString& resultName)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigReservoirCellResults::clearAllResults()
void RigCaseCellResultsData::clearAllResults()
{
m_cellScalarResults.clear();
m_maxMinValues.clear();
@ -516,7 +516,7 @@ void RigReservoirCellResults::clearAllResults()
//--------------------------------------------------------------------------------------------------
/// Add a result with given type and name, and allocate one result vector for the static result values
//--------------------------------------------------------------------------------------------------
size_t RigReservoirCellResults::addStaticScalarResult(RimDefines::ResultCatType type, const QString& resultName, bool needsToBeStored, size_t resultValueCount)
size_t RigCaseCellResultsData::addStaticScalarResult(RimDefines::ResultCatType type, const QString& resultName, bool needsToBeStored, size_t resultValueCount)
{
size_t resultIdx = addEmptyScalarResult(type, resultName, needsToBeStored);
@ -529,7 +529,7 @@ size_t RigReservoirCellResults::addStaticScalarResult(RimDefines::ResultCatType
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifReaderInterface::PorosityModelResultType RigReservoirCellResults::convertFromProjectModelPorosityModel(RimDefines::PorosityModelType porosityModel)
RifReaderInterface::PorosityModelResultType RigCaseCellResultsData::convertFromProjectModelPorosityModel(RimDefines::PorosityModelType porosityModel)
{
if (porosityModel == RimDefines::MATRIX_MODEL) return RifReaderInterface::MATRIX_RESULTS;

View File

@ -30,10 +30,10 @@ class RigMainGrid;
//==================================================================================================
/// Class containing the results for the complete number of active cells. Both main grid and LGR's
//==================================================================================================
class RigReservoirCellResults : public cvf::Object
class RigCaseCellResultsData : public cvf::Object
{
public:
RigReservoirCellResults(RigMainGrid* ownerGrid);
RigCaseCellResultsData(RigMainGrid* ownerGrid);
void setMainGrid(RigMainGrid* ownerGrid);

View File

@ -24,7 +24,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigWellResultFrame& RigWellResults::wellResultFrame(size_t resultTimeStepIndex) const
const RigWellResultFrame& RigSingleWellResultsData::wellResultFrame(size_t resultTimeStepIndex) const
{
CVF_ASSERT(resultTimeStepIndex < m_resultTimeStepIndexToWellTimeStepIndex.size());
@ -37,7 +37,7 @@ const RigWellResultFrame& RigWellResults::wellResultFrame(size_t resultTimeStepI
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigWellResults::computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector<QDateTime>& resultTimes)
void RigSingleWellResultsData::computeMappingFromResultTimeIndicesToWellTimeIndices(const std::vector<QDateTime>& resultTimes)
{
m_resultTimeStepIndexToWellTimeStepIndex.clear();
if (m_wellCellsTimeSteps.size() == 0) return;
@ -83,7 +83,7 @@ void RigWellResults::computeMappingFromResultTimeIndicesToWellTimeIndices(const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigWellResults::hasWellResult(size_t resultTimeStepIndex) const
bool RigSingleWellResultsData::hasWellResult(size_t resultTimeStepIndex) const
{
size_t wellTimeStepIndex = m_resultTimeStepIndexToWellTimeStepIndex[resultTimeStepIndex];
@ -93,7 +93,7 @@ bool RigWellResults::hasWellResult(size_t resultTimeStepIndex) const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigWellResults::firstResultTimeStep() const
size_t RigSingleWellResultsData::firstResultTimeStep() const
{
size_t i = 0;
for(i = 0; i < m_resultTimeStepIndexToWellTimeStepIndex.size(); ++i)
@ -108,7 +108,7 @@ size_t RigWellResults::firstResultTimeStep() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigWellResults::computeStaticWellCellPath()
void RigSingleWellResultsData::computeStaticWellCellPath()
{
if (m_wellCellsTimeSteps.size() == 0) return;

View File

@ -99,7 +99,7 @@ public:
//==================================================================================================
///
//==================================================================================================
class RigWellResults : public cvf::Object
class RigSingleWellResultsData : public cvf::Object
{
public:
bool hasWellResult(size_t resultTimeStepIndex) const;

View File

@ -151,7 +151,7 @@ void RiaSocketServer::handleClientConnection(QTcpSocket* clientToHandle)
//--------------------------------------------------------------------------------------------------
/// Find the requested reservoir: Current, by index or by name
//--------------------------------------------------------------------------------------------------
RimReservoir* RiaSocketServer::findReservoir(const QString& caseName)
RimCase* RiaSocketServer::findReservoir(const QString& caseName)
{
if (caseName.isEmpty())
{
@ -241,7 +241,7 @@ void RiaSocketServer::readCommandFromOctave()
QString caseName;
QString propertyName;
RimReservoir* reservoir = NULL;
RimCase* reservoir = NULL;
// Find the correct arguments
@ -502,7 +502,7 @@ void RiaSocketServer::readPropertyDataFromOctave()
if (m_currentReservoir != NULL)
{
// Create a new input property if we have an input reservoir
RimInputReservoir* inputRes = dynamic_cast<RimInputReservoir*>(m_currentReservoir);
RimInputCase* inputRes = dynamic_cast<RimInputCase*>(m_currentReservoir);
if (inputRes)
{
RimInputProperty* inputProperty = NULL;

View File

@ -27,7 +27,7 @@ class QTcpServer;
class QTcpSocket;
class QNetworkSession;
class QErrorMessage;
class RimReservoir;
class RimCase;
class RiaSocketServer : public QObject
@ -53,7 +53,7 @@ private:
void handleClientConnection( QTcpSocket* clientToHandle);
RimReservoir* findReservoir(const QString &casename);
RimCase* findReservoir(const QString &casename);
void terminateCurrentConnection();
void calculateMatrixModelActiveCellInfo(std::vector<qint32>& gridNumber,
@ -80,7 +80,7 @@ private:
quint64 m_bytesPerTimeStepToRead;
size_t m_currentTimeStepToRead;
std::vector< std::vector<double> >* m_scalarResultsToAdd;
RimReservoir* m_currentReservoir;
RimCase* m_currentReservoir;
size_t m_currentScalarIndex;
QString m_currentPropertyName;
bool m_invalidActiveCellCountDetected;

View File

@ -976,7 +976,7 @@ void RIMainWindow::slotSubWindowActivated(QMdiSubWindow* subWindow)
size_t i;
for (i = 0; i < proj->reservoirs().size(); ++i)
{
RimReservoir* ri = proj->reservoirs()[i];
RimCase* ri = proj->reservoirs()[i];
if (!ri) continue;
size_t j;