mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor: extract code for detecting logarithmic result
This commit is contained in:
@@ -71,6 +71,19 @@ bool RiaResultNames::isPerCellFaceResult( const QString& resultName )
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaResultNames::isLogarithmicResult( const QString& resultName )
|
||||
{
|
||||
QStringList subStringsToMatch{ "TRAN", "MULT", "PERM" };
|
||||
|
||||
for ( const auto& s : subStringsToMatch )
|
||||
if ( resultName.contains( s, Qt::CaseInsensitive ) ) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
namespace RiaResultNames
|
||||
{
|
||||
bool isPerCellFaceResult( const QString& resultName );
|
||||
bool isLogarithmicResult( const QString& resultName );
|
||||
|
||||
QString undefinedResultName();
|
||||
QString undefinedGridFaultName();
|
||||
|
||||
Reference in New Issue
Block a user