mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-07 14:43:10 -06:00
Added reading of grid dimensions
p4#: 21154
This commit is contained in:
parent
1b07630239
commit
6c9f5d1978
@ -21,6 +21,7 @@
|
||||
#include "util.h"
|
||||
#include "ecl_file.h"
|
||||
#include "ecl_kw_magic.h"
|
||||
#include "ecl_grid.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDebug>
|
||||
@ -301,3 +302,20 @@ void RifEclipseOutputFileTools::findKeywordsAndDataItemCounts(ecl_file_type* ecl
|
||||
info.setProgress(i);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseOutputFileTools::readGridDimensions(const QString& gridFileName, std::vector< std::vector<int> >& gridDimensions)
|
||||
{
|
||||
int gridDims[3];
|
||||
|
||||
bool ret = ecl_grid_file_dims(gridFileName.toAscii().data(), NULL, gridDims);
|
||||
if (ret)
|
||||
{
|
||||
gridDimensions.resize(1);
|
||||
gridDimensions[0].push_back(gridDims[0]);
|
||||
gridDimensions[0].push_back(gridDims[1]);
|
||||
gridDimensions[0].push_back(gridDims[2]);
|
||||
}
|
||||
}
|
||||
|
@ -54,4 +54,6 @@ public:
|
||||
|
||||
static QString fileNameByType(const QStringList& fileSet, ecl_file_enum fileType);
|
||||
static QStringList fileNamesByType(const QStringList& fileSet, ecl_file_enum fileType);
|
||||
|
||||
static void readGridDimensions(const QString& gridFileName, std::vector< std::vector<int> >& gridDimensions);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user