mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-20 11:48:35 -06:00
Removed obsolete code from interface
Use time steps from source case with largest time step count p4#: 20954
This commit is contained in:
parent
da3486f881
commit
a411a8ae59
@ -48,7 +48,6 @@ public:
|
||||
virtual ~RifReaderInterface() {}
|
||||
|
||||
virtual bool open(const QString& fileName, RigEclipseCase* eclipseCase) = 0;
|
||||
virtual bool openAndReadActiveCellData(const QString& fileName, RigEclipseCase* mainEclipseCase, RigEclipseCase* eclipseCase) { return true; };
|
||||
virtual void close() = 0;
|
||||
|
||||
virtual bool staticResult(const QString& result, PorosityModelResultType matrixOrFracture, std::vector<double>* values) = 0;
|
||||
|
@ -117,15 +117,26 @@ bool RimResultReservoir::openAndReadActiveCellData(RigEclipseCase* mainEclipseCa
|
||||
CVF_ASSERT(mainEclipseCase && mainEclipseCase->mainGrid());
|
||||
eclipseCase->setMainGrid(mainEclipseCase->mainGrid());
|
||||
|
||||
readerInterface = new RifReaderEclipseOutput;
|
||||
if (!readerInterface->openAndReadActiveCellData(fname, mainEclipseCase, eclipseCase.p()))
|
||||
size_t scalarIndexWithMaxTimeStepCount = cvf::UNDEFINED_SIZE_T;
|
||||
mainEclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->maxTimeStepCount(&scalarIndexWithMaxTimeStepCount);
|
||||
if (scalarIndexWithMaxTimeStepCount == cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
readerInterface->close();
|
||||
std::vector<QDateTime> timeStepDates = mainEclipseCase->results(RifReaderInterface::MATRIX_RESULTS)->timeStepDates(scalarIndexWithMaxTimeStepCount);
|
||||
|
||||
cvf::ref<RifReaderEclipseOutput> readerEclipseOutput = new RifReaderEclipseOutput;
|
||||
if (!readerEclipseOutput->openAndReadActiveCellData(fname, timeStepDates, eclipseCase.p()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
readerEclipseOutput->close();
|
||||
|
||||
this->setReservoirData( eclipseCase.p() );
|
||||
|
||||
readerInterface = readerEclipseOutput;
|
||||
}
|
||||
|
||||
results(RifReaderInterface::MATRIX_RESULTS)->setReaderInterface(readerInterface.p());
|
||||
|
Loading…
Reference in New Issue
Block a user