#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: '' MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1 MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner NamespaceIndentation: Inner
PenaltyBreakAssignment: 130 PenaltyBreakAssignment: 13
PenaltyBreakBeforeFirstCallParameter: 100000 PenaltyBreakBeforeFirstCallParameter: 10000
PenaltyBreakComment: 300 PenaltyBreakComment: 20
PenaltyBreakFirstLessLess: 120 PenaltyBreakFirstLessLess: 12
PenaltyBreakString: 1000 PenaltyBreakString: 100
PenaltyExcessCharacter: 10 PenaltyExcessCharacter: 5
PenaltyReturnTypeOnItsOwnLine: 60 PenaltyReturnTypeOnItsOwnLine: 30
PointerAlignment: Left PointerAlignment: Left
ReflowComments: true ReflowComments: true
SortIncludes: 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. // 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 ) if ( loadAction & PLA_CALCULATE_STATISTICS )
{ {
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ ) 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 /// Add a list of well path file paths (JSON files) to the well path collection
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, QStringList* errorMessages )
QStringList* errorMessages )
{ {
CAF_ASSERT( errorMessages ); CAF_ASSERT( errorMessages );
@ -937,8 +937,8 @@ std::vector<RimWellLogFile*> RiaApplication::addWellLogsToModel( const QList<QSt
m_project->updateConnectedEditors(); m_project->updateConnectedEditors();
} }
std::vector<RimWellLogFile*> wellLogFiles = oilField->wellPathCollection->addWellLogs( wellLogFilePaths, std::vector<RimWellLogFile*> wellLogFiles =
errorMessages ); oilField->wellPathCollection->addWellLogs( wellLogFilePaths, errorMessages );
oilField->wellPathCollection->updateConnectedEditors(); oilField->wellPathCollection->updateConnectedEditors();
@ -1114,7 +1114,8 @@ bool RiaApplication::launchProcess( const QString& program,
stopMonitoringWorkProgress(); 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; return false;
} }

View File

@ -158,9 +158,7 @@ public:
QString pythonPath() const; QString pythonPath() const;
QProcessEnvironment pythonProcessEnvironment() const; QProcessEnvironment pythonProcessEnvironment() const;
bool launchProcess( const QString& program, bool launchProcess( const QString& program, const QStringList& arguments, const QProcessEnvironment& processEnvironment );
const QStringList& arguments,
const QProcessEnvironment& processEnvironment );
bool launchProcessForMultipleCases( const QString& program, bool launchProcessForMultipleCases( const QString& program,
const QStringList& arguments, const QStringList& arguments,
const std::vector<int>& caseIds, 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 // One argument is available, use replace case for first occurrence in the project
std::vector<QString> gridFileNames = readFileListFromTextFile( std::vector<QString> gridFileNames =
cvfqt::Utils::toQString( o.safeValue( 0 ) ) ); readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames ); projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames );
} }
else else
@ -214,9 +214,9 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
size_t optionIdx = 0; size_t optionIdx = 0;
while ( optionIdx < o.valueCount() ) while ( optionIdx < o.valueCount() )
{ {
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 ); const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
std::vector<QString> gridFileNames = readFileListFromTextFile( std::vector<QString> gridFileNames =
cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) ); readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
if ( groupId != -1 && !gridFileNames.empty() ) if ( groupId != -1 && !gridFileNames.empty() )
{ {
@ -258,8 +258,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
if ( cvf::Option o = progOpt->option( "case" ) ) if ( cvf::Option o = progOpt->option( "case" ) )
{ {
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames( QStringList fileNames =
cvfqt::Utils::toQStringList( o.values() ) ); RicImportGeneralDataFeature::fileNamesFromCaseNames( cvfqt::Utils::toQStringList( o.values() ) );
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true ); RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true );
} }

View File

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

View File

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

View File

