mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
GRDECL: Import multiple grid files from dialog (#10142)
Add import of N .GRDECL grid files - as done for roff-files
This commit is contained in:
@@ -1401,6 +1401,23 @@ cvf::StructGridInterface::FaceEnum RifEclipseInputFileTools::faceEnumFromText( c
|
||||
return cvf::StructGridInterface::NO_FACE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseInputFileTools::hasGridData( const QString& fileName )
|
||||
{
|
||||
// Look for keyword "COORD" in file
|
||||
// NOTE: If readKeywordAndValues is slow for large .GRDECL files, consider function in RifEclipseTextFileReader
|
||||
// reading line for line and returns true on first hit of keyword. This prevents reading entire file on large cases
|
||||
|
||||
const auto keywordAndValues = RifEclipseTextFileReader::readKeywordAndValues( fileName.toStdString() );
|
||||
auto coordKeywordItr = std::find_if( keywordAndValues.begin(),
|
||||
keywordAndValues.end(),
|
||||
[]( const auto& keywordAndValue ) { return keywordAndValue.keyword == "COORD"; } );
|
||||
|
||||
return coordKeywordItr != keywordAndValues.end();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// The file pointer is pointing at the line following the FAULTS keyword.
|
||||
/// Parse content of this keyword until end of file or
|
||||
|
||||
Reference in New Issue
Block a user