#5101 clang-format: Adjusted penalties

Use lower absolute values to improve control of behavior
This commit is contained in:
Magne Sjaastad 2020-02-12 11:43:15 +01:00
parent 10f0abc9b5
commit c82df63e10
710 changed files with 3167 additions and 4721 deletions

View File

@ -52,13 +52,13 @@ MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PenaltyBreakAssignment: 130
PenaltyBreakBeforeFirstCallParameter: 100000
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyBreakAssignment: 13
PenaltyBreakBeforeFirstCallParameter: 10000
PenaltyBreakComment: 20
PenaltyBreakFirstLessLess: 12
PenaltyBreakString: 100
PenaltyExcessCharacter: 5
PenaltyReturnTypeOnItsOwnLine: 30
PointerAlignment: Left
ReflowComments: true
SortIncludes: true

View File

@ -552,7 +552,8 @@ bool RiaApplication::loadProject( const QString& projectFileName,
}
// If load action is specified to recalculate statistics, do it now.
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will be clamped
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will
// be clamped
if ( loadAction & PLA_CALCULATE_STATISTICS )
{
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
@ -863,8 +864,7 @@ bool RiaApplication::openOdbCaseFromFile( const QString& fileName, bool applyTim
//--------------------------------------------------------------------------------------------------
/// Add a list of well path file paths (JSON files) to the well path collection
//--------------------------------------------------------------------------------------------------
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths,
QStringList* errorMessages )
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, QStringList* errorMessages )
{
CAF_ASSERT( errorMessages );
@ -937,8 +937,8 @@ std::vector<RimWellLogFile*> RiaApplication::addWellLogsToModel( const QList<QSt
m_project->updateConnectedEditors();
}
std::vector<RimWellLogFile*> wellLogFiles = oilField->wellPathCollection->addWellLogs( wellLogFilePaths,
errorMessages );
std::vector<RimWellLogFile*> wellLogFiles =
oilField->wellPathCollection->addWellLogs( wellLogFilePaths, errorMessages );
oilField->wellPathCollection->updateConnectedEditors();
@ -1114,7 +1114,8 @@ bool RiaApplication::launchProcess( const QString& program,
stopMonitoringWorkProgress();
// QMessageBox::warning(m_mainWindow, "Script execution", "Failed to start script executable located at\n" + program);
// QMessageBox::warning(m_mainWindow, "Script execution", "Failed to start script executable
// located at\n" + program);
return false;
}

View File

@ -158,9 +158,7 @@ public:
QString pythonPath() const;
QProcessEnvironment pythonProcessEnvironment() const;
bool launchProcess( const QString& program,
const QStringList& arguments,
const QProcessEnvironment& processEnvironment );
bool launchProcess( const QString& program, const QStringList& arguments, const QProcessEnvironment& processEnvironment );
bool launchProcessForMultipleCases( const QString& program,
const QStringList& arguments,
const std::vector<int>& caseIds,

View File

@ -205,8 +205,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
{
// One argument is available, use replace case for first occurrence in the project
std::vector<QString> gridFileNames = readFileListFromTextFile(
cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
std::vector<QString> gridFileNames =
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames );
}
else
@ -215,8 +215,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
while ( optionIdx < o.valueCount() )
{
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
std::vector<QString> gridFileNames = readFileListFromTextFile(
cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
std::vector<QString> gridFileNames =
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
if ( groupId != -1 && !gridFileNames.empty() )
{
@ -258,8 +258,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
if ( cvf::Option o = progOpt->option( "case" ) )
{
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(
cvfqt::Utils::toQStringList( o.values() ) );
QStringList fileNames =
RicImportGeneralDataFeature::fileNamesFromCaseNames( cvfqt::Utils::toQStringList( o.values() ) );
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true );
}

View File

@ -242,10 +242,8 @@ QString RiaGuiApplication::promptForProjectSaveAsFileName() const
startPath += "/ResInsightProject.rsp";
}
QString fileName = QFileDialog::getSaveFileName( nullptr,
tr( "Save File" ),
startPath,
tr( "Project Files (*.rsp);;All files(*.*)" ) );
QString fileName =
QFileDialog::getSaveFileName( nullptr, tr( "Save File" ), startPath, tr( "Project Files (*.rsp);;All files(*.*)" ) );
return fileName;
}
@ -611,8 +609,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
{
// One argument is available, use replace case for first occurrence in the project
std::vector<QString> gridFileNames = readFileListFromTextFile(
cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
std::vector<QString> gridFileNames =
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames );
}
else
@ -621,8 +619,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
while ( optionIdx < o.valueCount() )
{
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
std::vector<QString> gridFileNames = readFileListFromTextFile(
cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
std::vector<QString> gridFileNames =
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
if ( groupId != -1 && !gridFileNames.empty() )
{
@ -664,8 +662,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
if ( cvf::Option o = progOpt->option( "case" ) )
{
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(
cvfqt::Utils::toQStringList( o.values() ) );
QStringList fileNames =
RicImportGeneralDataFeature::fileNamesFromCaseNames( cvfqt::Utils::toQStringList( o.values() ) );
RicImportGeneralDataFeature::OpenCaseResults results =
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true );
@ -1493,14 +1491,13 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* oldPreference
}
QMessageBox::StandardButton reply;
reply =
QMessageBox::question( m_mainWindow,
reply = QMessageBox::question( m_mainWindow,
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
QString( "You have changed default %1 and have existing views or plots with "
"different settings.\n" )
.arg( listString ) +
QString(
"Do you want to apply the new default settings to all existing views?" ),
QString( "Do you want to apply the new default settings to all existing "
"views?" ),
QMessageBox::Ok | QMessageBox::Cancel );
applySettingsToAllViews = ( reply == QMessageBox::Ok );
}
@ -1533,8 +1530,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* oldPreference
rim3dView->applyBackgroundColorAndFontChanges();
}
if ( oldPreferences &&
( applySettingsToAllViews ||
if ( oldPreferences && ( applySettingsToAllViews ||
rim3dView->scaleZ == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
{
rim3dView->scaleZ = static_cast<double>( m_preferences->defaultScaleFactorZ() );

View File

@ -254,8 +254,7 @@ QList<caf::PdmOptionItemInfo> RiaMemoryCleanup::calculateValueOptions( const caf
const RigEclipseResultInfo* resInfo = caseData->resultInfo( resultAddr );
QString posText = caf::AppEnum<RiaDefines::ResultCatType>::uiTextFromIndex(
resInfo->resultType() );
QString posText = caf::AppEnum<RiaDefines::ResultCatType>::uiTextFromIndex( resInfo->resultType() );
QString resultsText = QString( "%1, %2" ).arg( posText ).arg( resInfo->resultName() );
if ( inUse )
{

View File

@ -40,9 +40,7 @@ public:
void clearSelectedResultsFromMemory();
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
private:
std::vector<RigFemResultAddress> selectedGeoMechResults() const;

View File

@ -187,13 +187,7 @@ RiaPreferences::RiaPreferences( void )
caf::AppEnum<RiaFontCache::FontSize> fontSize = RiaFontCache::FONT_SIZE_8;
caf::AppEnum<RiaFontCache::FontSize> plotFontSize = RiaFontCache::FONT_SIZE_10;
CAF_PDM_InitField( &defaultSceneFontSize, "defaultSceneFontSizePt", fontSize, "Viewer Font Size", "", "", "" );
CAF_PDM_InitField( &defaultAnnotationFontSize,
"defaultAnnotationFontSizePt",
fontSize,
"Annotation Font Size",
"",
"",
"" );
CAF_PDM_InitField( &defaultAnnotationFontSize, "defaultAnnotationFontSizePt", fontSize, "Annotation Font Size", "", "", "" );
CAF_PDM_InitField( &defaultWellLabelFontSize, "defaultWellLabelFontSizePt", fontSize, "Well Label Font Size", "", "", "" );
CAF_PDM_InitField( &defaultPlotFontSize, "defaultPlotFontSizePt", plotFontSize, "Plot Font Size", "", "", "" );
@ -378,13 +372,7 @@ RiaPreferences::RiaPreferences( void )
CAF_PDM_InitField( &m_pageLeftMargin, "pageLeftMargin", defaultMarginSize( m_pageSize() ), "Left Margin", "", "", "" );
CAF_PDM_InitField( &m_pageTopMargin, "pageTopMargin", defaultMarginSize( m_pageSize() ), "Top Margin", "", "", "" );
CAF_PDM_InitField( &m_pageRightMargin, "pageRightMargin", defaultMarginSize( m_pageSize() ), "Right Margin", "", "", "" );
CAF_PDM_InitField( &m_pageBottomMargin,
"pageBottomMargin",
defaultMarginSize( m_pageSize() ),
"Bottom Margin",
"",
"",
"" );
CAF_PDM_InitField( &m_pageBottomMargin, "pageBottomMargin", defaultMarginSize( m_pageSize() ), "Bottom Margin", "", "", "" );
caf::AppEnum<RiaFontCache::FontSize> invalidFontSize = RiaFontCache::INVALID;
CAF_PDM_InitField( &m_defaultSceneFontSize_OBSOLETE, "fontSizeInScene", invalidFontSize, "Viewer Font Size", "", "", "" );
@ -633,8 +621,8 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::
for ( auto dateFormat : RiaQDateTimeTools::supportedDateFormats() )
{
QDate exampleDate = QDate( 2019, 8, 16 );
QString fullDateFormat = RiaQDateTimeTools::dateFormatString( dateFormat,
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
QString fullDateFormat =
RiaQDateTimeTools::dateFormatString( dateFormat, RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
QString uiText = QString( "%1 (%2)" ).arg( fullDateFormat ).arg( exampleDate.toString( fullDateFormat ) );
uiText.replace( "AP", "AM/PM" );
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( dateFormat ) ) );

View File

@ -166,9 +166,7 @@ protected:
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void initAfterRead() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
private:
static QString tabNameGeneral();

View File

@ -79,8 +79,7 @@ bool RiaSummaryCurveDefinition::isEnsembleCurve() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition,
std::vector<double>* values )
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, std::vector<double>* values )
{
CVF_ASSERT( values );

View File

@ -91,8 +91,7 @@ void RiaViewRedrawScheduler::updateAndRedrawScheduledViews()
}
}
for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end();
++it )
for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end(); ++it )
{
if ( *it )
{

View File

@ -86,10 +86,7 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
"Use --summaryplot -help to show a more detailed help text.\n",
cvf::ProgramOptions::OPTIONAL_MULTI_VALUE );
progOpt->registerOption( "commandFile",
"<commandfile>",
"Execute the command file.",
cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "commandFile", "<commandfile>", "Execute the command file.", cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "commandFileReplaceCases",
"[<caseId>] <caseListFile>",
"Supply list of cases to replace in project, performing command file for each case.",

View File

@ -53,10 +53,8 @@ std::vector<std::vector<cvf::Vec3d>> calcFacePoints( const std::vector<cvf::Vec3
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RiaCellDividingTools::createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners,
size_t nx,
size_t ny,
size_t nz )
std::vector<cvf::Vec3d>
RiaCellDividingTools::createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners, size_t nx, size_t ny, size_t nz )
{
std::array<std::pair<size_t, size_t>, 12> edgeCorners = {
std::make_pair( 0, 1 ),

View File

@ -576,8 +576,7 @@ caf::ColorTable RiaColorTables::createBrightnessBasedColorTable( cvf::Color3ub b
for ( int i = 0; i < brightnessLevelCount; ++i )
{
float brightness = static_cast<float>( i ) / static_cast<float>( brightnessLevelCount - 1 );
colors.push_back(
cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
colors.push_back( cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
}
}
return caf::ColorTable( colors );

View File

@ -29,7 +29,8 @@
/// Uses W3.org relative luminance calculation taking into account the different luminance of the different colors
/// https://www.w3.org/TR/WCAG20-TECHS/G18.html
/// Luminance is between [0, 1] so anything above 0.5 is considered in the bright half of the spectrum.
/// However, subjectively the contrast looks better if the threshold is to 0.4 so black contrast is used a bit more often.
/// However, subjectively the contrast looks better if the threshold is to 0.4 so black contrast is used a bit more
/// often.
//--------------------------------------------------------------------------------------------------
bool RiaColorTools::isBrightnessAboveThreshold( cvf::Color3f backgroundColor )
{

View File

@ -47,9 +47,8 @@ public:
bool includePositiveValuesOnly );
template <typename T>
static void getValuesByIntervals( const std::vector<T>& values,
const CurveIntervals& intervals,
std::vector<T>* filteredValues )
static void
getValuesByIntervals( const std::vector<T>& values, const CurveIntervals& intervals, std::vector<T>* filteredValues )
{
CVF_ASSERT( filteredValues );

View File

@ -44,8 +44,7 @@ QDateTime RiaDateStringParser::parseDateString( const std::string& dateString )
if ( hasSeparators( dateString ) )
{
parsedOk = tryParseYearFirst( dateString, year, month, day ) ||
tryParseDayFirst( dateString, year, month, day ) ||
tryParseMonthFirst( dateString, year, month, day );
tryParseDayFirst( dateString, year, month, day ) || tryParseMonthFirst( dateString, year, month, day );
}
if ( !parsedOk )
{

View File

@ -42,8 +42,7 @@ RigEclipseWellLogExtractor* RiaExtractionTools::wellLogExtractorEclipseCase( Rim
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( RimWellPath* wellPath,
RimGeoMechCase* geomCase )
RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase )
{
auto wlPlotCollection = wellLogPlotCollection();
if ( !wlPlotCollection ) return nullptr;

View File

@ -37,8 +37,7 @@ namespace RiaExtractionTools
RigEclipseWellLogExtractor* wellLogExtractorEclipseCase( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
RigGeoMechWellLogExtractor* wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase );
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell,
const RigWellPath* wellPathGeom );
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
RimWellLogPlotCollection* wellLogPlotCollection();

View File

@ -55,9 +55,7 @@ void RiaImageFileCompare::reset()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::runComparison( const QString& imgFileName,
const QString& refFileName,
const QString& diffFileName )
bool RiaImageFileCompare::runComparison( const QString& imgFileName, const QString& refFileName, const QString& diffFileName )
{
reset();
@ -73,10 +71,8 @@ bool RiaImageFileCompare::runComparison( const QString& imgFileName,
// The ImageMagick compare tool on RedHat 5 does not support the lowlight-color options
// Use GCC version as a crude mechanism for disabling use of this option on RedHat5
#if ( __GNUC__ == 4 && __GNUC_MINOR__ <= 1 )
QString args = QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" )
.arg( imgFileName )
.arg( refFileName )
.arg( ( diffFileName ) );
QString args =
QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" ).arg( imgFileName ).arg( refFileName ).arg( ( diffFileName ) );
#else
QString args = QString( "-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"" )
.arg( imgFileName )

View File

@ -107,22 +107,21 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil
// Import summary cases
if ( !summaryFileInfos.empty() )
{
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
? project->activeOilField()->summaryCaseMainCollection()
: nullptr;
RimSummaryCaseMainCollection* sumCaseColl =
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if ( sumCaseColl )
{
std::vector<RimSummaryCase*> newSumCases = sumCaseColl->createSummaryCasesFromFileInfos( summaryFileInfos );
for ( RimSummaryCase* newSumCase : newSumCases )
{
RimSummaryCaseCollection* existingCollection = nullptr;
QString gridCaseFile = RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile(
newSumCase->summaryHeaderFilename() );
QString gridCaseFile =
RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile( newSumCase->summaryHeaderFilename() );
RimEclipseCase* gridCase = project->eclipseCaseFromGridFileName( gridCaseFile );
if ( gridCase )
{
RimSummaryCase* existingSummaryCase = sumCaseColl->findSummaryCaseFromFileName(
newSumCase->summaryHeaderFilename() );
RimSummaryCase* existingSummaryCase =
sumCaseColl->findSummaryCaseFromFileName( newSumCase->summaryHeaderFilename() );
RimGridSummaryCase* existingGridSummaryCase = dynamic_cast<RimGridSummaryCase*>( existingSummaryCase );
RimFileSummaryCase* existingFileSummaryCase = dynamic_cast<RimFileSummaryCase*>( existingSummaryCase );
if ( existingGridSummaryCase )
@ -451,8 +450,7 @@ bool RiaImportEclipseCaseTools::addEclipseCases( const QStringList& fil
project->activeOilField()->analysisModels()->updateConnectedEditors();
if ( RiaGuiApplication::isRunning() && gridCaseGroup &&
gridCaseGroup->statisticsCaseCollection()->reservoirs.size() > 0 )
if ( RiaGuiApplication::isRunning() && gridCaseGroup && gridCaseGroup->statisticsCaseCollection()->reservoirs.size() > 0 )
{
RiuMainWindow::instance()->selectAsCurrentItem( gridCaseGroup->statisticsCaseCollection()->reservoirs[0] );
}

View File

@ -68,8 +68,7 @@ void RiaProjectModifier::setReplaceSourceCasesFirstOccurrence( const std::vector
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaProjectModifier::setReplaceSourceCasesById( int caseGroupIdToReplace,
const std::vector<QString>& newGridFileNames )
void RiaProjectModifier::setReplaceSourceCasesById( int caseGroupIdToReplace, const std::vector<QString>& newGridFileNames )
{
if ( caseGroupIdToReplace >= 0 )
{

View File

@ -174,9 +174,8 @@ void RiaRegressionTestRunner::runRegressionTest()
{
QDir testCaseFolder( folderFileInfo.filePath() );
bool anyCommandFilesExecuted = findAndExecuteCommandFiles( testCaseFolder,
regressionTestConfig,
htmlReportFileName );
bool anyCommandFilesExecuted =
findAndExecuteCommandFiles( testCaseFolder, regressionTestConfig, htmlReportFileName );
if ( !anyCommandFilesExecuted )
{

View File

@ -98,8 +98,7 @@ void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( caf
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName(
caf::PdmUiOrdering* uiOrdering,
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( caf::PdmUiOrdering* uiOrdering,
const QString& simWellName,
const caf::PdmField<bool>& branchDetectionField,
const caf::PdmField<int>& branchIndexField )

View File

@ -59,8 +59,7 @@ RiaJCurveCalculator::RiaJCurveCalculator( cvf::Vec3d p1, double azi1, double inc
m_curveStatus = FAILED_RADIUS_TOO_LARGE;
RiaArcCurveCalculator arc( p1, t1, p2 );
if ( arc.curveStatus() == RiaArcCurveCalculator::OK ||
arc.curveStatus() == RiaArcCurveCalculator::OK_STRAIGHT_LINE )
if ( arc.curveStatus() == RiaArcCurveCalculator::OK || arc.curveStatus() == RiaArcCurveCalculator::OK_STRAIGHT_LINE )
{
m_c1 = arc.center();
m_n1 = arc.normal();

View File

@ -63,15 +63,15 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
bool isOk = true;
m_isCalculationOK = true;
Vec3d tq1q2 = ( q2 - q1 ).getNormalized(
&isOk ); // !ok means the control points are in the same place. Could fallback to use only one circle segment + one line.
Vec3d tq1q2 = ( q2 - q1 ).getNormalized( &isOk ); // !ok means the control points are in the same place. Could
// fallback to use only one circle segment + one line.
m_isCalculationOK = m_isCalculationOK && isOk;
Vec3d t1 = ( q1 - p1 ).getNormalized(
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line.
Vec3d t1 = ( q1 - p1 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
// circle segment + one line.
m_isCalculationOK = m_isCalculationOK && isOk;
Vec3d t2 = ( p2 - q2 ).getNormalized(
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line or only one
// straight line if both tangents are missing
Vec3d t2 = ( p2 - q2 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
// circle segment + one line or only one straight line if both
// tangents are missing
m_isCalculationOK = m_isCalculationOK && isOk;
if ( !m_isCalculationOK )
@ -130,8 +130,8 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
m_firstArcEndpoint = q1 + ( q1 - p1 ).length() * tq1q2;
m_secondArcStartpoint = q2 - ( q2 - p2 ).length() * tq1q2;
if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) >
( q2 - q1 ).length() ) // first arc end and second arc start is overlapping
if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) > ( q2 - q1 ).length() ) // first arc end and second arc start
// is overlapping
{
m_ctrlPpointCurveStatus = FAILED_ARC_OVERLAP;
m_isCalculationOK = false;

View File

@ -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();

View File

@ -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 )
{

View File

@ -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 );

View File

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

View File

@ -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 );

View File

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

View File

@ -96,10 +96,8 @@ RicfCommandResponse RicfCreateWellBoreStabilityPlotFeature::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
}
RimWellBoreStabilityPlot* wbsPlot = RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase,
chosenWellPath,
m_timeStep(),
m_wbsParameters() );
RimWellBoreStabilityPlot* wbsPlot =
RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase, chosenWellPath, m_timeStep(), m_wbsParameters() );
RicfCommandResponse response;
response.setResult( new RicfCreateWbsPlotResult( wbsPlot->id() ) );
return response;

View File

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

View File

@ -128,8 +128,8 @@ RicfCommandResponse RicfExportPropertyInViews::execute()
if ( resultAccessor.isNull() )
{
QString warning = QString(
"exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
QString warning =
QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
.arg( m_caseId )
.arg( view->currentTimeStep() )
.arg( propertyName );

View File

@ -102,9 +102,8 @@ 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" )
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() );

View File

@ -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 )
{

View File

@ -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 );

View File

@ -71,8 +71,7 @@ RicfCommandResponse RicfRunOctaveScript::execute()
}
else
{
ok = RiaApplication::instance()
->launchProcessForMultipleCases( octavePath,
ok = RiaApplication::instance()->launchProcessForMultipleCases( octavePath,
processArguments,
caseIds,
RiaApplication::instance()->octaveProcessEnvironment() );

View File

@ -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 )

View File

@ -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 )

View File

@ -85,8 +85,7 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
}
cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS;
cvf::Vec3d horizontalUp = viewCamera->up() -
( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
cvf::Vec3d horizontalUp = viewCamera->up() - ( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
bool isOk = horizontalRight.normalize();
if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0};

View File

@ -88,8 +88,8 @@ void RicEditPreferencesFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
std::unique_ptr<RiaPreferences> RicEditPreferencesFeature::clonePreferences( const RiaPreferences* preferences )
{
caf::PdmObjectHandle* pdmClone = preferences->xmlCapability()->copyByXmlSerialization(
caf::PdmDefaultObjectFactory::instance() );
caf::PdmObjectHandle* pdmClone =
preferences->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() );
return std::unique_ptr<RiaPreferences>( dynamic_cast<RiaPreferences*>( pdmClone ) );
}

View File

@ -97,11 +97,8 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
// Pad with "0" to get a total of two characters defining the sub index text
QString subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
QString lateralName = QString( "%1_%2_Sub%3_Lat%4" )
.arg( wellPath->name() )
.arg( fishboneName )
.arg( subIndexText )
.arg( lateralIndex );
QString lateralName =
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false );
}

View File

@ -96,9 +96,7 @@ public:
bool reportCompletionsTypesIndividually() const;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
protected:
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,

View File

@ -101,7 +101,8 @@ std::vector<RimWellPath*> RicExportCompletionsForVisibleWellPathsFeature::visibl
std::vector<RimWellPath*> wellPaths;
{
auto measurementColl = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
auto measurementColl =
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
if ( measurementColl ) return wellPaths;
}

View File

@ -74,8 +74,8 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
RiaApplication* app = RiaApplication::instance();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
"COMPLETIONS" );
QString defaultDir =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
RicCaseAndFileExportSettingsUi exportSettings;
std::vector<RimCase*> cases;

View File

@ -132,8 +132,8 @@ std::vector<RigCompletionData>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValues(
RimEclipseCase* caseToApply,
std::vector<RigCompletionData>
RicExportFractureCompletionsImpl::generateCompdatValues( RimEclipseCase* caseToApply,
const QString& wellNameForExport,
const RigWellPath* wellPathGeometry,
const std::vector<const RimFracture*>& fractures,
@ -266,8 +266,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
const std::vector<double>* currentMatrixPressures = nullptr;
if ( performPressureDepletionScaling )
{
pressureResultVector = &results->cellScalarResults(
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
pressureResultVector =
&results->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
CVF_ASSERT( !pressureResultVector->empty() );
if ( pdParams.pressureScalingTimeStep < static_cast<int>( pressureResultVector->size() ) )
@ -301,8 +301,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
const RigFractureGrid* fractureGrid = fracTemplate->fractureGrid();
if ( !fractureGrid ) continue;
bool useFiniteConductivityInFracture = ( fracTemplate->conductivityType() ==
RimFractureTemplate::FINITE_CONDUCTIVITY );
bool useFiniteConductivityInFracture =
( fracTemplate->conductivityType() == RimFractureTemplate::FINITE_CONDUCTIVITY );
// If finite cond chosen and conductivity not present in stimplan file, do not calculate trans for this fracture
if ( useFiniteConductivityInFracture && !checkForStimPlanConductivity( fracTemplate, fracture ) )
@ -364,8 +364,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
scaledCondenser.calculateFicticiousFractureToWellTransmissibilities();
// b. Calculate new effective matrix to well transmissibilities
std::map<size_t, double> effectiveMatrixToWellTrans =
scaledCondenser
.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
scaledCondenser.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
fictitiousFractureToWellTransmissibilities );
matrixToWellTrans = effectiveMatrixToWellTrans;
}
@ -461,8 +460,8 @@ void RicExportFractureCompletionsImpl::getWellPressuresAndInitialProductionTimeS
currentDate = caseTimeSteps.back();
}
RifEclipseSummaryAddress wbhpPressureAddress = RifEclipseSummaryAddress::wellAddress( "WBHP",
wellPathName.toStdString() );
RifEclipseSummaryAddress wbhpPressureAddress =
RifEclipseSummaryAddress::wellAddress( "WBHP", wellPathName.toStdString() );
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
if ( mainCollection )
{
@ -532,8 +531,7 @@ bool RicExportFractureCompletionsImpl::checkForStimPlanConductivity( const RimFr
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities(
const RigFractureGrid* fractureGrid,
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities( const RigFractureGrid* fractureGrid,
double cDarcyInCorrectUnit,
RigTransmissibilityCondenser& transCondenser )
{
@ -599,8 +597,7 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities(
const RimFractureTemplate* fracTemplate,
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
const RigFractureGrid* fractureGrid,
const RimFracture* fracture,
double cDarcyInCorrectUnit,
@ -627,9 +624,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
cDarcyInCorrectUnit );
transCondenser.addNeighborTransmissibility( {true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
{false,
RigTransmissibilityCondenser::CellAddress::STIMPLAN,
wellCellIndex},
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex},
radialTrans );
}
else if ( fracTemplate->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
@ -653,8 +648,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
if ( intersection.hlength > 0.0 || intersection.vlength > 0.0 )
{
linearTrans =
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell
.getConductivityValue(),
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell.getConductivityValue(),
fractureWellCell.cellSizeX(),
fractureWellCell.cellSizeZ(),
intersection.vlength,
@ -677,8 +671,8 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities(
RigTransmissibilityCondenser& transCondenser )
std::map<size_t, double>
RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser )
{
std::map<size_t, double> matrixToWellTransmissibilities;
@ -687,10 +681,9 @@ std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWell
{
if ( externalCell.m_cellIndexSpace == RigTransmissibilityCondenser::CellAddress::ECLIPSE )
{
double trans = transCondenser.condensedTransmissibility( externalCell,
{true,
RigTransmissibilityCondenser::CellAddress::WELL,
1} );
double trans =
transCondenser.condensedTransmissibility( externalCell,
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1} );
if ( trans > transCondenser.transmissibilityThreshold() )
{
@ -738,8 +731,7 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
const RimFracture* fracture,
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters( const RimFracture* fracture,
std::vector<RigCompletionData>& allCompletionsForOneFracture )
{
double dFactorForFracture = fracture->nonDarcyProperties().dFactor;
@ -763,8 +755,7 @@ void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RicExportFractureCompletionsImpl::sumUpTransmissibilities(
const std::vector<RigCompletionData>& allCompletionsForOneFracture )
double RicExportFractureCompletionsImpl::sumUpTransmissibilities( const std::vector<RigCompletionData>& allCompletionsForOneFracture )
{
double transmissibility = 0.0;
for ( const auto& c : allCompletionsForOneFracture )

View File

@ -92,12 +92,13 @@ std::vector<RigCompletionData>
return completionData;
}
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone lateral
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone
// lateral
findFishboneLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
RiaDefines::MATRIX_MODEL );
const RigActiveCellInfo* activeCellInfo =
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
for ( const auto& cellAndWellBoreParts : wellBorePartsInCells )
{
@ -237,8 +238,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
}
{
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for fishbones
// defined by ResInsight. It is not trivial to define the open section of the main bore for imported laterals.
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for
// fishbones defined by ResInsight. It is not trivial to define the open section of the main bore for imported
// laterals.
if ( wellPath->fishbonesCollection()->isChecked() )
{
@ -302,7 +304,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
for ( const auto& cellIntersectionInfo : intersectedCells )
{
QString completionMetaData = fishbonesPath->name();
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
WellBorePartForTransCalc wellBorePart =
WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
holeRadius,
skinFactor,
isMainBore,

View File

@ -48,8 +48,8 @@ private:
const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings );
static void findFishboneImportedLateralsWellBoreParts(
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
static void
findFishboneImportedLateralsWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
const RimWellPath* wellPath,
const RicExportCompletionDataSettingsUi& settings );

View File

@ -24,9 +24,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicMswCompletion::RicMswCompletion( const QString& label,
size_t index /* = cvf::UNDEFINED_SIZE_T */,
int branchNumber /*= 0*/ )
RicMswCompletion::RicMswCompletion( const QString& label, size_t index /* = cvf::UNDEFINED_SIZE_T */, int branchNumber /*= 0*/ )
: m_label( label )
, m_index( index )
, m_branchNumber( branchNumber )

View File

@ -56,8 +56,8 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
{
RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
"COMPLETIONS" );
QString defaultDir =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();

View File

@ -107,8 +107,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
else
{
int caseId = exportSettings.caseToApply->caseId();
QString format = QString(
"Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
QString format =
QString( "Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
RiaLogging::error( errMsg );
}
@ -142,16 +142,16 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
}
else
{
fractureTransmissibilityExportInformationStream = std::unique_ptr<QTextStream>(
new QTextStream( &fractureTransmissibilityExportInformationFile ) );
fractureTransmissibilityExportInformationStream =
std::unique_ptr<QTextStream>( new QTextStream( &fractureTransmissibilityExportInformationFile ) );
}
}
size_t maxProgress = usedWellPaths.size() * 3 + simWells.size() +
size_t maxProgress =
usedWellPaths.size() * 3 + simWells.size() +
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
? usedWellPaths.size()
: exportSettings.fileSplit ==
RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
? usedWellPaths.size() * 3
: 1 ) +
simWells.size();
@ -437,18 +437,16 @@ std::vector<RigCompletionData>
exportSettings.includeFractures = true;
{
std::vector<RigCompletionData> completionData = RicFishbonesTransmissibilityCalculationFeatureImp::
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath, exportSettings );
std::vector<RigCompletionData> completionData =
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath,
exportSettings );
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
}
{
std::vector<RigCompletionData> completionData =
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath,
eclipseCase,
nullptr,
nullptr );
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath, eclipseCase, nullptr, nullptr );
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
}
@ -591,8 +589,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEclipseDoes( settings.caseToApply(),
skinfactor,
wellBoreDiameter / 2,
cellIndexIJK
.globalCellIndex(),
cellIndexIJK.globalCellIndex(),
cellDirection );
double wpimult = combinedTrans / transmissibilityEclipseCalculation;
@ -810,8 +807,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
{
for ( const auto& completion : completionsForLgr.second )
{
const auto wellPath = RicWellPathExportCompletionsFileTools::findWellPathFromExportName(
completion.wellName() );
const auto wellPath =
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
auto item = wellPathToLgrNameMap.find( wellPath );
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
}
@ -821,9 +818,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
{
const RimWellPath* wellPath = wellPathsForLgr.first;
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD = std::make_tuple( std::numeric_limits<double>::max(),
cvf::Vec2i(),
"" );
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD =
std::make_tuple( std::numeric_limits<double>::max(), cvf::Vec2i(), "" );
// Find first LGR-intersection along the well path
@ -884,8 +880,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
{
try
{
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
fileName );
std::shared_ptr<QFile> exportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, fileName );
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
completionsForGrid.insert( std::pair<QString, std::vector<RigCompletionData>>( "", completionsForMainGrid ) );
@ -904,8 +900,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
try
{
QString lgrFileName = fileName + "_LGR";
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
lgrFileName );
std::shared_ptr<QFile> exportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, lgrFileName );
exportWellPathFractureReport( eclipseCase, exportFile, wellPathFractureReportItems );
exportWelspeclToFile( eclipseCase, exportFile, completionsForSubGrids );
@ -965,8 +961,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
if ( gridName.isEmpty() )
{
header =
{RifTextDataTableColumn( "Well" ),
header = {RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
RifTextDataTableColumn( "K1" ),
@ -987,8 +982,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
}
else
{
header =
{RifTextDataTableColumn( "Well" ),
header = {RifTextDataTableColumn( "Well" ),
RifTextDataTableColumn( "LgrName" ),
RifTextDataTableColumn( "I" ),
RifTextDataTableColumn( "J" ),
@ -1167,8 +1161,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
return completionData;
}
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
RiaDefines::MATRIX_MODEL );
const RigActiveCellInfo* activeCellInfo =
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
if ( wellPath->perforationIntervalCollection()->isChecked() )
{
@ -1218,21 +1212,19 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
transmissibility = transmissibilityData.connectionFactor();
if ( nonDarcyParameters->nonDarcyFlowType() ==
RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
{
kh = transmissibilityData.kh();
dFactor = nonDarcyParameters->userDefinedDFactor();
}
else if ( nonDarcyParameters->nonDarcyFlowType() ==
RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
else if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
{
kh = transmissibilityData.kh();
const double effectiveH = transmissibilityData.effectiveH();
const double effectivePermeability = nonDarcyParameters->gridPermeabilityScalingFactor() *
transmissibilityData.effectiveK();
const double effectivePermeability =
nonDarcyParameters->gridPermeabilityScalingFactor() * transmissibilityData.effectiveK();
dFactor = calculateDFactor( settings.caseToApply,
effectiveH,
@ -1418,8 +1410,7 @@ TransmissibilityData
0,
RiaDefines::MATRIX_MODEL,
0,
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
"NTG" ) );
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
if ( ntgAccessObject.notNull() )
{
@ -1450,8 +1441,7 @@ TransmissibilityData
if ( directionForVolumeScaling == CellDirection::DIR_K ) dz = dz / volumeScaleConstant;
}
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() *
latNtg,
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() * latNtg,
permy,
permz,
dy,
@ -1459,8 +1449,7 @@ TransmissibilityData
wellRadius,
skinFactor,
darcy );
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() *
latNtg,
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() * latNtg,
permx,
permz,
dx,
@ -1511,8 +1500,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor( RimEclipseC
0,
RiaDefines::MATRIX_MODEL,
0,
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
"PORO" ) );
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) );
if ( poroAccessObject.notNull() )
{
@ -1607,8 +1595,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
0,
RiaDefines::MATRIX_MODEL,
0,
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
"NTG" ) );
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
ntg = ntgAccessObject->cellScalarGlobIdx( globalCellIndex );
}
@ -1690,8 +1677,8 @@ std::pair<double, cvf::Vec2i>
for ( WellPathCellIntersectionInfo intersection : intersections )
{
size_t gridLocalCellIndex = 0;
const RigGridBase* grid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex,
&gridLocalCellIndex );
const RigGridBase* grid =
mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex, &gridLocalCellIndex );
if ( grid->gridId() == gridId && activeCellInfo->isActive( intersection.globCellIndex ) )
{

View File

@ -96,9 +96,8 @@ private:
class RicWellPathExportCompletionDataFeatureImpl
{
public:
static CellDirection calculateCellMainDirection( RimEclipseCase* eclipseCase,
size_t globalCellIndex,
const cvf::Vec3d& lengthsInCell );
static CellDirection
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
static TransmissibilityData
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
@ -124,9 +123,8 @@ public:
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath,
RimEclipseCase* eclipseCase );
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
RimEclipseCase* eclipseCase,
size_t timeStepIndex );
static std::vector<RigCompletionData>
computeDynamicCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase, size_t timeStepIndex );
static std::vector<RigCompletionData>
generatePerforationsCompdatValues( const RimWellPath* wellPath,
@ -161,8 +159,7 @@ private:
QFilePtr exportFile,
const std::map<QString, std::vector<RigCompletionData>>& completions );
static void
sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
static void sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
const QString& exportFolder,
const QString& fileName,
const std::vector<RigCompletionData>& completions,

View File

@ -91,8 +91,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
{
QString unifiedFileName =
QString( "UnifiedCompletions_MSW_%1" ).arg( exportSettings.caseToApply->caseUserDescription() );
unifiedExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
unifiedFileName );
unifiedExportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, unifiedFileName );
}
for ( const auto& wellPath : wellPaths )
@ -111,8 +111,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
{
QString wellFileName = QString( "%1_UnifiedCompletions_MSW_%2" )
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
unifiedWellPathFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
wellFileName );
unifiedWellPathFile =
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, wellFileName );
}
if ( exportFractures )
@ -124,10 +124,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
fractureExportFile = unifiedWellPathFile;
else
{
QString fileName = QString( "%1_Fracture_MSW_%2" )
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
fractureExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName );
QString fileName =
QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
fractureExportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
}
exportWellSegmentsForFractures( exportSettings.caseToApply,
fractureExportFile,
@ -146,8 +146,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
{
QString fileName = QString( "%1_Perforation_MSW_%2" )
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
perforationsExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName );
perforationsExportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
}
exportWellSegmentsForPerforations( exportSettings.caseToApply,
perforationsExportFile,
@ -165,10 +165,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
fishbonesExportFile = unifiedWellPathFile;
else
{
QString fileName = QString( "%1_Fishbones_MSW_%2" )
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
fishbonesExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName );
QString fileName =
QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
fishbonesExportFile =
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
}
exportWellSegmentsForFishbones( exportSettings.caseToApply,
fishbonesExportFile,
@ -204,8 +204,7 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones(
RimEclipseCase* eclipseCase,
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
std::shared_ptr<QFile> exportFile,
const RimWellPath* wellPath,
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
@ -242,7 +241,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
return;
}
RicMswExportInfo exportInfo = generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
RicMswExportInfo exportInfo =
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
QTextStream stream( exportFile.get() );
RifTextDataTableFormatter formatter( stream );
@ -286,15 +286,16 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
}
{
std::vector<RifTextDataTableColumn> header =
{RifTextDataTableColumn( "First Seg" ),
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "First Seg" ),
RifTextDataTableColumn( "Last Seg" ),
RifTextDataTableColumn( "Branch Num" ),
RifTextDataTableColumn( "Outlet Seg" ),
RifTextDataTableColumn( "Length" ),
RifTextDataTableColumn( "Depth Change" ),
RifTextDataTableColumn( "Diam" ),
RifTextDataTableColumn( "Rough", RifTextDataTableDoubleFormatting( RIF_FLOAT, 7 ) )};
RifTextDataTableColumn( "Rough",
RifTextDataTableDoubleFormatting( RIF_FLOAT,
7 ) )};
formatter.header( header );
}
@ -329,8 +330,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
formatter.add( location->segmentNumber() ).add( location->segmentNumber() );
formatter.add( 1 ); // All segments on main stem are branch 1
formatter.add( location->segmentNumber() -
1 ); // All main stem segments are connected to the segment below them
formatter.add( location->segmentNumber() - 1 ); // All main stem segments are connected to the segment below
// them
formatter.add( length );
formatter.add( depth );
formatter.add( exportInfo.linerDiameter() );
@ -442,8 +443,7 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsSegments(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader(
RifTextDataTableFormatter& formatter,
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter,
RigCompletionData::CompletionType completionType )
{
if ( completionType == RigCompletionData::CT_UNDEFINED )
@ -705,8 +705,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
{
if ( completion->completionType() == RigCompletionData::PERFORATION_AICD )
{
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>(
completion );
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>( completion );
if ( !aicd->isValid() )
{
RiaLogging::error( QString( "Export AICD Valve (%1): Valve is invalid. At least one required "
@ -851,9 +850,8 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
{
double subEndMD = subs->measuredDepth( sub.subIndex );
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
int subSegCount = SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD,
subEndMD,
maxSegmentLength );
int subSegCount =
SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD, subEndMD, maxSegmentLength );
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
double startMd = subStartMD;
@ -874,8 +872,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
if ( ssi == 0 )
{
// Add completion for ICD
std::shared_ptr<RicMswFishbonesICD> icdCompletion(
new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
std::shared_ptr<RicMswFishbonesICD> icdCompletion( new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
std::shared_ptr<RicMswSubSegment> icdSegment(
new RicMswSubSegment( subEndMD, subEndMD + 0.1, subEndTVD, subEndTVD ) );
icdCompletion->setFlowCoefficient( subs->icdFlowCoefficient() );
@ -890,11 +887,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
QString label = QString( "Lateral %1" ).arg( lateralIndex );
location->addCompletion( std::make_shared<RicMswFishbones>( label, lateralIndex ) );
}
assignFishbonesLateralIntersections( caseToApply,
subs,
location,
&foundSubGridIntersections,
maxSegmentLength );
assignFishbonesLateralIntersections( caseToApply, subs, location, &foundSubGridIntersections, maxSegmentLength );
}
exportInfo.addWellSegment( location );
@ -928,8 +921,8 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo(
RimEclipseCase* caseToApply,
RicMswExportInfo
RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* caseToApply,
const RimWellPath* wellPath,
const std::vector<RimWellPathFracture*>& fractures )
{
@ -947,9 +940,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry,
intersections,
maxSegmentLength );
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry, intersections, maxSegmentLength );
double initialMD = 0.0;
if ( wellPath->fractureCollection()->mswParameters()->referenceMDType() ==
@ -988,8 +979,8 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
double endTVD = cellIntInfo.endTVD;
size_t localGridIdx = 0u;
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
&localGridIdx );
const RigGridBase* localGrid =
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
QString gridName;
if ( localGrid != grid )
{
@ -1122,10 +1113,8 @@ std::vector<SubSegmentIntersectionInfo>
}
}
std::vector<WellPathCellIntersectionInfo> filteredIntersections = filterIntersections( intersections,
initialMD,
wellPathGeometry,
eclipseCase );
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
filterIntersections( intersections, initialMD, wellPathGeometry, eclipseCase );
const double maxSegmentLength = wellPath->perforationIntervalCollection()->mswParameters()->maxSegmentLength();
@ -1137,8 +1126,8 @@ std::vector<SubSegmentIntersectionInfo>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::filterIntersections(
const std::vector<WellPathCellIntersectionInfo>& intersections,
std::vector<WellPathCellIntersectionInfo>
RicWellPathExportMswCompletionsImpl::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
double initialMD,
const RigWellPath* wellPathGeometry,
const RimEclipseCase* eclipseCase )
@ -1160,8 +1149,8 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::f
extraIntersection.startMD = initialMD;
extraIntersection.endMD = firstIntersection.startMD;
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
extraIntersection.intersectedCellFaceOut = cvf::StructGridInterface::oppositeFace(
firstIntersection.intersectedCellFaceIn );
extraIntersection.intersectedCellFaceOut =
cvf::StructGridInterface::oppositeFace( firstIntersection.intersectedCellFaceIn );
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
filteredIntersections.push_back( extraIntersection );
@ -1236,11 +1225,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
if ( segmentLength > segmentLengthThreshold )
{
QString label = QString( "Main stem segment %1" ).arg( mainBoreSegments.size() + 2 );
std::shared_ptr<RicMswSegment> segment( new RicMswSegment( label,
cellIntInfo.startMD,
cellIntInfo.endMD,
cellIntInfo.startTVD,
cellIntInfo.endTVD ) );
std::shared_ptr<RicMswSegment> segment(
new RicMswSegment( label, cellIntInfo.startMD, cellIntInfo.endMD, cellIntInfo.startTVD, cellIntInfo.endTVD ) );
for ( const RimPerforationInterval* interval : perforationIntervals )
{
@ -1250,10 +1236,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
if ( overlap > 0.0 )
{
std::shared_ptr<RicMswCompletion> intervalCompletion( new RicMswPerforation( interval->name() ) );
std::vector<RigCompletionData> completionData = generatePerforationIntersections( wellPath,
interval,
timeStep,
eclipseCase );
std::vector<RigCompletionData> completionData =
generatePerforationIntersections( wellPath, interval, timeStep, eclipseCase );
assignPerforationIntersections( completionData,
intervalCompletion,
cellIntInfo,
@ -1267,9 +1251,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
}
else
{
QString text = QString( "Skipping segment , threshold = %1, length = %2" )
.arg( segmentLengthThreshold )
.arg( segmentLength );
QString text =
QString( "Skipping segment , threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( segmentLength );
RiaLogging::info( text );
}
}
@ -1353,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
}
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) )
{
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
@ -1361,7 +1345,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
}
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) )
{
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
std::shared_ptr<RicMswSubSegment> subSegment(
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
@ -1651,9 +1636,7 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
pathGeometry.m_wellPathPoints = lateralCoords;
pathGeometry.m_measuredDepths = lateralMDs;
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry,
intersections,
maxSegmentLength );
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry, intersections, maxSegmentLength );
double previousExitMD = lateralMDs.front();
double previousExitTVD = -lateralCoords.front().z();
@ -1661,8 +1644,8 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
for ( const auto& cellIntInfo : subSegIntersections )
{
size_t localGridIdx = 0u;
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
&localGridIdx );
const RigGridBase* localGrid =
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
QString gridName;
if ( localGrid != grid )
{
@ -1728,8 +1711,8 @@ void RicWellPathExportMswCompletionsImpl::assignFractureIntersections( const Rim
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicWellPathExportMswCompletionsImpl::generatePerforationIntersections(
const RimWellPath* wellPath,
std::vector<RigCompletionData>
RicWellPathExportMswCompletionsImpl::generatePerforationIntersections( const RimWellPath* wellPath,
const RimPerforationInterval* perforationInterval,
int timeStep,
RimEclipseCase* eclipseCase )

View File

@ -146,8 +146,7 @@ private:
std::shared_ptr<RicMswSegment> location,
bool* foundSubGridIntersections );
static std::vector<RigCompletionData>
generatePerforationIntersections( const RimWellPath* wellPath,
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
const RimPerforationInterval* perforationInterval,
int timeStep,
RimEclipseCase* eclipseCase );

View File

@ -531,9 +531,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
floatNumberColumn( "LPerf" ),
floatNumberColumn( "PerfEff" ),
floatNumberColumn( "Wdia" ),
RifTextDataTableColumn( "Dfac",
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ),
RIGHT ),
RifTextDataTableColumn( "Dfac", RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ), RIGHT ),
};
formatter.header( header );

View File

@ -54,8 +54,7 @@ private:
QString createFracturePressureDepletionSummaryText(
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
QString createConnectionsPerWellText(
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
QString createConnectionsPerWellText( const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
void configureFormatter( RifTextDataTableFormatter* formatter ) const;
};

View File

@ -54,8 +54,8 @@ void RicAppendSeparateIntersectionResultFeature::onActionTriggered( bool isCheck
CVF_ASSERT( intersectionResCollection );
RicAppendSeparateIntersectionResultFeatureCmd* cmd = new RicAppendSeparateIntersectionResultFeatureCmd(
intersectionResCollection );
RicAppendSeparateIntersectionResultFeatureCmd* cmd =
new RicAppendSeparateIntersectionResultFeatureCmd( intersectionResCollection );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}

View File

@ -30,8 +30,7 @@ class RimIntersectionResultsDefinitionCollection;
class RicAppendSeparateIntersectionResultFeatureCmd : public caf::CmdExecuteCommand
{
public:
explicit RicAppendSeparateIntersectionResultFeatureCmd(
RimIntersectionResultsDefinitionCollection* intersectionCollection );
explicit RicAppendSeparateIntersectionResultFeatureCmd( RimIntersectionResultsDefinitionCollection* intersectionCollection );
~RicAppendSeparateIntersectionResultFeatureCmd() override;
QString name() override;

View File

@ -63,8 +63,8 @@ void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !activeView ) return;
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
activeView->intersectionCollection() );
RicNewAzimuthDipIntersectionFeatureCmd* cmd =
new RicNewAzimuthDipIntersectionFeatureCmd( activeView->intersectionCollection() );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}
@ -80,8 +80,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook( QAction* actionToSetu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(
RimIntersectionCollection* intersectionCollection )
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd( RimIntersectionCollection* intersectionCollection )
: CmdExecuteCommand( nullptr )
, m_intersectionCollection( intersectionCollection )
{

View File

@ -62,8 +62,8 @@ void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( !activeView ) return;
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
activeView->intersectionCollection() );
RicNewPolylineIntersectionFeatureCmd* cmd =
new RicNewPolylineIntersectionFeatureCmd( activeView->intersectionCollection() );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}

View File

@ -60,8 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
RimProject* proj = RiaApplication::instance()->project();
CVF_ASSERT( proj );
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels()
: nullptr;
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
if ( analysisModels )
{

View File

@ -74,9 +74,9 @@ void RicEclipseHideFaultFeature::onActionTriggered( bool isChecked )
size_t currentCellIndex = static_cast<size_t>( list[0].toULongLong() );
int currentFaceIndex = list[1].toInt();
const RigFault* fault = eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
cvf::StructGridInterface::FaceType(
currentFaceIndex ) );
const RigFault* fault =
eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
cvf::StructGridInterface::FaceType( currentFaceIndex ) );
if ( fault )
{
QString faultName = fault->name();

View File

@ -37,7 +37,8 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterInsertFeature, "RicEclipsePropertyF
//--------------------------------------------------------------------------------------------------
bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
{
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
std::vector<RimEclipsePropertyFilter*> propertyFilters =
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
if ( propertyFilters.size() == 1 )
{
return RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( propertyFilters[0] );
@ -51,7 +52,8 @@ bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicEclipsePropertyFilterInsertFeature::onActionTriggered( bool isChecked )
{
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
std::vector<RimEclipsePropertyFilter*> propertyFilters =
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
if ( propertyFilters.size() == 1 )
{
RicEclipsePropertyFilterInsertExec* filterExec = new RicEclipsePropertyFilterInsertExec( propertyFilters[0] );

View File

@ -69,8 +69,8 @@ void RicEclipsePropertyFilterNewInViewFeature::onActionTriggered( bool isChecked
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
if ( !eclView ) return;
RicEclipsePropertyFilterNewExec* filterExec = new RicEclipsePropertyFilterNewExec(
eclView->eclipsePropertyFilterCollection() );
RicEclipsePropertyFilterNewExec* filterExec =
new RicEclipsePropertyFilterNewExec( eclView->eclipsePropertyFilterCollection() );
caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec );
}

View File

@ -86,8 +86,8 @@ void RicAdvancedSnapshotExportFeature::onActionTriggered( bool isChecked )
}
{
QString fallbackFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
"snapshots" );
QString fallbackFolderName =
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
QString folderName =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "ADVANCED_SNAPSHOT_EXPORT",
fallbackFolderName );
@ -157,8 +157,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
if ( geomCase && sourceGeoMechView )
{
RimGeoMechView* copyOfGeoMechView = dynamic_cast<RimGeoMechView*>(
sourceGeoMechView->xmlCapability()->copyByXmlSerialization(
caf::PdmDefaultObjectFactory::instance() ) );
sourceGeoMechView->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( copyOfGeoMechView );
geomCase->geoMechViews().push_back( copyOfGeoMechView );

View File

@ -48,9 +48,7 @@ private:
caf::PdmUiEditorAttribute* attribute ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void clampValues();

View File

@ -86,13 +86,7 @@ bool RicEclipseCellResultToFileImpl::writeBinaryResultToTextFile( const QString&
return false;
}
return writeResultToTextFile( fileName,
eclipseCase,
resultAccessor.p(),
eclipseKeyword,
undefinedValue,
logPrefix,
errorMsg );
return writeResultToTextFile( fileName, eclipseCase, resultAccessor.p(), eclipseKeyword, undefinedValue, logPrefix, errorMsg );
}
//--------------------------------------------------------------------------------------------------

View File

@ -56,9 +56,7 @@ private:
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,

View File

@ -97,9 +97,8 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
const RicExportEclipseSectorModelUi& exportSettings,
const QString& logPrefix )
{
int resultProgressPercentage = exportSettings.exportParameters()
? std::min( (int)exportSettings.selectedKeywords().size(), 20 )
: 0;
int resultProgressPercentage =
exportSettings.exportParameters() ? std::min( (int)exportSettings.selectedKeywords().size(), 20 ) : 0;
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 0;

View File

@ -47,9 +47,7 @@ void RicExportEclipseSectorModelUi::ResultExportOptionsEnum::setUp()
{
addItem( RicExportEclipseSectorModelUi::EXPORT_NO_RESULTS, "NO_RESULTS", "Do not export" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_GRID_FILE, "TO_GRID_FILE", "Append to grid file" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE,
"TO_SINGLE_RESULT_FILE",
"Export to single file" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE, "TO_SINGLE_RESULT_FILE", "Export to single file" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SEPARATE_FILE_PER_RESULT,
"TO_SEPARATE_RESULT_FILES",
"Export to a separate file per parameter" );
@ -235,9 +233,7 @@ void RicExportEclipseSectorModelUi::defineEditorAttribute( const caf::PdmFieldHa
if ( !m_caseData ) return;
const RigMainGrid* mainGrid = m_caseData->mainGrid();
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ),
int( mainGrid->cellCountJ() ),
int( mainGrid->cellCountK() ) );
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ), int( mainGrid->cellCountJ() ), int( mainGrid->cellCountK() ) );
caf::PdmUiLineEditorAttribute* lineEditorAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
@ -521,8 +517,8 @@ QString RicExportEclipseSectorModelUi::defaultFolder() const
if ( fallbackDirectory.isEmpty() )
{
QString generalFallback = RiaApplication::instance()->lastUsedDialogDirectory( "GENERAL_DATA" );
fallbackDirectory = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID",
generalFallback );
fallbackDirectory =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID", generalFallback );
}
return RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "EXPORT_INPUT_GRID", fallbackDirectory );
}

View File

@ -105,9 +105,7 @@ protected:
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;

View File

@ -434,9 +434,7 @@ void RicExportLgrFeature::exportLgrsForWellPaths( const QString&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportLgrFeature::exportLgrs( const QString& exportFolder,
const QString& wellName,
const std::vector<LgrInfo>& lgrInfos )
void RicExportLgrFeature::exportLgrs( const QString& exportFolder, const QString& wellName, const std::vector<LgrInfo>& lgrInfos )
{
if ( !lgrInfos.empty() )
{
@ -477,11 +475,8 @@ std::vector<LgrInfo>
{
for ( const auto& wellPath : wellPaths )
{
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
wellPath,
timeStep,
completionTypes,
&isIntersectingOtherLgrs );
auto intersectingCells =
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
auto newLgrs = buildLgrsPerMainCell( firstLgrId + (int)lgrs.size(),
eclipseCase,
wellPath,
@ -515,11 +510,8 @@ std::vector<LgrInfo>
int lgrId = firstLgrId + (int)lgrs.size();
auto lgrName = lgrNameFactory.newName( "WELL", lgrId );
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
wellPath,
timeStep,
completionTypes,
&isIntersectingOtherLgrs );
auto intersectingCells =
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
lgrs.push_back( buildLgr( lgrId, lgrName, eclipseCase, wellPath->name(), intersectingCells, lgrCellCounts ) );
if ( isIntersectingOtherLgrs ) wellsIntersectingOtherLgrs->push_back( wellPath->name() );
@ -610,12 +602,8 @@ std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerCompletion(
for ( auto complInfo : occupiedBbs )
{
auto lgrName = lgrNameFactory.newName( complInfo.first.type );
lgrs.push_back( buildLgr( lgrId++,
lgrName,
eclipseCase,
complInfo.first.wellPathName,
complInfo.second,
lgrSizesPerMainGridCell ) );
lgrs.push_back(
buildLgr( lgrId++, lgrName, eclipseCase, complInfo.first.wellPathName, complInfo.second, lgrSizesPerMainGridCell ) );
}
return lgrs;
}
@ -713,8 +701,7 @@ std::vector<RigCompletionDataGridCell>
///
//--------------------------------------------------------------------------------------------------
std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion(
RimEclipseCase* eclipseCase,
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion( RimEclipseCase* eclipseCase,
const std::vector<RimWellPath*>& wellPaths,
size_t timeStep,
const std::set<RigCompletionData::CompletionType>& completionTypes,

View File

@ -68,9 +68,7 @@ private:
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,

View File

@ -43,10 +43,8 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT;
static void handleAction( const std::vector<RimWellPath*>& wellPaths );
static void exportWellPath( const RimWellPath* wellPath,
double mdStepSize,
const QString& folder,
bool writeProjectInfo = true );
static void
exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
static RicExportWellPathsUi* openDialog();
static QFilePtr openFileForExport( const QString& folderName, const QString& fileName );

View File

@ -141,8 +141,8 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
std::vector<RimWellLogCurve*> curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves();
if ( curves.size() == 0 ) return;
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
"WELL_LOGS_DIR" );
QString defaultDir =
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "WELL_LOGS_DIR" );
RigLasFileExporter lasExporter( curves );
RicExportToLasFileResampleUi featureUi;

View File

@ -106,8 +106,7 @@ void RicExportToLasFileResampleUi::tvdrkbDiffForWellPaths( std::vector<double>*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames,
const std::vector<double>& rkbDiffs )
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs )
{
for ( size_t i = 0; i < wellNames.size(); i++ )
{
@ -212,8 +211,8 @@ void RicExportToLasFileResampleUi::defineUiOrdering( QString uiConfigName, caf::
caf::PdmUiGroup* tvdrkbGroup = uiOrdering.addNewGroup( "TVDRKB" );
tvdrkbGroup->add( &exportTvdrkb );
caf::PdmUiGroup* group = tvdrkbGroup->addNewGroup(
"Difference between TVDRKB and TVDMSL, clear diff for no export" );
caf::PdmUiGroup* group =
tvdrkbGroup->addNewGroup( "Difference between TVDRKB and TVDMSL, clear diff for no export" );
for ( auto& obj : m_tvdrkbOffsets )
{
group->add( &obj->tvdrkbOffset );

View File

@ -69,9 +69,7 @@ public:
void setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs );
void setUnitConversionOptionEnabled( bool enabled );
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;

View File

@ -46,9 +46,7 @@ CAF_CMD_SOURCE_INIT( RicExportVisibleWellPathsFeature, "RicExportVisibleWellPath
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath,
double mdStepSize,
const QString& folder )
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder )
{
auto geom = wellPath->wellPathGeometry();
double currMd = geom->measureDepths().front() - mdStepSize;

View File

@ -83,8 +83,8 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered( bool isChecked )
// Find input reservoir for this property
RimEclipseCase* eclipseCase = nullptr;
{
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(
inputProperty->parentField()->ownerObject() );
RimEclipseInputPropertyCollection* inputPropertyCollection =
dynamic_cast<RimEclipseInputPropertyCollection*>( inputProperty->parentField()->ownerObject() );
if ( !inputPropertyCollection ) return;
eclipseCase = dynamic_cast<RimEclipseCase*>( inputPropertyCollection->parentField()->ownerObject() );

View File

@ -54,9 +54,7 @@ protected:
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
private:
QString getDefaultExportPath() const;

View File

@ -112,9 +112,8 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
&errMsg );
if ( !isOk )
{
QString fullError = QString( "Failed to exported current result to %1. Error was: %2" )
.arg( exportSettings.fileName )
.arg( errMsg );
QString fullError =
QString( "Failed to exported current result to %1. Error was: %2" ).arg( exportSettings.fileName ).arg( errMsg );
RiaLogging::error( fullError );
}
}

View File

@ -91,8 +91,8 @@ void RicSaveEclipseResultAsInputPropertyFeature::onActionTriggered( bool isCheck
if ( eclipseCellColors )
{
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec = new RicSaveEclipseResultAsInputPropertyExec(
eclipseCellColors );
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec =
new RicSaveEclipseResultAsInputPropertyExec( eclipseCellColors );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cellResultSaveExec );
}
}

View File

@ -136,9 +136,8 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
if ( rigv )
{
QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage();
absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath,
fileName + "_Statistics",
".png" );
absoluteFileName =
caf::Utils::constructFullFileName( absSnapshotPath, fileName + "_Statistics", ".png" );
RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, img );
}
}

View File

@ -63,10 +63,8 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dV
QStringList timeSteps = rimView->ownerCase()->timeStepStrings();
int timeStep = rimView->currentTimeStep();
QString fileName = QString( "%1_%2_%3" )
.arg( rimView->ownerCase()->caseUserDescription() )
.arg( rimView->name() )
.arg( resultName( rimView ) );
QString fileName =
QString( "%1_%2_%3" ).arg( rimView->ownerCase()->caseUserDescription() ).arg( rimView->name() ).arg( resultName( rimView ) );
if ( !timeSteps.empty() )
fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] );

View File

@ -201,10 +201,8 @@ QString RicSnapshotViewToFileFeature::generateSaveFileName( const QString& defau
}
QString defaultAbsFileName = caf::Utils::constructFullFileName( startPath, defaultFileBaseName, ".png" );
QString fileName = QFileDialog::getSaveFileName( nullptr,
tr( "Export to File" ),
defaultAbsFileName,
fileExtensionFilter );
QString fileName =
QFileDialog::getSaveFileName( nullptr, tr( "Export to File" ), defaultAbsFileName, fileExtensionFilter );
if ( !fileName.isEmpty() )
{
// Remember the directory to next time

View File

@ -46,8 +46,8 @@ bool RicAddStoredFlowCharacteristicsPlotFeature::isCommandEnabled()
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
if ( flowPlotColl )
{
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
caf::SelectionManager::instance()->selectedItem() );
RimFlowCharacteristicsPlot* flowCharacteristicsPlot =
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
if ( flowPlotColl->defaultFlowCharacteristicsPlot() == flowCharacteristicsPlot )
{
@ -70,8 +70,8 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
if ( flowPlotColl )
{
RimFlowCharacteristicsPlot* sourceObject = dynamic_cast<RimFlowCharacteristicsPlot*>(
caf::SelectionManager::instance()->selectedItem() );
RimFlowCharacteristicsPlot* sourceObject =
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );

View File

@ -46,8 +46,8 @@ bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled()
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
if ( flowPlotColl )
{
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
caf::SelectionManager::instance()->selectedItem() );
RimWellAllocationPlot* wellAllocationPlot =
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
if ( flowPlotColl->defaultWellAllocPlot() == wellAllocationPlot )
{
@ -70,8 +70,8 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
if ( flowPlotColl )
{
RimWellAllocationPlot* sourceObject = dynamic_cast<RimWellAllocationPlot*>(
caf::SelectionManager::instance()->selectedItem() );
RimWellAllocationPlot* sourceObject =
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );

View File

@ -77,9 +77,8 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
RimProject* project = RiaApplication::instance()->project();
CAF_ASSERT( project );
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
? project->activeOilField()->summaryCaseMainCollection()
: nullptr;
RimSummaryCaseMainCollection* sumCaseColl =
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if ( !sumCaseColl ) return;
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();

View File

@ -101,8 +101,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
// assert(flowDiagSolution);
CVF_ASSERT( flowDiagSolution );
RimFlowDiagSolution::TracerStatusType tracerStatus = flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(),
timeStep );
RimFlowDiagSolution::TracerStatusType tracerStatus =
flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(), timeStep );
if ( !( tracerStatus == RimFlowDiagSolution::INJECTOR || tracerStatus == RimFlowDiagSolution::PRODUCER ) )
{
return;
@ -130,9 +130,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
viewToModify->cellResult()->loadDataAndUpdate();
viewToModify->cellResult()->updateConnectedEditors();
std::vector<QString> tracerNames = findContributingTracerNames( flowDiagSolution,
selectedWell->simWellData(),
timeStep );
std::vector<QString> tracerNames =
findContributingTracerNames( flowDiagSolution, selectedWell->simWellData(), timeStep );
for ( RimSimWellInView* w : viewToModify->wellCollection()->wells() )
{

View File

@ -35,8 +35,8 @@ CAF_CMD_SOURCE_INIT( RicShowContributingWellsFromPlotFeature, "RicShowContributi
//--------------------------------------------------------------------------------------------------
bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
{
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
RiaGuiApplication::instance()->activePlotWindow() );
RimWellAllocationPlot* wellAllocationPlot =
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
if ( wellAllocationPlot ) return true;
@ -48,8 +48,8 @@ bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicShowContributingWellsFromPlotFeature::onActionTriggered( bool isChecked )
{
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
RiaGuiApplication::instance()->activePlotWindow() );
RimWellAllocationPlot* wellAllocationPlot =
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
if ( !wellAllocationPlot ) return;

View File

@ -62,8 +62,8 @@ bool RicShowWellAllocationPlotFeature::isCommandEnabled()
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
if ( !eclView ) return false;
RimSimWellInView* simWellFromWellPath = eclView->wellCollection()->findWell(
wellPathCollection[0]->associatedSimulationWellName() );
RimSimWellInView* simWellFromWellPath =
eclView->wellCollection()->findWell( wellPathCollection[0]->associatedSimulationWellName() );
if ( simWellFromWellPath )
{

View File

@ -117,8 +117,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
// If this is the first fracture, set default result name
if ( fractureCollection->allFractures().empty() )
{
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(
RiaApplication::instance()->activeReservoirView() );
RimEclipseView* activeView =
dynamic_cast<RimEclipseView*>( RiaApplication::instance()->activeReservoirView() );
if ( activeView )
{
activeView->fractureColors()->setDefaultResultName();
@ -220,7 +220,8 @@ void RicCreateMultipleFracturesFeature::onActionTriggered( bool isChecked )
dialogButtonBox->clear();
{
QPushButton* pushButton = dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
QPushButton* pushButton =
dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
QDialogButtonBox::ActionRole );
connect( pushButton, SIGNAL( clicked() ), this, SLOT( slotDeleteAndAppendFractures() ) );
pushButton->setDefault( false );

View File

@ -44,9 +44,7 @@ public:
bool isKLayerContained( int oneBasedK ) const;
private:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;

View File

@ -349,8 +349,8 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
}
else
{
double spacing = std::max( options[i - 1].uiOption->minimumSpacing(),
option.uiOption->minimumSpacing() );
double spacing =
std::max( options[i - 1].uiOption->minimumSpacing(), option.uiOption->minimumSpacing() );
fracMdCandidate = lastFracMd - spacing;
}
@ -358,8 +358,7 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
while ( fracMdCandidate > option.endMd )
{
items.push_back(
LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
items.push_back( LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
lastFracMd = fracMdCandidate;
fracMdCandidate -= option.uiOption->minimumSpacing();
fractureCountForWell++;

View File

@ -93,9 +93,7 @@ public:
private:
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu,
QMenu* menu,
QWidget* fieldEditorWidget ) override;
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;

View File

@ -90,8 +90,7 @@ void RicPasteGridCrossPlotDataSetFeature::setupActionLook( QAction* actionToSetu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>>
RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
{
caf::PdmObjectGroup objectGroup;
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );

View File

@ -46,10 +46,7 @@ void RicHoloLensCreateSessionFeature::onActionTriggered( bool isChecked )
{
RicHoloLensCreateSessionUi createSessionUi;
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(),
&createSessionUi,
"HoloLens - Create Session",
"" );
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(), &createSessionUi, "HoloLens - Create Session", "" );
propertyDialog.resize( QSize( 400, 330 ) );
{

View File

@ -71,8 +71,7 @@ RimGridView* RicHoloLensExportToFolderUi::viewForExport() const
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo>
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly )
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
{
QList<caf::PdmOptionItemInfo> options;

Some files were not shown because too many files have changed in this diff Show More