Refactor: extract code for detecting logarithmic result

This commit is contained in:
Kristian Bendiksen
2021-09-20 12:12:51 +02:00
parent e9b070c57f
commit ea3fdef281
5 changed files with 22 additions and 23 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -27,6 +27,7 @@
namespace RiaResultNames
{
bool isPerCellFaceResult( const QString& resultName );
bool isLogarithmicResult( const QString& resultName );
QString undefinedResultName();
QString undefinedGridFaultName();