@ -40,9 +40,7 @@ public:
void clearSelectedResultsFromMemory(); void clearSelectedResultsFromMemory();
protected: protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
const QVariant& oldValue,
const QVariant& newValue ) override;
private: private:
std::vector<RigFemResultAddress> selectedGeoMechResults() const; 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> fontSize = RiaFontCache::FONT_SIZE_8;
caf::AppEnum<RiaFontCache::FontSize> plotFontSize = RiaFontCache::FONT_SIZE_10; caf::AppEnum<RiaFontCache::FontSize> plotFontSize = RiaFontCache::FONT_SIZE_10;
CAF_PDM_InitField( &defaultSceneFontSize, "defaultSceneFontSizePt", fontSize, "Viewer Font Size", "", "", "" ); CAF_PDM_InitField( &defaultSceneFontSize, "defaultSceneFontSizePt", fontSize, "Viewer Font Size", "", "", "" );
CAF_PDM_InitField( &defaultAnnotationFontSize, CAF_PDM_InitField( &defaultAnnotationFontSize, "defaultAnnotationFontSizePt", fontSize, "Annotation Font Size", "", "", "" );
"defaultAnnotationFontSizePt",
fontSize,
"Annotation Font Size",
"",
"",
"" );
CAF_PDM_InitField( &defaultWellLabelFontSize, "defaultWellLabelFontSizePt", fontSize, "Well Label Font Size", "", "", "" ); CAF_PDM_InitField( &defaultWellLabelFontSize, "defaultWellLabelFontSizePt", fontSize, "Well Label Font Size", "", "", "" );
CAF_PDM_InitField( &defaultPlotFontSize, "defaultPlotFontSizePt", plotFontSize, "Plot 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_pageLeftMargin, "pageLeftMargin", defaultMarginSize( m_pageSize() ), "Left Margin", "", "", "" );
CAF_PDM_InitField( &m_pageTopMargin, "pageTopMargin", defaultMarginSize( m_pageSize() ), "Top 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_pageRightMargin, "pageRightMargin", defaultMarginSize( m_pageSize() ), "Right Margin", "", "", "" );
CAF_PDM_InitField( &m_pageBottomMargin, CAF_PDM_InitField( &m_pageBottomMargin, "pageBottomMargin", defaultMarginSize( m_pageSize() ), "Bottom Margin", "", "", "" );
"pageBottomMargin",
defaultMarginSize( m_pageSize() ),
"Bottom Margin",
"",
"",
"" );
caf::AppEnum<RiaFontCache::FontSize> invalidFontSize = RiaFontCache::INVALID; caf::AppEnum<RiaFontCache::FontSize> invalidFontSize = RiaFontCache::INVALID;
CAF_PDM_InitField( &m_defaultSceneFontSize_OBSOLETE, "fontSizeInScene", invalidFontSize, "Viewer Font Size", "", "", "" ); CAF_PDM_InitField( &m_defaultSceneFontSize_OBSOLETE, "fontSizeInScene", invalidFontSize, "Viewer Font Size", "", "", "" );
@ -632,9 +620,9 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::
{ {
for ( auto dateFormat : RiaQDateTimeTools::supportedDateFormats() ) for ( auto dateFormat : RiaQDateTimeTools::supportedDateFormats() )
{ {
QDate exampleDate = QDate( 2019, 8, 16 ); QDate exampleDate = QDate( 2019, 8, 16 );
QString fullDateFormat = RiaQDateTimeTools::dateFormatString( dateFormat, QString fullDateFormat =
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY ); RiaQDateTimeTools::dateFormatString( dateFormat, RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
QString uiText = QString( "%1 (%2)" ).arg( fullDateFormat ).arg( exampleDate.toString( fullDateFormat ) ); QString uiText = QString( "%1 (%2)" ).arg( fullDateFormat ).arg( exampleDate.toString( fullDateFormat ) );
uiText.replace( "AP", "AM/PM" ); uiText.replace( "AP", "AM/PM" );
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( dateFormat ) ) ); options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( dateFormat ) ) );

View File

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

View File

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

View File

@ -91,8 +91,7 @@ void RiaViewRedrawScheduler::updateAndRedrawScheduledViews()
} }
} }
for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end(); for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end(); ++it )
++it )
{ {
if ( *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", "Use --summaryplot -help to show a more detailed help text.\n",
cvf::ProgramOptions::OPTIONAL_MULTI_VALUE ); cvf::ProgramOptions::OPTIONAL_MULTI_VALUE );
progOpt->registerOption( "commandFile", progOpt->registerOption( "commandFile", "<commandfile>", "Execute the command file.", cvf::ProgramOptions::SINGLE_VALUE );
"<commandfile>",
"Execute the command file.",
cvf::ProgramOptions::SINGLE_VALUE );
progOpt->registerOption( "commandFileReplaceCases", progOpt->registerOption( "commandFileReplaceCases",
"[<caseId>] <caseListFile>", "[<caseId>] <caseListFile>",
"Supply list of cases to replace in project, performing command file for each case.", "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, std::vector<cvf::Vec3d>
size_t nx, RiaCellDividingTools::createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners, size_t nx, size_t ny, size_t nz )
size_t ny,
size_t nz )
{ {
std::array<std::pair<size_t, size_t>, 12> edgeCorners = { std::array<std::pair<size_t, size_t>, 12> edgeCorners = {
std::make_pair( 0, 1 ), 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 ) for ( int i = 0; i < brightnessLevelCount; ++i )
{ {
float brightness = static_cast<float>( i ) / static_cast<float>( brightnessLevelCount - 1 ); float brightness = static_cast<float>( i ) / static_cast<float>( brightnessLevelCount - 1 );
colors.push_back( colors.push_back( cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
} }
} }
return caf::ColorTable( colors ); 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 /// 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 /// 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. /// 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 ) bool RiaColorTools::isBrightnessAboveThreshold( cvf::Color3f backgroundColor )
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -55,9 +55,7 @@ void RiaImageFileCompare::reset()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RiaImageFileCompare::runComparison( const QString& imgFileName, bool RiaImageFileCompare::runComparison( const QString& imgFileName, const QString& refFileName, const QString& diffFileName )
const QString& refFileName,
const QString& diffFileName )
{ {
reset(); 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 // 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 // Use GCC version as a crude mechanism for disabling use of this option on RedHat5
#if ( __GNUC__ == 4 && __GNUC_MINOR__ <= 1 ) #if ( __GNUC__ == 4 && __GNUC_MINOR__ <= 1 )
QString args = QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" ) QString args =
.arg( imgFileName ) QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" ).arg( imgFileName ).arg( refFileName ).arg( ( diffFileName ) );
.arg( refFileName )
.arg( ( diffFileName ) );
#else #else
QString args = QString( "-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"" ) QString args = QString( "-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"" )
.arg( imgFileName ) .arg( imgFileName )

View File

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

View File

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

View File

@ -98,11 +98,10 @@ void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( caf
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( caf::PdmUiOrdering* uiOrdering,
caf::PdmUiOrdering* uiOrdering, const QString& simWellName,
const QString& simWellName, const caf::PdmField<bool>& branchDetectionField,
const caf::PdmField<bool>& branchDetectionField, const caf::PdmField<int>& branchIndexField )
const caf::PdmField<int>& branchIndexField )
{ {
if ( RiaSimWellBranchTools::simulationWellBranches( simWellName, true ).size() > 1 ) if ( RiaSimWellBranchTools::simulationWellBranches( simWellName, true ).size() > 1 )
{ {

View File

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

View File

@ -63,15 +63,15 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
bool isOk = true; bool isOk = true;
m_isCalculationOK = true; m_isCalculationOK = true;
Vec3d tq1q2 = ( q2 - q1 ).getNormalized( Vec3d tq1q2 = ( q2 - q1 ).getNormalized( &isOk ); // !ok means the control points are in the same place. Could
&isOk ); // !ok means the control points are in the same place. Could fallback to use only one circle segment + one line. // fallback to use only one circle segment + one line.
m_isCalculationOK = m_isCalculationOK && isOk; m_isCalculationOK = m_isCalculationOK && isOk;
Vec3d t1 = ( q1 - p1 ).getNormalized( Vec3d t1 = ( q1 - p1 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line. // circle segment + one line.
m_isCalculationOK = m_isCalculationOK && isOk; m_isCalculationOK = m_isCalculationOK && isOk;
Vec3d t2 = ( p2 - q2 ).getNormalized( Vec3d t2 = ( p2 - q2 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line or only one // circle segment + one line or only one straight line if both
// straight line if both tangents are missing // tangents are missing
m_isCalculationOK = m_isCalculationOK && isOk; m_isCalculationOK = m_isCalculationOK && isOk;
if ( !m_isCalculationOK ) 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_firstArcEndpoint = q1 + ( q1 - p1 ).length() * tq1q2;
m_secondArcStartpoint = q2 - ( q2 - p2 ).length() * tq1q2; m_secondArcStartpoint = q2 - ( q2 - p2 ).length() * tq1q2;
if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) > if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) > ( q2 - q1 ).length() ) // first arc end and second arc start
( q2 - q1 ).length() ) // first arc end and second arc start is overlapping // is overlapping
{ {
m_ctrlPpointCurveStatus = FAILED_ARC_OVERLAP; m_ctrlPpointCurveStatus = FAILED_ARC_OVERLAP;
m_isCalculationOK = false; 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, void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue, QTextStream& outputStream, bool quoteStrings )
QTextStream& outputStream,
bool quoteStrings )
{ {
QColor qColor = RiaColorTools::toQColor( fieldValue ); QColor qColor = RiaColorTools::toQColor( fieldValue );
QString fieldStringValue = qColor.name(); QString fieldStringValue = qColor.name();

View File

@ -140,8 +140,7 @@ std::vector<RicfCommandObject*> RicfCommandFileReader::readCommands( QTextStream
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicfCommandFileReader::writeCommands( QTextStream& outputStream, void RicfCommandFileReader::writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite )
const std::vector<RicfCommandObject*>& commandsToWrite )
{ {
for ( const auto& cmdObj : commandsToWrite ) for ( const auto& cmdObj : commandsToWrite )
{ {

View File

@ -47,8 +47,7 @@ std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStrin
for ( auto wellPath : allWellPaths ) for ( auto wellPath : allWellPaths )
{ {
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(), auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(), toStringVector( wellPathNames ) );
toStringVector( wellPathNames ) );
if ( !matchedName.isEmpty() ) if ( !matchedName.isEmpty() )
{ {
wellPaths.push_back( wellPath ); wellPaths.push_back( wellPath );

View File

@ -169,7 +169,8 @@ std::vector<RicfCommandObject*>
// //
// The reason for this is based on two requirements // The reason for this is based on two requirements
// 1. Ability to aggregate info from multiple replaceCase() statements in a command file // 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 // during project loading
std::vector<RicfCommandObject*> executableCommands; std::vector<RicfCommandObject*> executableCommands;

View File

@ -117,9 +117,7 @@ RicfCommandResponse RicfCreateLgrForCompletions::execute()
m_timeStep, m_timeStep,
lgrCellCounts, lgrCellCounts,
m_splitType(), m_splitType(),
{RigCompletionData::PERFORATION, {RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
RigCompletionData::FRACTURE,
RigCompletionData::FISHBONES},
&wellsIntersectingOtherLgrs ); &wellsIntersectingOtherLgrs );
feature->updateViews( eclipseCase ); feature->updateViews( eclipseCase );

View File

@ -96,8 +96,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound ); wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
if ( !wellsNotFound.empty() ) if ( !wellsNotFound.empty() )
{ {
QString error = QString( "createMultipleFractures: These well paths were not found: %1" ) QString error =
.arg( wellsNotFound.join( ", " ) ); QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
RiaLogging::error( error ); RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error ); return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
} }
@ -112,7 +112,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
if ( !fractureTemplate ) 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 ); RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error ); return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
} }
@ -187,7 +188,6 @@ RimFractureTemplate* RicfCreateMultipleFractures::fractureTemplateFromId( int te
if ( t->id() == templateId ) return t; if ( t->id() == templateId ) return t;
} }
RiaLogging::error( RiaLogging::error( QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
return nullptr; return nullptr;
} }

View File

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

View File

@ -109,9 +109,7 @@ RicfCommandResponse RicfExportLgrForCompletions::execute()
m_timeStep, m_timeStep,
lgrCellCounts, lgrCellCounts,
m_splitType(), m_splitType(),
{RigCompletionData::PERFORATION, {RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
RigCompletionData::FRACTURE,
RigCompletionData::FISHBONES},
&wellsIntersectingOtherLgrs ); &wellsIntersectingOtherLgrs );
RicfCommandResponse response; RicfCommandResponse response;

View File

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

View File

@ -102,12 +102,11 @@ RicfCommandResponse RicfExportSimWellFractureCompletions::execute()
} }
if ( views.empty() ) if ( views.empty() )
{ {
QString error = QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the "
QString( "case with ID %3" )
"exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the case with ID %3" ) .arg( m_viewId )
.arg( m_viewId ) .arg( m_viewName )
.arg( m_viewName ) .arg( m_caseId() );
.arg( m_caseId() );
RiaLogging::error( error ); RiaLogging::error( error );
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error ); return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
} }

View File

@ -83,8 +83,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
mainWnd->hideAllDockWidgets(); mainWnd->hideAllDockWidgets();
RiaGuiApplication::instance()->processEvents(); RiaGuiApplication::instance()->processEvents();
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( QString absolutePathToSnapshotDir =
RicfCommandFileExecutor::SNAPSHOTS ); RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::SNAPSHOTS );
if ( !m_exportFolder().isEmpty() ) if ( !m_exportFolder().isEmpty() )
{ {
@ -92,8 +92,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
} }
if ( absolutePathToSnapshotDir.isNull() ) if ( absolutePathToSnapshotDir.isNull() )
{ {
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( absolutePathToSnapshotDir =
"snapshots" ); RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
} }
if ( m_type == RicfExportSnapshots::VIEWS || m_type == RicfExportSnapshots::ALL ) 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_performTransScaling, "performTransScaling", false, "Perform Transmissibility Scaling", "", "", "" );
RICF_InitField( &m_transScalingTimeStep, RICF_InitField( &m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step", "", "", "" );
"transScalingTimeStep",
0,
"Transmissibility Scaling Pressure Time Step",
"",
"",
"" );
RICF_InitField( &m_transScalingInitialWBHP, RICF_InitField( &m_transScalingInitialWBHP,
"transScalingWBHPFromSummary", "transScalingWBHPFromSummary",
RicExportCompletionDataSettingsUi::TransScalingWBHPSource(), RicExportCompletionDataSettingsUi::TransScalingWBHPSource(),
@ -89,13 +83,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
"", "",
"", "",
"" ); "" );
RICF_InitField( &m_transScalingWBHP, RICF_InitField( &m_transScalingWBHP, "transScalingWBHP", 200.0, "Transmissibility Scaling Constant WBHP Value", "", "", "" );
"transScalingWBHP",
200.0,
"Transmissibility Scaling Constant WBHP Value",
"",
"",
"" );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -168,8 +156,8 @@ RicfCommandResponse RicfExportWellPathCompletions::execute()
{ {
for ( const QString& wellPathName : m_wellPathNames() ) for ( const QString& wellPathName : m_wellPathNames() )
{ {
RimWellPath* wellPath = RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName( RimWellPath* wellPath =
wellPathName ); RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
if ( wellPath ) if ( wellPath )
{ {
wellPaths.push_back( wellPath ); wellPaths.push_back( wellPath );

View File

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

View File

@ -67,9 +67,8 @@ RicfCommandResponse RicfScaleFractureTemplate::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error ); return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
} }
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty() RimFractureTemplateCollection* templColl =
? project->allFractureTemplateCollections()[0] !project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
: nullptr;
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr; RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
if ( !templ ) if ( !templ )

View File

@ -59,9 +59,8 @@ RicfCommandResponse RicfSetFractureContainment::execute()
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error ); return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
} }
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty() RimFractureTemplateCollection* templColl =
? project->allFractureTemplateCollections()[0] !project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
: nullptr;
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr; RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
if ( !templ ) if ( !templ )

View File

@ -85,8 +85,7 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
} }
cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS; cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS;
cvf::Vec3d horizontalUp = viewCamera->up() - cvf::Vec3d horizontalUp = viewCamera->up() - ( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
bool isOk = horizontalRight.normalize(); bool isOk = horizontalRight.normalize();
if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0}; 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 ) std::unique_ptr<RiaPreferences> RicEditPreferencesFeature::clonePreferences( const RiaPreferences* preferences )
{ {
caf::PdmObjectHandle* pdmClone = preferences->xmlCapability()->copyByXmlSerialization( caf::PdmObjectHandle* pdmClone =
caf::PdmDefaultObjectFactory::instance() ); preferences->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() );
return std::unique_ptr<RiaPreferences>( dynamic_cast<RiaPreferences*>( pdmClone ) ); 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 // 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 subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
QString lateralName = QString( "%1_%2_Sub%3_Lat%4" ) QString lateralName =
.arg( wellPath->name() ) QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
.arg( fishboneName )
.arg( subIndexText )
.arg( lateralIndex );
EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false ); EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false );
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -92,12 +92,13 @@ std::vector<RigCompletionData>
return completionData; 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 ); findFishboneLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings ); findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo( const RigActiveCellInfo* activeCellInfo =
RiaDefines::MATRIX_MODEL ); settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
for ( const auto& cellAndWellBoreParts : wellBorePartsInCells ) 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 // Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for
// defined by ResInsight. It is not trivial to define the open section of the main bore for imported laterals. // fishbones defined by ResInsight. It is not trivial to define the open section of the main bore for imported
// laterals.
if ( wellPath->fishbonesCollection()->isChecked() ) if ( wellPath->fishbonesCollection()->isChecked() )
{ {
@ -302,11 +304,12 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
for ( const auto& cellIntersectionInfo : intersectedCells ) for ( const auto& cellIntersectionInfo : intersectedCells )
{ {
QString completionMetaData = fishbonesPath->name(); QString completionMetaData = fishbonesPath->name();
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS, WellBorePartForTransCalc wellBorePart =
holeRadius, WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
skinFactor, holeRadius,
isMainBore, skinFactor,
completionMetaData ); isMainBore,
completionMetaData );
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD; wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart ); wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );

