mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Updated ERT to 315ceeee250808ea6a6530233dd5125f9f76f06c
Support of reading LGR dimensions Close file handles between access to files, keep ERT file-related cache to speed up reading of many files multiple times p4#: 21477
This commit is contained in:
@@ -38,7 +38,10 @@ RifEclipseUnifiedRestartFileAccess::RifEclipseUnifiedRestartFileAccess()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseUnifiedRestartFileAccess::~RifEclipseUnifiedRestartFileAccess()
|
||||
{
|
||||
close();
|
||||
if (m_ecl_file)
|
||||
{
|
||||
ecl_file_close(m_ecl_file);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -56,7 +59,7 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
{
|
||||
if (!m_ecl_file)
|
||||
{
|
||||
m_ecl_file = ecl_file_open(m_filename.toAscii().data());
|
||||
m_ecl_file = ecl_file_open(m_filename.toAscii().data(), ECL_FILE_CLOSE_STREAM);
|
||||
}
|
||||
|
||||
if (!m_ecl_file) return false;
|
||||
@@ -69,12 +72,6 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseUnifiedRestartFileAccess::close()
|
||||
{
|
||||
if (m_ecl_file)
|
||||
{
|
||||
ecl_file_close(m_ecl_file);
|
||||
}
|
||||
|
||||
m_ecl_file = NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user