mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Look for fault definition in Pflotran input files
Look for fault definition in Pflotran input files If no *.DATA file is found, look for *.IN file and search for fault definitions.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesGrid.h"
|
||||
|
||||
#include "RifEclipseInputFileTools.h"
|
||||
@@ -159,12 +160,16 @@ void RifReaderInterface::importFaults( const QStringList& fileSet, cvf::Collecti
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ( QString fname, fileSet )
|
||||
bool isDataFileFound = false;
|
||||
|
||||
for ( const auto& filename : fileSet )
|
||||
{
|
||||
if ( fname.endsWith( ".DATA" ) )
|
||||
if ( filename.endsWith( ".DATA" ) )
|
||||
{
|
||||
isDataFileFound = true;
|
||||
|
||||
std::vector<QString> filenamesWithFaults;
|
||||
RifEclipseInputFileTools::readFaultsInGridSection( fname, faults, &filenamesWithFaults, faultIncludeFileAbsolutePathPrefix() );
|
||||
RifEclipseInputFileTools::readFaultsInGridSection( filename, faults, &filenamesWithFaults, faultIncludeFileAbsolutePathPrefix() );
|
||||
|
||||
std::sort( filenamesWithFaults.begin(), filenamesWithFaults.end() );
|
||||
std::vector<QString>::iterator last = std::unique( filenamesWithFaults.begin(), filenamesWithFaults.end() );
|
||||
@@ -173,5 +178,18 @@ void RifReaderInterface::importFaults( const QStringList& fileSet, cvf::Collecti
|
||||
setFilenamesWithFaults( filenamesWithFaults );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !isDataFileFound )
|
||||
{
|
||||
RiaLogging::info( "No *.DATA file is found" );
|
||||
|
||||
for ( const auto& filename : fileSet )
|
||||
{
|
||||
if ( filename.endsWith( ".IN", Qt::CaseInsensitive ) )
|
||||
{
|
||||
RifEclipseInputFileTools::parsePflotranInputFile( filename, faults );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user