View File

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

View File

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

View File

@ -54,10 +54,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
const std::vector<RimWellPath*>& wellPaths, const std::vector<RimWellPath*>& wellPaths,
const std::vector<RimSimWellInView*>& simWells ) const std::vector<RimSimWellInView*>& simWells )
{ {
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project(); RimProject* project = app->project();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( QString defaultDir =
"COMPLETIONS" ); RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData(); RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();

View File

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

View File

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

View File

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

View File

@ -146,11 +146,10 @@ private:
std::shared_ptr<RicMswSegment> location, std::shared_ptr<RicMswSegment> location,
bool* foundSubGridIntersections ); bool* foundSubGridIntersections );
static std::vector<RigCompletionData> static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
generatePerforationIntersections( const RimWellPath* wellPath, const RimPerforationInterval* perforationInterval,
const RimPerforationInterval* perforationInterval, int timeStep,
int timeStep, RimEclipseCase* eclipseCase );
RimEclipseCase* eclipseCase );
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData, static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
std::shared_ptr<RicMswCompletion> perforationCompletion, std::shared_ptr<RicMswCompletion> perforationCompletion,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -97,9 +97,8 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
const RicExportEclipseSectorModelUi& exportSettings, const RicExportEclipseSectorModelUi& exportSettings,
const QString& logPrefix ) const QString& logPrefix )
{ {
int resultProgressPercentage = exportSettings.exportParameters() int resultProgressPercentage =
? std::min( (int)exportSettings.selectedKeywords().size(), 20 ) exportSettings.exportParameters() ? std::min( (int)exportSettings.selectedKeywords().size(), 20 ) : 0;
: 0;
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 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_NO_RESULTS, "NO_RESULTS", "Do not export" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_GRID_FILE, "TO_GRID_FILE", "Append to grid file" ); addItem( RicExportEclipseSectorModelUi::EXPORT_TO_GRID_FILE, "TO_GRID_FILE", "Append to grid file" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE, addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE, "TO_SINGLE_RESULT_FILE", "Export to single file" );
"TO_SINGLE_RESULT_FILE",
"Export to single file" );
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SEPARATE_FILE_PER_RESULT, addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SEPARATE_FILE_PER_RESULT,
"TO_SEPARATE_RESULT_FILES", "TO_SEPARATE_RESULT_FILES",
"Export to a separate file per parameter" ); "Export to a separate file per parameter" );
@ -235,9 +233,7 @@ void RicExportEclipseSectorModelUi::defineEditorAttribute( const caf::PdmFieldHa
if ( !m_caseData ) return; if ( !m_caseData ) return;
const RigMainGrid* mainGrid = m_caseData->mainGrid(); const RigMainGrid* mainGrid = m_caseData->mainGrid();
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ), cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ), int( mainGrid->cellCountJ() ), int( mainGrid->cellCountK() ) );
int( mainGrid->cellCountJ() ),
int( mainGrid->cellCountK() ) );
caf::PdmUiLineEditorAttribute* lineEditorAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute ); caf::PdmUiLineEditorAttribute* lineEditorAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
@ -521,8 +517,8 @@ QString RicExportEclipseSectorModelUi::defaultFolder() const
if ( fallbackDirectory.isEmpty() ) if ( fallbackDirectory.isEmpty() )
{ {
QString generalFallback = RiaApplication::instance()->lastUsedDialogDirectory( "GENERAL_DATA" ); QString generalFallback = RiaApplication::instance()->lastUsedDialogDirectory( "GENERAL_DATA" );
fallbackDirectory = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID", fallbackDirectory =
generalFallback ); RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID", generalFallback );
} }
return RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "EXPORT_INPUT_GRID", fallbackDirectory ); return RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "EXPORT_INPUT_GRID", fallbackDirectory );
} }

