Version 0.8.6

This commit is contained in:
Magne Sjaastad
2012-08-31 19:12:47 +02:00
parent 651d908709
commit 27d8808c5c
42 changed files with 622 additions and 175 deletions

View File

@@ -66,7 +66,7 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigReservoi
FILE* gridFilePointer = util_fopen(fileName.toLatin1().data(), "r");
if (!gridFilePointer) return false;
// Main grid Dimentions
// Main grid dimensions
// SPECGRID - This is whats normally available, but not really the input to Eclipse.
// DIMENS - Is what Eclipse expects and uses, but is not defined in the GRID section and is not (?) available normally
// ZCORN, COORD, ACTNUM, MAPAXES

View File

@@ -25,6 +25,7 @@
#endif //USE_ECL_LIB
#include <QFileInfo>
#include "cafProgressInfo.h"
//--------------------------------------------------------------------------------------------------
/// Constructor
@@ -105,7 +106,11 @@ bool RifEclipseOutputFileTools::keywordsOnFile(QStringList* keywords, size_t num
CVF_ASSERT(keywords);
keywords->clear();
size_t numKeywords = ecl_file_get_num_distinct_kw(m_file);
caf::ProgressInfo info(numKeywords, "Reading Keywords on file");
size_t i;
for (i = 0; i < numKeywords; i++)
{
@@ -148,6 +153,8 @@ bool RifEclipseOutputFileTools::keywordsOnFile(QStringList* keywords, size_t num
{
keywords->append(QString(kw));
}
info.setProgress(i);
}
return true;

View File

@@ -142,7 +142,15 @@ QStringList RifEclipseRestartFilesetAccess::resultNames()
bool RifEclipseRestartFilesetAccess::results(const QString& resultName, size_t timeStep, std::vector<double>* values)
{
size_t numOccurrences = m_files[timeStep]->numOccurrences(resultName);
CVF_ASSERT(m_numGrids == numOccurrences);
// No results for this result variable for current time step found
if (numOccurrences == 0) return true;
// Result handling depends on presens of result values for all grids
if (m_numGrids != numOccurrences)
{
return false;
}
size_t i;
for (i = 0; i < numOccurrences; i++)

View File

@@ -67,7 +67,7 @@ bool RifReaderEclipseInput::open(const QString& fileName, RigReservoir* reservoi
close();
// Should we handle gridless properties ?
// If so, they must match dimentions, and a grid afterwards must match dimension
// If so, they must match dimensions, and a grid afterwards must match dimension
// Add file:
// Open file

View File

@@ -381,7 +381,11 @@ bool RifReaderEclipseOutput::buildMetaData(RigReservoir* reservoir)
QStringList staticResultNames = staticResults;
QList<QDateTime> staticDate;
staticDate.push_back(m_timeSteps.front());
if (m_timeSteps.size() > 0)
{
staticDate.push_back(m_timeSteps.front());
}
for (size_t i = 0; i < static_cast<size_t>(staticResultNames.size()); ++i)
{
size_t resIndex = resCellResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, staticResultNames[i]);