mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
@@ -182,9 +182,7 @@ void RicfFieldReader<cvf::Color3f>::readFieldData( cvf::Color3f& fieldValue,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue,
|
||||
QTextStream& outputStream,
|
||||
bool quoteStrings )
|
||||
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue, QTextStream& outputStream, bool quoteStrings )
|
||||
{
|
||||
QColor qColor = RiaColorTools::toQColor( fieldValue );
|
||||
QString fieldStringValue = qColor.name();
|
||||
|
||||
@@ -140,8 +140,7 @@ std::vector<RicfCommandObject*> RicfCommandFileReader::readCommands( QTextStream
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfCommandFileReader::writeCommands( QTextStream& outputStream,
|
||||
const std::vector<RicfCommandObject*>& commandsToWrite )
|
||||
void RicfCommandFileReader::writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite )
|
||||
{
|
||||
for ( const auto& cmdObj : commandsToWrite )
|
||||
{
|
||||
|
||||
@@ -47,8 +47,7 @@ std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStrin
|
||||
|
||||
for ( auto wellPath : allWellPaths )
|
||||
{
|
||||
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(),
|
||||
toStringVector( wellPathNames ) );
|
||||
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(), toStringVector( wellPathNames ) );
|
||||
if ( !matchedName.isEmpty() )
|
||||
{
|
||||
wellPaths.push_back( wellPath );
|
||||
|
||||
@@ -169,7 +169,8 @@ std::vector<RicfCommandObject*>
|
||||
//
|
||||
// The reason for this is based on two requirements
|
||||
// 1. Ability to aggregate info from multiple replaceCase() statements in a command file
|
||||
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file paths
|
||||
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file
|
||||
// paths
|
||||
// during project loading
|
||||
|
||||
std::vector<RicfCommandObject*> executableCommands;
|
||||
|
||||
@@ -117,9 +117,7 @@ RicfCommandResponse RicfCreateLgrForCompletions::execute()
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{RigCompletionData::PERFORATION,
|
||||
RigCompletionData::FRACTURE,
|
||||
RigCompletionData::FISHBONES},
|
||||
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
|
||||
&wellsIntersectingOtherLgrs );
|
||||
|
||||
feature->updateViews( eclipseCase );
|
||||
|
||||
@@ -96,8 +96,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
|
||||
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: These well paths were not found: %1" )
|
||||
.arg( wellsNotFound.join( ", " ) );
|
||||
QString error =
|
||||
QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@@ -112,7 +112,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
|
||||
|
||||
if ( !fractureTemplate )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
|
||||
QString error =
|
||||
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@@ -187,7 +188,6 @@ RimFractureTemplate* RicfCreateMultipleFractures::fractureTemplateFromId( int te
|
||||
if ( t->id() == templateId ) return t;
|
||||
}
|
||||
|
||||
RiaLogging::error(
|
||||
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
|
||||
RiaLogging::error( QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -96,11 +96,9 @@ RicfCommandResponse RicfCreateWellBoreStabilityPlotFeature::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimWellBoreStabilityPlot* wbsPlot = RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase,
|
||||
chosenWellPath,
|
||||
m_timeStep(),
|
||||
m_wbsParameters() );
|
||||
RicfCommandResponse response;
|
||||
RimWellBoreStabilityPlot* wbsPlot =
|
||||
RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase, chosenWellPath, m_timeStep(), m_wbsParameters() );
|
||||
RicfCommandResponse response;
|
||||
response.setResult( new RicfCreateWbsPlotResult( wbsPlot->id() ) );
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -109,9 +109,7 @@ RicfCommandResponse RicfExportLgrForCompletions::execute()
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{RigCompletionData::PERFORATION,
|
||||
RigCompletionData::FRACTURE,
|
||||
RigCompletionData::FISHBONES},
|
||||
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
|
||||
&wellsIntersectingOtherLgrs );
|
||||
|
||||
RicfCommandResponse response;
|
||||
|
||||
@@ -128,11 +128,11 @@ RicfCommandResponse RicfExportPropertyInViews::execute()
|
||||
|
||||
if ( resultAccessor.isNull() )
|
||||
{
|
||||
QString warning = QString(
|
||||
"exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
|
||||
.arg( m_caseId )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
QString warning =
|
||||
QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
|
||||
.arg( m_caseId )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
RiaLogging::warning( warning );
|
||||
response.updateStatus( RicfCommandResponse::COMMAND_WARNING, warning );
|
||||
continue;
|
||||
|
||||
@@ -102,12 +102,11 @@ RicfCommandResponse RicfExportSimWellFractureCompletions::execute()
|
||||
}
|
||||
if ( views.empty() )
|
||||
{
|
||||
QString error =
|
||||
QString(
|
||||
"exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the case with ID %3" )
|
||||
.arg( m_viewId )
|
||||
.arg( m_viewName )
|
||||
.arg( m_caseId() );
|
||||
QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the "
|
||||
"case with ID %3" )
|
||||
.arg( m_viewId )
|
||||
.arg( m_viewName )
|
||||
.arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
|
||||
mainWnd->hideAllDockWidgets();
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
|
||||
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath(
|
||||
RicfCommandFileExecutor::SNAPSHOTS );
|
||||
QString absolutePathToSnapshotDir =
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::SNAPSHOTS );
|
||||
|
||||
if ( !m_exportFolder().isEmpty() )
|
||||
{
|
||||
@@ -92,8 +92,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
|
||||
}
|
||||
if ( absolutePathToSnapshotDir.isNull() )
|
||||
{
|
||||
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
|
||||
"snapshots" );
|
||||
absolutePathToSnapshotDir =
|
||||
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
}
|
||||
if ( m_type == RicfExportSnapshots::VIEWS || m_type == RicfExportSnapshots::ALL )
|
||||
{
|
||||
|
||||
@@ -75,13 +75,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
"" );
|
||||
|
||||
RICF_InitField( &m_performTransScaling, "performTransScaling", false, "Perform Transmissibility Scaling", "", "", "" );
|
||||
RICF_InitField( &m_transScalingTimeStep,
|
||||
"transScalingTimeStep",
|
||||
0,
|
||||
"Transmissibility Scaling Pressure Time Step",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step", "", "", "" );
|
||||
RICF_InitField( &m_transScalingInitialWBHP,
|
||||
"transScalingWBHPFromSummary",
|
||||
RicExportCompletionDataSettingsUi::TransScalingWBHPSource(),
|
||||
@@ -89,13 +83,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingWBHP,
|
||||
"transScalingWBHP",
|
||||
200.0,
|
||||
"Transmissibility Scaling Constant WBHP Value",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingWBHP, "transScalingWBHP", 200.0, "Transmissibility Scaling Constant WBHP Value", "", "", "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -168,8 +156,8 @@ RicfCommandResponse RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
for ( const QString& wellPathName : m_wellPathNames() )
|
||||
{
|
||||
RimWellPath* wellPath = RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName(
|
||||
wellPathName );
|
||||
RimWellPath* wellPath =
|
||||
RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
|
||||
if ( wellPath )
|
||||
{
|
||||
wellPaths.push_back( wellPath );
|
||||
|
||||
@@ -71,11 +71,10 @@ RicfCommandResponse RicfRunOctaveScript::execute()
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = RiaApplication::instance()
|
||||
->launchProcessForMultipleCases( octavePath,
|
||||
processArguments,
|
||||
caseIds,
|
||||
RiaApplication::instance()->octaveProcessEnvironment() );
|
||||
ok = RiaApplication::instance()->launchProcessForMultipleCases( octavePath,
|
||||
processArguments,
|
||||
caseIds,
|
||||
RiaApplication::instance()->octaveProcessEnvironment() );
|
||||
}
|
||||
|
||||
RicfCommandResponse response;
|
||||
|
||||
@@ -67,9 +67,8 @@ RicfCommandResponse RicfScaleFractureTemplate::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
|
||||
? project->allFractureTemplateCollections()[0]
|
||||
: nullptr;
|
||||
RimFractureTemplateCollection* templColl =
|
||||
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
|
||||
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
|
||||
|
||||
if ( !templ )
|
||||
|
||||
@@ -59,9 +59,8 @@ RicfCommandResponse RicfSetFractureContainment::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
|
||||
? project->allFractureTemplateCollections()[0]
|
||||
: nullptr;
|
||||
RimFractureTemplateCollection* templColl =
|
||||
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
|
||||
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
|
||||
|
||||
if ( !templ )
|
||||
|
||||
Reference in New Issue
Block a user