View File

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

View File

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

View File

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

View File

@ -43,10 +43,8 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT; CAF_CMD_HEADER_INIT;
static void handleAction( const std::vector<RimWellPath*>& wellPaths ); static void handleAction( const std::vector<RimWellPath*>& wellPaths );
static void exportWellPath( const RimWellPath* wellPath, static void
double mdStepSize, exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
const QString& folder,
bool writeProjectInfo = true );
static RicExportWellPathsUi* openDialog(); static RicExportWellPathsUi* openDialog();
static QFilePtr openFileForExport( const QString& folderName, const QString& fileName ); 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(); std::vector<RimWellLogCurve*> curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves();
if ( curves.size() == 0 ) return; if ( curves.size() == 0 ) return;
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( QString defaultDir =
"WELL_LOGS_DIR" ); RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "WELL_LOGS_DIR" );
RigLasFileExporter lasExporter( curves ); RigLasFileExporter lasExporter( curves );
RicExportToLasFileResampleUi featureUi; RicExportToLasFileResampleUi featureUi;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -63,10 +63,8 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dV
QStringList timeSteps = rimView->ownerCase()->timeStepStrings(); QStringList timeSteps = rimView->ownerCase()->timeStepStrings();
int timeStep = rimView->currentTimeStep(); int timeStep = rimView->currentTimeStep();
QString fileName = QString( "%1_%2_%3" ) QString fileName =
.arg( rimView->ownerCase()->caseUserDescription() ) QString( "%1_%2_%3" ).arg( rimView->ownerCase()->caseUserDescription() ).arg( rimView->name() ).arg( resultName( rimView ) );
.arg( rimView->name() )
.arg( resultName( rimView ) );
if ( !timeSteps.empty() ) if ( !timeSteps.empty() )
fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] ); 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 defaultAbsFileName = caf::Utils::constructFullFileName( startPath, defaultFileBaseName, ".png" );
QString fileName = QFileDialog::getSaveFileName( nullptr, QString fileName =
tr( "Export to File" ), QFileDialog::getSaveFileName( nullptr, tr( "Export to File" ), defaultAbsFileName, fileExtensionFilter );
defaultAbsFileName,
fileExtensionFilter );
if ( !fileName.isEmpty() ) if ( !fileName.isEmpty() )
{ {
// Remember the directory to next time // Remember the directory to next time

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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