#3588 Intersect : Add support for import of Intersect data

This commit is contained in:
Magne Sjaastad
2018-11-13 09:28:13 +01:00
parent 1215235255
commit 3b9cdf5a92
6 changed files with 135 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
#include "gtest/gtest.h"
#include "RifEclipseOutputFileTools.h"
#include <QString>
#include "ert/ecl/ecl_file.h"
#include "ert/ecl/ecl_kw_magic.h"
#include "ert/ecl/ecl_kw.hpp"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(IntersectDataImport, DISABLED_TestImportPORV)
{
QString baseFolder = "d:/Models/Statoil/IX_output_files/";
QString filename = baseFolder + "NORNE_IX2.INIT";
std::string porv_kw("PORV");
ecl_file_type* ecl_file = ecl_file_open(filename.toStdString().data(), ECL_FILE_CLOSE_STREAM);
bool isIntersect = RifEclipseOutputFileTools::isExportedFromIntersect(ecl_file);
EXPECT_TRUE(isIntersect);
if (ecl_file_has_kw(ecl_file, porv_kw.data()))
{
ecl_file_load_all(ecl_file);
int keywordCount = ecl_file_get_num_named_kw(ecl_file, porv_kw.data());
for (int index = 0; index < keywordCount; index++)
{
auto fileKeyword = ecl_file_iget_named_file_kw(ecl_file, porv_kw.data(), index);
float porvThreshold = 0.0f;
auto actnumFromPorv = ecl_kw_alloc_actnum(ecl_file_kw_get_kw_ptr(fileKeyword), porvThreshold);
EXPECT_TRUE(actnumFromPorv != nullptr);
}
}
}