mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5101 clang-format: Adjusted penalties
Use lower absolute values to improve control of behavior
This commit is contained in:
parent
10f0abc9b5
commit
c82df63e10
@ -52,13 +52,13 @@ MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
PenaltyBreakAssignment: 130
|
||||
PenaltyBreakBeforeFirstCallParameter: 100000
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 10
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PenaltyBreakAssignment: 13
|
||||
PenaltyBreakBeforeFirstCallParameter: 10000
|
||||
PenaltyBreakComment: 20
|
||||
PenaltyBreakFirstLessLess: 12
|
||||
PenaltyBreakString: 100
|
||||
PenaltyExcessCharacter: 5
|
||||
PenaltyReturnTypeOnItsOwnLine: 30
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
|
@ -552,7 +552,8 @@ bool RiaApplication::loadProject( const QString& projectFileName,
|
||||
}
|
||||
|
||||
// If load action is specified to recalculate statistics, do it now.
|
||||
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will be clamped
|
||||
// Apparently this needs to be done before the views are loaded, lest the number of time steps for statistics will
|
||||
// be clamped
|
||||
if ( loadAction & PLA_CALCULATE_STATISTICS )
|
||||
{
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
|
||||
@ -863,8 +864,7 @@ bool RiaApplication::openOdbCaseFromFile( const QString& fileName, bool applyTim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Add a list of well path file paths (JSON files) to the well path collection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths,
|
||||
QStringList* errorMessages )
|
||||
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, QStringList* errorMessages )
|
||||
{
|
||||
CAF_ASSERT( errorMessages );
|
||||
|
||||
@ -937,8 +937,8 @@ std::vector<RimWellLogFile*> RiaApplication::addWellLogsToModel( const QList<QSt
|
||||
m_project->updateConnectedEditors();
|
||||
}
|
||||
|
||||
std::vector<RimWellLogFile*> wellLogFiles = oilField->wellPathCollection->addWellLogs( wellLogFilePaths,
|
||||
errorMessages );
|
||||
std::vector<RimWellLogFile*> wellLogFiles =
|
||||
oilField->wellPathCollection->addWellLogs( wellLogFilePaths, errorMessages );
|
||||
|
||||
oilField->wellPathCollection->updateConnectedEditors();
|
||||
|
||||
@ -1114,7 +1114,8 @@ bool RiaApplication::launchProcess( const QString& program,
|
||||
|
||||
stopMonitoringWorkProgress();
|
||||
|
||||
// QMessageBox::warning(m_mainWindow, "Script execution", "Failed to start script executable located at\n" + program);
|
||||
// QMessageBox::warning(m_mainWindow, "Script execution", "Failed to start script executable
|
||||
// located at\n" + program);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -158,9 +158,7 @@ public:
|
||||
QString pythonPath() const;
|
||||
QProcessEnvironment pythonProcessEnvironment() const;
|
||||
|
||||
bool launchProcess( const QString& program,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnvironment );
|
||||
bool launchProcess( const QString& program, const QStringList& arguments, const QProcessEnvironment& processEnvironment );
|
||||
bool launchProcessForMultipleCases( const QString& program,
|
||||
const QStringList& arguments,
|
||||
const std::vector<int>& caseIds,
|
||||
|
@ -205,8 +205,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
||||
{
|
||||
// One argument is available, use replace case for first occurrence in the project
|
||||
|
||||
std::vector<QString> gridFileNames = readFileListFromTextFile(
|
||||
cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
|
||||
std::vector<QString> gridFileNames =
|
||||
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
|
||||
projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames );
|
||||
}
|
||||
else
|
||||
@ -214,9 +214,9 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
||||
size_t optionIdx = 0;
|
||||
while ( optionIdx < o.valueCount() )
|
||||
{
|
||||
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
|
||||
std::vector<QString> gridFileNames = readFileListFromTextFile(
|
||||
cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
|
||||
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
|
||||
std::vector<QString> gridFileNames =
|
||||
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
|
||||
|
||||
if ( groupId != -1 && !gridFileNames.empty() )
|
||||
{
|
||||
@ -258,8 +258,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( cvf::P
|
||||
|
||||
if ( cvf::Option o = progOpt->option( "case" ) )
|
||||
{
|
||||
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(
|
||||
cvfqt::Utils::toQStringList( o.values() ) );
|
||||
QStringList fileNames =
|
||||
RicImportGeneralDataFeature::fileNamesFromCaseNames( cvfqt::Utils::toQStringList( o.values() ) );
|
||||
|
||||
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true );
|
||||
}
|
||||
|
@ -242,10 +242,8 @@ QString RiaGuiApplication::promptForProjectSaveAsFileName() const
|
||||
startPath += "/ResInsightProject.rsp";
|
||||
}
|
||||
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
tr( "Save File" ),
|
||||
startPath,
|
||||
tr( "Project Files (*.rsp);;All files(*.*)" ) );
|
||||
QString fileName =
|
||||
QFileDialog::getSaveFileName( nullptr, tr( "Save File" ), startPath, tr( "Project Files (*.rsp);;All files(*.*)" ) );
|
||||
return fileName;
|
||||
}
|
||||
|
||||
@ -611,8 +609,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
{
|
||||
// One argument is available, use replace case for first occurrence in the project
|
||||
|
||||
std::vector<QString> gridFileNames = readFileListFromTextFile(
|
||||
cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
|
||||
std::vector<QString> gridFileNames =
|
||||
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( 0 ) ) );
|
||||
projectModifier->setReplaceSourceCasesFirstOccurrence( gridFileNames );
|
||||
}
|
||||
else
|
||||
@ -620,9 +618,9 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
size_t optionIdx = 0;
|
||||
while ( optionIdx < o.valueCount() )
|
||||
{
|
||||
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
|
||||
std::vector<QString> gridFileNames = readFileListFromTextFile(
|
||||
cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
|
||||
const int groupId = o.safeValue( optionIdx++ ).toInt( -1 );
|
||||
std::vector<QString> gridFileNames =
|
||||
readFileListFromTextFile( cvfqt::Utils::toQString( o.safeValue( optionIdx++ ) ) );
|
||||
|
||||
if ( groupId != -1 && !gridFileNames.empty() )
|
||||
{
|
||||
@ -664,8 +662,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( cvf::Progr
|
||||
|
||||
if ( cvf::Option o = progOpt->option( "case" ) )
|
||||
{
|
||||
QStringList fileNames = RicImportGeneralDataFeature::fileNamesFromCaseNames(
|
||||
cvfqt::Utils::toQStringList( o.values() ) );
|
||||
QStringList fileNames =
|
||||
RicImportGeneralDataFeature::fileNamesFromCaseNames( cvfqt::Utils::toQStringList( o.values() ) );
|
||||
|
||||
RicImportGeneralDataFeature::OpenCaseResults results =
|
||||
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, true );
|
||||
@ -1493,15 +1491,14 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* oldPreference
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton reply;
|
||||
reply =
|
||||
QMessageBox::question( m_mainWindow,
|
||||
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
|
||||
QString( "You have changed default %1 and have existing views or plots with "
|
||||
"different settings.\n" )
|
||||
.arg( listString ) +
|
||||
QString(
|
||||
"Do you want to apply the new default settings to all existing views?" ),
|
||||
QMessageBox::Ok | QMessageBox::Cancel );
|
||||
reply = QMessageBox::question( m_mainWindow,
|
||||
QString( "Apply %1 to Existing Views or Plots?" ).arg( listString ),
|
||||
QString( "You have changed default %1 and have existing views or plots with "
|
||||
"different settings.\n" )
|
||||
.arg( listString ) +
|
||||
QString( "Do you want to apply the new default settings to all existing "
|
||||
"views?" ),
|
||||
QMessageBox::Ok | QMessageBox::Cancel );
|
||||
applySettingsToAllViews = ( reply == QMessageBox::Ok );
|
||||
}
|
||||
|
||||
@ -1533,9 +1530,8 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences* oldPreference
|
||||
rim3dView->applyBackgroundColorAndFontChanges();
|
||||
}
|
||||
|
||||
if ( oldPreferences &&
|
||||
( applySettingsToAllViews ||
|
||||
rim3dView->scaleZ == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
if ( oldPreferences && ( applySettingsToAllViews ||
|
||||
rim3dView->scaleZ == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
{
|
||||
rim3dView->scaleZ = static_cast<double>( m_preferences->defaultScaleFactorZ() );
|
||||
rim3dView->updateScaling();
|
||||
|
@ -254,8 +254,7 @@ QList<caf::PdmOptionItemInfo> RiaMemoryCleanup::calculateValueOptions( const caf
|
||||
|
||||
const RigEclipseResultInfo* resInfo = caseData->resultInfo( resultAddr );
|
||||
|
||||
QString posText = caf::AppEnum<RiaDefines::ResultCatType>::uiTextFromIndex(
|
||||
resInfo->resultType() );
|
||||
QString posText = caf::AppEnum<RiaDefines::ResultCatType>::uiTextFromIndex( resInfo->resultType() );
|
||||
QString resultsText = QString( "%1, %2" ).arg( posText ).arg( resInfo->resultName() );
|
||||
if ( inUse )
|
||||
{
|
||||
|
@ -40,9 +40,7 @@ public:
|
||||
void clearSelectedResultsFromMemory();
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
std::vector<RigFemResultAddress> selectedGeoMechResults() const;
|
||||
|
@ -187,13 +187,7 @@ RiaPreferences::RiaPreferences( void )
|
||||
caf::AppEnum<RiaFontCache::FontSize> fontSize = RiaFontCache::FONT_SIZE_8;
|
||||
caf::AppEnum<RiaFontCache::FontSize> plotFontSize = RiaFontCache::FONT_SIZE_10;
|
||||
CAF_PDM_InitField( &defaultSceneFontSize, "defaultSceneFontSizePt", fontSize, "Viewer Font Size", "", "", "" );
|
||||
CAF_PDM_InitField( &defaultAnnotationFontSize,
|
||||
"defaultAnnotationFontSizePt",
|
||||
fontSize,
|
||||
"Annotation Font Size",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
CAF_PDM_InitField( &defaultAnnotationFontSize, "defaultAnnotationFontSizePt", fontSize, "Annotation Font Size", "", "", "" );
|
||||
CAF_PDM_InitField( &defaultWellLabelFontSize, "defaultWellLabelFontSizePt", fontSize, "Well Label Font Size", "", "", "" );
|
||||
CAF_PDM_InitField( &defaultPlotFontSize, "defaultPlotFontSizePt", plotFontSize, "Plot Font Size", "", "", "" );
|
||||
|
||||
@ -378,13 +372,7 @@ RiaPreferences::RiaPreferences( void )
|
||||
CAF_PDM_InitField( &m_pageLeftMargin, "pageLeftMargin", defaultMarginSize( m_pageSize() ), "Left Margin", "", "", "" );
|
||||
CAF_PDM_InitField( &m_pageTopMargin, "pageTopMargin", defaultMarginSize( m_pageSize() ), "Top Margin", "", "", "" );
|
||||
CAF_PDM_InitField( &m_pageRightMargin, "pageRightMargin", defaultMarginSize( m_pageSize() ), "Right Margin", "", "", "" );
|
||||
CAF_PDM_InitField( &m_pageBottomMargin,
|
||||
"pageBottomMargin",
|
||||
defaultMarginSize( m_pageSize() ),
|
||||
"Bottom Margin",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
CAF_PDM_InitField( &m_pageBottomMargin, "pageBottomMargin", defaultMarginSize( m_pageSize() ), "Bottom Margin", "", "", "" );
|
||||
|
||||
caf::AppEnum<RiaFontCache::FontSize> invalidFontSize = RiaFontCache::INVALID;
|
||||
CAF_PDM_InitField( &m_defaultSceneFontSize_OBSOLETE, "fontSizeInScene", invalidFontSize, "Viewer Font Size", "", "", "" );
|
||||
@ -632,9 +620,9 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::
|
||||
{
|
||||
for ( auto dateFormat : RiaQDateTimeTools::supportedDateFormats() )
|
||||
{
|
||||
QDate exampleDate = QDate( 2019, 8, 16 );
|
||||
QString fullDateFormat = RiaQDateTimeTools::dateFormatString( dateFormat,
|
||||
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||
QDate exampleDate = QDate( 2019, 8, 16 );
|
||||
QString fullDateFormat =
|
||||
RiaQDateTimeTools::dateFormatString( dateFormat, RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||
QString uiText = QString( "%1 (%2)" ).arg( fullDateFormat ).arg( exampleDate.toString( fullDateFormat ) );
|
||||
uiText.replace( "AP", "AM/PM" );
|
||||
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( dateFormat ) ) );
|
||||
|
@ -166,9 +166,7 @@ protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void initAfterRead() override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
static QString tabNameGeneral();
|
||||
|
@ -79,8 +79,7 @@ bool RiaSummaryCurveDefinition::isEnsembleCurve() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition,
|
||||
std::vector<double>* values )
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, std::vector<double>* values )
|
||||
{
|
||||
CVF_ASSERT( values );
|
||||
|
||||
|
@ -91,8 +91,7 @@ void RiaViewRedrawScheduler::updateAndRedrawScheduledViews()
|
||||
}
|
||||
}
|
||||
|
||||
for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end();
|
||||
++it )
|
||||
for ( std::set<Rim3dView*>::iterator it = dependent3DViewsToUpdate.begin(); it != dependent3DViewsToUpdate.end(); ++it )
|
||||
{
|
||||
if ( *it )
|
||||
{
|
||||
|
@ -86,10 +86,7 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
||||
"Use --summaryplot -help to show a more detailed help text.\n",
|
||||
cvf::ProgramOptions::OPTIONAL_MULTI_VALUE );
|
||||
|
||||
progOpt->registerOption( "commandFile",
|
||||
"<commandfile>",
|
||||
"Execute the command file.",
|
||||
cvf::ProgramOptions::SINGLE_VALUE );
|
||||
progOpt->registerOption( "commandFile", "<commandfile>", "Execute the command file.", cvf::ProgramOptions::SINGLE_VALUE );
|
||||
progOpt->registerOption( "commandFileReplaceCases",
|
||||
"[<caseId>] <caseListFile>",
|
||||
"Supply list of cases to replace in project, performing command file for each case.",
|
||||
|
@ -53,10 +53,8 @@ std::vector<std::vector<cvf::Vec3d>> calcFacePoints( const std::vector<cvf::Vec3
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Vec3d> RiaCellDividingTools::createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners,
|
||||
size_t nx,
|
||||
size_t ny,
|
||||
size_t nz )
|
||||
std::vector<cvf::Vec3d>
|
||||
RiaCellDividingTools::createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners, size_t nx, size_t ny, size_t nz )
|
||||
{
|
||||
std::array<std::pair<size_t, size_t>, 12> edgeCorners = {
|
||||
std::make_pair( 0, 1 ),
|
||||
|
@ -576,8 +576,7 @@ caf::ColorTable RiaColorTables::createBrightnessBasedColorTable( cvf::Color3ub b
|
||||
for ( int i = 0; i < brightnessLevelCount; ++i )
|
||||
{
|
||||
float brightness = static_cast<float>( i ) / static_cast<float>( brightnessLevelCount - 1 );
|
||||
colors.push_back(
|
||||
cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
|
||||
colors.push_back( cvf::Color3ub( RiaColorTools::fromQColorTo3f( QColor::fromHslF( hueF, satF, brightness ) ) ) );
|
||||
}
|
||||
}
|
||||
return caf::ColorTable( colors );
|
||||
|
@ -29,7 +29,8 @@
|
||||
/// Uses W3.org relative luminance calculation taking into account the different luminance of the different colors
|
||||
/// https://www.w3.org/TR/WCAG20-TECHS/G18.html
|
||||
/// Luminance is between [0, 1] so anything above 0.5 is considered in the bright half of the spectrum.
|
||||
/// However, subjectively the contrast looks better if the threshold is to 0.4 so black contrast is used a bit more often.
|
||||
/// However, subjectively the contrast looks better if the threshold is to 0.4 so black contrast is used a bit more
|
||||
/// often.
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaColorTools::isBrightnessAboveThreshold( cvf::Color3f backgroundColor )
|
||||
{
|
||||
|
@ -47,9 +47,8 @@ public:
|
||||
bool includePositiveValuesOnly );
|
||||
|
||||
template <typename T>
|
||||
static void getValuesByIntervals( const std::vector<T>& values,
|
||||
const CurveIntervals& intervals,
|
||||
std::vector<T>* filteredValues )
|
||||
static void
|
||||
getValuesByIntervals( const std::vector<T>& values, const CurveIntervals& intervals, std::vector<T>* filteredValues )
|
||||
{
|
||||
CVF_ASSERT( filteredValues );
|
||||
|
||||
|
@ -44,8 +44,7 @@ QDateTime RiaDateStringParser::parseDateString( const std::string& dateString )
|
||||
if ( hasSeparators( dateString ) )
|
||||
{
|
||||
parsedOk = tryParseYearFirst( dateString, year, month, day ) ||
|
||||
tryParseDayFirst( dateString, year, month, day ) ||
|
||||
tryParseMonthFirst( dateString, year, month, day );
|
||||
tryParseDayFirst( dateString, year, month, day ) || tryParseMonthFirst( dateString, year, month, day );
|
||||
}
|
||||
if ( !parsedOk )
|
||||
{
|
||||
|
@ -42,8 +42,7 @@ RigEclipseWellLogExtractor* RiaExtractionTools::wellLogExtractorEclipseCase( Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( RimWellPath* wellPath,
|
||||
RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
{
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
|
@ -37,8 +37,7 @@ namespace RiaExtractionTools
|
||||
RigEclipseWellLogExtractor* wellLogExtractorEclipseCase( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||
RigGeoMechWellLogExtractor* wellLogExtractorGeoMechCase( RimWellPath* wellPath, RimGeoMechCase* geomCase );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell,
|
||||
const RigWellPath* wellPathGeom );
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||
|
||||
|
@ -55,9 +55,7 @@ void RiaImageFileCompare::reset()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaImageFileCompare::runComparison( const QString& imgFileName,
|
||||
const QString& refFileName,
|
||||
const QString& diffFileName )
|
||||
bool RiaImageFileCompare::runComparison( const QString& imgFileName, const QString& refFileName, const QString& diffFileName )
|
||||
{
|
||||
reset();
|
||||
|
||||
@ -73,10 +71,8 @@ bool RiaImageFileCompare::runComparison( const QString& imgFileName,
|
||||
// The ImageMagick compare tool on RedHat 5 does not support the lowlight-color options
|
||||
// Use GCC version as a crude mechanism for disabling use of this option on RedHat5
|
||||
#if ( __GNUC__ == 4 && __GNUC_MINOR__ <= 1 )
|
||||
QString args = QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" )
|
||||
.arg( imgFileName )
|
||||
.arg( refFileName )
|
||||
.arg( ( diffFileName ) );
|
||||
QString args =
|
||||
QString( "-fuzz 0.4% -metric ae \"%1\" \"%2\" \"%3\"" ).arg( imgFileName ).arg( refFileName ).arg( ( diffFileName ) );
|
||||
#else
|
||||
QString args = QString( "-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"" )
|
||||
.arg( imgFileName )
|
||||
|
@ -107,22 +107,21 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList& fil
|
||||
// Import summary cases
|
||||
if ( !summaryFileInfos.empty() )
|
||||
{
|
||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
|
||||
? project->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
if ( sumCaseColl )
|
||||
{
|
||||
std::vector<RimSummaryCase*> newSumCases = sumCaseColl->createSummaryCasesFromFileInfos( summaryFileInfos );
|
||||
for ( RimSummaryCase* newSumCase : newSumCases )
|
||||
{
|
||||
RimSummaryCaseCollection* existingCollection = nullptr;
|
||||
QString gridCaseFile = RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile(
|
||||
newSumCase->summaryHeaderFilename() );
|
||||
QString gridCaseFile =
|
||||
RifEclipseSummaryTools::findGridCaseFileFromSummaryHeaderFile( newSumCase->summaryHeaderFilename() );
|
||||
RimEclipseCase* gridCase = project->eclipseCaseFromGridFileName( gridCaseFile );
|
||||
if ( gridCase )
|
||||
{
|
||||
RimSummaryCase* existingSummaryCase = sumCaseColl->findSummaryCaseFromFileName(
|
||||
newSumCase->summaryHeaderFilename() );
|
||||
RimSummaryCase* existingSummaryCase =
|
||||
sumCaseColl->findSummaryCaseFromFileName( newSumCase->summaryHeaderFilename() );
|
||||
RimGridSummaryCase* existingGridSummaryCase = dynamic_cast<RimGridSummaryCase*>( existingSummaryCase );
|
||||
RimFileSummaryCase* existingFileSummaryCase = dynamic_cast<RimFileSummaryCase*>( existingSummaryCase );
|
||||
if ( existingGridSummaryCase )
|
||||
@ -451,8 +450,7 @@ bool RiaImportEclipseCaseTools::addEclipseCases( const QStringList& fil
|
||||
|
||||
project->activeOilField()->analysisModels()->updateConnectedEditors();
|
||||
|
||||
if ( RiaGuiApplication::isRunning() && gridCaseGroup &&
|
||||
gridCaseGroup->statisticsCaseCollection()->reservoirs.size() > 0 )
|
||||
if ( RiaGuiApplication::isRunning() && gridCaseGroup && gridCaseGroup->statisticsCaseCollection()->reservoirs.size() > 0 )
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem( gridCaseGroup->statisticsCaseCollection()->reservoirs[0] );
|
||||
}
|
||||
|
@ -68,8 +68,7 @@ void RiaProjectModifier::setReplaceSourceCasesFirstOccurrence( const std::vector
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaProjectModifier::setReplaceSourceCasesById( int caseGroupIdToReplace,
|
||||
const std::vector<QString>& newGridFileNames )
|
||||
void RiaProjectModifier::setReplaceSourceCasesById( int caseGroupIdToReplace, const std::vector<QString>& newGridFileNames )
|
||||
{
|
||||
if ( caseGroupIdToReplace >= 0 )
|
||||
{
|
||||
|
@ -174,9 +174,8 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
{
|
||||
QDir testCaseFolder( folderFileInfo.filePath() );
|
||||
|
||||
bool anyCommandFilesExecuted = findAndExecuteCommandFiles( testCaseFolder,
|
||||
regressionTestConfig,
|
||||
htmlReportFileName );
|
||||
bool anyCommandFilesExecuted =
|
||||
findAndExecuteCommandFiles( testCaseFolder, regressionTestConfig, htmlReportFileName );
|
||||
|
||||
if ( !anyCommandFilesExecuted )
|
||||
{
|
||||
|
@ -98,11 +98,10 @@ void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( caf
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName(
|
||||
caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& simWellName,
|
||||
const caf::PdmField<bool>& branchDetectionField,
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& simWellName,
|
||||
const caf::PdmField<bool>& branchDetectionField,
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
{
|
||||
if ( RiaSimWellBranchTools::simulationWellBranches( simWellName, true ).size() > 1 )
|
||||
{
|
||||
|
@ -59,8 +59,7 @@ RiaJCurveCalculator::RiaJCurveCalculator( cvf::Vec3d p1, double azi1, double inc
|
||||
m_curveStatus = FAILED_RADIUS_TOO_LARGE;
|
||||
|
||||
RiaArcCurveCalculator arc( p1, t1, p2 );
|
||||
if ( arc.curveStatus() == RiaArcCurveCalculator::OK ||
|
||||
arc.curveStatus() == RiaArcCurveCalculator::OK_STRAIGHT_LINE )
|
||||
if ( arc.curveStatus() == RiaArcCurveCalculator::OK || arc.curveStatus() == RiaArcCurveCalculator::OK_STRAIGHT_LINE )
|
||||
{
|
||||
m_c1 = arc.center();
|
||||
m_n1 = arc.normal();
|
||||
|
@ -63,15 +63,15 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
|
||||
bool isOk = true;
|
||||
m_isCalculationOK = true;
|
||||
|
||||
Vec3d tq1q2 = ( q2 - q1 ).getNormalized(
|
||||
&isOk ); // !ok means the control points are in the same place. Could fallback to use only one circle segment + one line.
|
||||
Vec3d tq1q2 = ( q2 - q1 ).getNormalized( &isOk ); // !ok means the control points are in the same place. Could
|
||||
// fallback to use only one circle segment + one line.
|
||||
m_isCalculationOK = m_isCalculationOK && isOk;
|
||||
Vec3d t1 = ( q1 - p1 ).getNormalized(
|
||||
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line.
|
||||
Vec3d t1 = ( q1 - p1 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
|
||||
// circle segment + one line.
|
||||
m_isCalculationOK = m_isCalculationOK && isOk;
|
||||
Vec3d t2 = ( p2 - q2 ).getNormalized(
|
||||
&isOk ); // !ok means no tangent specified. Could fallback to use only one circle segment + one line or only one
|
||||
// straight line if both tangents are missing
|
||||
Vec3d t2 = ( p2 - q2 ).getNormalized( &isOk ); // !ok means no tangent specified. Could fallback to use only one
|
||||
// circle segment + one line or only one straight line if both
|
||||
// tangents are missing
|
||||
m_isCalculationOK = m_isCalculationOK && isOk;
|
||||
|
||||
if ( !m_isCalculationOK )
|
||||
@ -130,8 +130,8 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
|
||||
m_firstArcEndpoint = q1 + ( q1 - p1 ).length() * tq1q2;
|
||||
m_secondArcStartpoint = q2 - ( q2 - p2 ).length() * tq1q2;
|
||||
|
||||
if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) >
|
||||
( q2 - q1 ).length() ) // first arc end and second arc start is overlapping
|
||||
if ( ( ( q1 - p1 ).length() + ( q2 - p2 ).length() ) > ( q2 - q1 ).length() ) // first arc end and second arc start
|
||||
// is overlapping
|
||||
{
|
||||
m_ctrlPpointCurveStatus = FAILED_ARC_OVERLAP;
|
||||
m_isCalculationOK = false;
|
||||
|
@ -182,9 +182,7 @@ void RicfFieldReader<cvf::Color3f>::readFieldData( cvf::Color3f& fieldValue,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue,
|
||||
QTextStream& outputStream,
|
||||
bool quoteStrings )
|
||||
void RicfFieldWriter<cvf::Color3f>::writeFieldData( const cvf::Color3f& fieldValue, QTextStream& outputStream, bool quoteStrings )
|
||||
{
|
||||
QColor qColor = RiaColorTools::toQColor( fieldValue );
|
||||
QString fieldStringValue = qColor.name();
|
||||
|
@ -140,8 +140,7 @@ std::vector<RicfCommandObject*> RicfCommandFileReader::readCommands( QTextStream
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfCommandFileReader::writeCommands( QTextStream& outputStream,
|
||||
const std::vector<RicfCommandObject*>& commandsToWrite )
|
||||
void RicfCommandFileReader::writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite )
|
||||
{
|
||||
for ( const auto& cmdObj : commandsToWrite )
|
||||
{
|
||||
|
@ -47,8 +47,7 @@ std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStrin
|
||||
|
||||
for ( auto wellPath : allWellPaths )
|
||||
{
|
||||
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(),
|
||||
toStringVector( wellPathNames ) );
|
||||
auto matchedName = RiaWellNameComparer::tryMatchNameInList( wellPath->name(), toStringVector( wellPathNames ) );
|
||||
if ( !matchedName.isEmpty() )
|
||||
{
|
||||
wellPaths.push_back( wellPath );
|
||||
|
@ -169,7 +169,8 @@ std::vector<RicfCommandObject*>
|
||||
//
|
||||
// The reason for this is based on two requirements
|
||||
// 1. Ability to aggregate info from multiple replaceCase() statements in a command file
|
||||
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file paths
|
||||
// 2. Improve performance, as a replace case is implemented by reading a project file from XML and replace file
|
||||
// paths
|
||||
// during project loading
|
||||
|
||||
std::vector<RicfCommandObject*> executableCommands;
|
||||
|
@ -117,9 +117,7 @@ RicfCommandResponse RicfCreateLgrForCompletions::execute()
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{RigCompletionData::PERFORATION,
|
||||
RigCompletionData::FRACTURE,
|
||||
RigCompletionData::FISHBONES},
|
||||
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
|
||||
&wellsIntersectingOtherLgrs );
|
||||
|
||||
feature->updateViews( eclipseCase );
|
||||
|
@ -96,8 +96,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
|
||||
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: These well paths were not found: %1" )
|
||||
.arg( wellsNotFound.join( ", " ) );
|
||||
QString error =
|
||||
QString( "createMultipleFractures: These well paths were not found: %1" ).arg( wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -112,7 +112,8 @@ RicfCommandResponse RicfCreateMultipleFractures::execute()
|
||||
|
||||
if ( !fractureTemplate )
|
||||
{
|
||||
QString error = QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
|
||||
QString error =
|
||||
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( m_templateId );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -187,7 +188,6 @@ RimFractureTemplate* RicfCreateMultipleFractures::fractureTemplateFromId( int te
|
||||
if ( t->id() == templateId ) return t;
|
||||
}
|
||||
|
||||
RiaLogging::error(
|
||||
QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
|
||||
RiaLogging::error( QString( "createMultipleFractures: Could not find fracture template with ID %1" ).arg( templateId ) );
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -96,11 +96,9 @@ RicfCommandResponse RicfCreateWellBoreStabilityPlotFeature::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimWellBoreStabilityPlot* wbsPlot = RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase,
|
||||
chosenWellPath,
|
||||
m_timeStep(),
|
||||
m_wbsParameters() );
|
||||
RicfCommandResponse response;
|
||||
RimWellBoreStabilityPlot* wbsPlot =
|
||||
RicNewWellBoreStabilityPlotFeature::createPlot( chosenCase, chosenWellPath, m_timeStep(), m_wbsParameters() );
|
||||
RicfCommandResponse response;
|
||||
response.setResult( new RicfCreateWbsPlotResult( wbsPlot->id() ) );
|
||||
return response;
|
||||
}
|
||||
|
@ -109,9 +109,7 @@ RicfCommandResponse RicfExportLgrForCompletions::execute()
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{RigCompletionData::PERFORATION,
|
||||
RigCompletionData::FRACTURE,
|
||||
RigCompletionData::FISHBONES},
|
||||
{RigCompletionData::PERFORATION, RigCompletionData::FRACTURE, RigCompletionData::FISHBONES},
|
||||
&wellsIntersectingOtherLgrs );
|
||||
|
||||
RicfCommandResponse response;
|
||||
|
@ -128,11 +128,11 @@ RicfCommandResponse RicfExportPropertyInViews::execute()
|
||||
|
||||
if ( resultAccessor.isNull() )
|
||||
{
|
||||
QString warning = QString(
|
||||
"exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
|
||||
.arg( m_caseId )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
QString warning =
|
||||
QString( "exportProperty: Could not find property. Case ID %1, time step %2, property '%3'" )
|
||||
.arg( m_caseId )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
RiaLogging::warning( warning );
|
||||
response.updateStatus( RicfCommandResponse::COMMAND_WARNING, warning );
|
||||
continue;
|
||||
|
@ -102,12 +102,11 @@ RicfCommandResponse RicfExportSimWellFractureCompletions::execute()
|
||||
}
|
||||
if ( views.empty() )
|
||||
{
|
||||
QString error =
|
||||
QString(
|
||||
"exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the case with ID %3" )
|
||||
.arg( m_viewId )
|
||||
.arg( m_viewName )
|
||||
.arg( m_caseId() );
|
||||
QString error = QString( "exportSimWellCompletions: Could not find any views with id %1 or named \"%2\" in the "
|
||||
"case with ID %3" )
|
||||
.arg( m_viewId )
|
||||
.arg( m_viewName )
|
||||
.arg( m_caseId() );
|
||||
RiaLogging::error( error );
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
|
||||
mainWnd->hideAllDockWidgets();
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
|
||||
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath(
|
||||
RicfCommandFileExecutor::SNAPSHOTS );
|
||||
QString absolutePathToSnapshotDir =
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::SNAPSHOTS );
|
||||
|
||||
if ( !m_exportFolder().isEmpty() )
|
||||
{
|
||||
@ -92,8 +92,8 @@ RicfCommandResponse RicfExportSnapshots::execute()
|
||||
}
|
||||
if ( absolutePathToSnapshotDir.isNull() )
|
||||
{
|
||||
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
|
||||
"snapshots" );
|
||||
absolutePathToSnapshotDir =
|
||||
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
}
|
||||
if ( m_type == RicfExportSnapshots::VIEWS || m_type == RicfExportSnapshots::ALL )
|
||||
{
|
||||
|
@ -75,13 +75,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
"" );
|
||||
|
||||
RICF_InitField( &m_performTransScaling, "performTransScaling", false, "Perform Transmissibility Scaling", "", "", "" );
|
||||
RICF_InitField( &m_transScalingTimeStep,
|
||||
"transScalingTimeStep",
|
||||
0,
|
||||
"Transmissibility Scaling Pressure Time Step",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingTimeStep, "transScalingTimeStep", 0, "Transmissibility Scaling Pressure Time Step", "", "", "" );
|
||||
RICF_InitField( &m_transScalingInitialWBHP,
|
||||
"transScalingWBHPFromSummary",
|
||||
RicExportCompletionDataSettingsUi::TransScalingWBHPSource(),
|
||||
@ -89,13 +83,7 @@ RicfExportWellPathCompletions::RicfExportWellPathCompletions()
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingWBHP,
|
||||
"transScalingWBHP",
|
||||
200.0,
|
||||
"Transmissibility Scaling Constant WBHP Value",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
RICF_InitField( &m_transScalingWBHP, "transScalingWBHP", 200.0, "Transmissibility Scaling Constant WBHP Value", "", "", "" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -168,8 +156,8 @@ RicfCommandResponse RicfExportWellPathCompletions::execute()
|
||||
{
|
||||
for ( const QString& wellPathName : m_wellPathNames() )
|
||||
{
|
||||
RimWellPath* wellPath = RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName(
|
||||
wellPathName );
|
||||
RimWellPath* wellPath =
|
||||
RiaApplication::instance()->project()->activeOilField()->wellPathCollection->wellPathByName( wellPathName );
|
||||
if ( wellPath )
|
||||
{
|
||||
wellPaths.push_back( wellPath );
|
||||
|
@ -71,11 +71,10 @@ RicfCommandResponse RicfRunOctaveScript::execute()
|
||||
}
|
||||
else
|
||||
{
|
||||
ok = RiaApplication::instance()
|
||||
->launchProcessForMultipleCases( octavePath,
|
||||
processArguments,
|
||||
caseIds,
|
||||
RiaApplication::instance()->octaveProcessEnvironment() );
|
||||
ok = RiaApplication::instance()->launchProcessForMultipleCases( octavePath,
|
||||
processArguments,
|
||||
caseIds,
|
||||
RiaApplication::instance()->octaveProcessEnvironment() );
|
||||
}
|
||||
|
||||
RicfCommandResponse response;
|
||||
|
@ -67,9 +67,8 @@ RicfCommandResponse RicfScaleFractureTemplate::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
|
||||
? project->allFractureTemplateCollections()[0]
|
||||
: nullptr;
|
||||
RimFractureTemplateCollection* templColl =
|
||||
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
|
||||
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
|
||||
|
||||
if ( !templ )
|
||||
|
@ -59,9 +59,8 @@ RicfCommandResponse RicfSetFractureContainment::execute()
|
||||
return RicfCommandResponse( RicfCommandResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* templColl = !project->allFractureTemplateCollections().empty()
|
||||
? project->allFractureTemplateCollections()[0]
|
||||
: nullptr;
|
||||
RimFractureTemplateCollection* templColl =
|
||||
!project->allFractureTemplateCollections().empty() ? project->allFractureTemplateCollections()[0] : nullptr;
|
||||
RimFractureTemplate* templ = templColl ? templColl->fractureTemplate( m_id ) : nullptr;
|
||||
|
||||
if ( !templ )
|
||||
|
@ -85,8 +85,7 @@ void RicCreateTextAnnotationIn3dViewFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
|
||||
cvf::Vec3d horizontalRight = viewCamera->direction() ^ cvf::Vec3d::Z_AXIS;
|
||||
cvf::Vec3d horizontalUp = viewCamera->up() -
|
||||
( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
|
||||
cvf::Vec3d horizontalUp = viewCamera->up() - ( cvf::Vec3d::Z_AXIS * ( viewCamera->up() * cvf::Vec3d::Z_AXIS ) );
|
||||
|
||||
bool isOk = horizontalRight.normalize();
|
||||
if ( !isOk ) horizontalRight = {1.0, 0.0, 0.0};
|
||||
|
@ -88,8 +88,8 @@ void RicEditPreferencesFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::unique_ptr<RiaPreferences> RicEditPreferencesFeature::clonePreferences( const RiaPreferences* preferences )
|
||||
{
|
||||
caf::PdmObjectHandle* pdmClone = preferences->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() );
|
||||
caf::PdmObjectHandle* pdmClone =
|
||||
preferences->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() );
|
||||
|
||||
return std::unique_ptr<RiaPreferences>( dynamic_cast<RiaPreferences*>( pdmClone ) );
|
||||
}
|
||||
|
@ -97,11 +97,8 @@ void RicExportFishbonesLateralsFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
// Pad with "0" to get a total of two characters defining the sub index text
|
||||
QString subIndexText = QString( "%1" ).arg( sub.subIndex, 2, 10, QChar( '0' ) );
|
||||
QString lateralName = QString( "%1_%2_Sub%3_Lat%4" )
|
||||
.arg( wellPath->name() )
|
||||
.arg( fishboneName )
|
||||
.arg( subIndexText )
|
||||
.arg( lateralIndex );
|
||||
QString lateralName =
|
||||
QString( "%1_%2_Sub%3_Lat%4" ).arg( wellPath->name() ).arg( fishboneName ).arg( subIndexText ).arg( lateralIndex );
|
||||
|
||||
EXP::writeWellPathGeometryToStream( *stream, &geometry, lateralName, mdStepSize, false, 0.0, false );
|
||||
}
|
||||
|
@ -96,9 +96,7 @@ public:
|
||||
|
||||
bool reportCompletionsTypesIndividually() const;
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
protected:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
@ -101,7 +101,8 @@ std::vector<RimWellPath*> RicExportCompletionsForVisibleWellPathsFeature::visibl
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
|
||||
{
|
||||
auto measurementColl = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
auto measurementColl =
|
||||
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellMeasurementCollection>();
|
||||
if ( measurementColl ) return wellPaths;
|
||||
}
|
||||
|
||||
|
@ -74,8 +74,8 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicCaseAndFileExportSettingsUi exportSettings;
|
||||
std::vector<RimCase*> cases;
|
||||
|
@ -132,14 +132,14 @@ std::vector<RigCompletionData>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdatValues(
|
||||
RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
std::vector<RigCompletionData>
|
||||
RicExportFractureCompletionsImpl::generateCompdatValues( RimEclipseCase* caseToApply,
|
||||
const QString& wellNameForExport,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const std::vector<const RimFracture*>& fractures,
|
||||
std::vector<RicWellPathFractureReportItem>* fractureDataReportItems,
|
||||
QTextStream* outputStreamForIntermediateResultsText,
|
||||
PressureDepletionParameters pdParams )
|
||||
{
|
||||
std::vector<RigCompletionData> fractureCompletions;
|
||||
|
||||
@ -266,8 +266,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const std::vector<double>* currentMatrixPressures = nullptr;
|
||||
if ( performPressureDepletionScaling )
|
||||
{
|
||||
pressureResultVector = &results->cellScalarResults(
|
||||
RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
pressureResultVector =
|
||||
&results->cellScalarResults( RigEclipseResultAddress( RiaDefines::DYNAMIC_NATIVE, "PRESSURE" ) );
|
||||
CVF_ASSERT( !pressureResultVector->empty() );
|
||||
|
||||
if ( pdParams.pressureScalingTimeStep < static_cast<int>( pressureResultVector->size() ) )
|
||||
@ -301,8 +301,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
const RigFractureGrid* fractureGrid = fracTemplate->fractureGrid();
|
||||
if ( !fractureGrid ) continue;
|
||||
|
||||
bool useFiniteConductivityInFracture = ( fracTemplate->conductivityType() ==
|
||||
RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
bool useFiniteConductivityInFracture =
|
||||
( fracTemplate->conductivityType() == RimFractureTemplate::FINITE_CONDUCTIVITY );
|
||||
|
||||
// If finite cond chosen and conductivity not present in stimplan file, do not calculate trans for this fracture
|
||||
if ( useFiniteConductivityInFracture && !checkForStimPlanConductivity( fracTemplate, fracture ) )
|
||||
@ -364,9 +364,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
scaledCondenser.calculateFicticiousFractureToWellTransmissibilities();
|
||||
// b. Calculate new effective matrix to well transmissibilities
|
||||
std::map<size_t, double> effectiveMatrixToWellTrans =
|
||||
scaledCondenser
|
||||
.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
scaledCondenser.calculateEffectiveMatrixToWellTransmissibilities( originalLumpedMatrixToFractureTrans,
|
||||
fictitiousFractureToWellTransmissibilities );
|
||||
matrixToWellTrans = effectiveMatrixToWellTrans;
|
||||
}
|
||||
}
|
||||
@ -461,9 +460,9 @@ void RicExportFractureCompletionsImpl::getWellPressuresAndInitialProductionTimeS
|
||||
currentDate = caseTimeSteps.back();
|
||||
}
|
||||
|
||||
RifEclipseSummaryAddress wbhpPressureAddress = RifEclipseSummaryAddress::wellAddress( "WBHP",
|
||||
wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
RifEclipseSummaryAddress wbhpPressureAddress =
|
||||
RifEclipseSummaryAddress::wellAddress( "WBHP", wellPathName.toStdString() );
|
||||
RimSummaryCaseMainCollection* mainCollection = RiaSummaryTools::summaryCaseMainCollection();
|
||||
if ( mainCollection )
|
||||
{
|
||||
RimSummaryCase* summaryCase = mainCollection->findSummaryCaseFromEclipseResultCase( resultCase );
|
||||
@ -532,10 +531,9 @@ bool RicExportFractureCompletionsImpl::checkForStimPlanConductivity( const RimFr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities(
|
||||
const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibilities( const RigFractureGrid* fractureGrid,
|
||||
double cDarcyInCorrectUnit,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
for ( size_t i = 0; i < fractureGrid->iCellCount(); i++ )
|
||||
{
|
||||
@ -599,13 +597,12 @@ void RicExportFractureCompletionsImpl::calculateInternalFractureTransmissibiliti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities(
|
||||
const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities( const RimFractureTemplate* fracTemplate,
|
||||
const RigFractureGrid* fractureGrid,
|
||||
const RimFracture* fracture,
|
||||
double cDarcyInCorrectUnit,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
////
|
||||
// If fracture has orientation Azimuth or Transverse, assume only radial inflow
|
||||
@ -627,9 +624,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
cDarcyInCorrectUnit );
|
||||
|
||||
transCondenser.addNeighborTransmissibility( {true, RigTransmissibilityCondenser::CellAddress::WELL, 1},
|
||||
{false,
|
||||
RigTransmissibilityCondenser::CellAddress::STIMPLAN,
|
||||
wellCellIndex},
|
||||
{false, RigTransmissibilityCondenser::CellAddress::STIMPLAN, wellCellIndex},
|
||||
radialTrans );
|
||||
}
|
||||
else if ( fracTemplate->orientationType() == RimFractureTemplate::ALONG_WELL_PATH )
|
||||
@ -653,8 +648,7 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
if ( intersection.hlength > 0.0 || intersection.vlength > 0.0 )
|
||||
{
|
||||
linearTrans =
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell
|
||||
.getConductivityValue(),
|
||||
RigFractureTransmissibilityEquations::fractureCellToWellLinearTrans( fractureWellCell.getConductivityValue(),
|
||||
fractureWellCell.cellSizeX(),
|
||||
fractureWellCell.cellSizeZ(),
|
||||
intersection.vlength,
|
||||
@ -677,8 +671,8 @@ void RicExportFractureCompletionsImpl::calculateFractureToWellTransmissibilities
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities(
|
||||
RigTransmissibilityCondenser& transCondenser )
|
||||
std::map<size_t, double>
|
||||
RicExportFractureCompletionsImpl::calculateMatrixToWellTransmissibilities( RigTransmissibilityCondenser& transCondenser )
|
||||
{
|
||||
std::map<size_t, double> matrixToWellTransmissibilities;
|
||||
|
||||
@ -687,10 +681,9 @@ std::map<size_t, double> RicExportFractureCompletionsImpl::calculateMatrixToWell
|
||||
{
|
||||
if ( externalCell.m_cellIndexSpace == RigTransmissibilityCondenser::CellAddress::ECLIPSE )
|
||||
{
|
||||
double trans = transCondenser.condensedTransmissibility( externalCell,
|
||||
{true,
|
||||
RigTransmissibilityCondenser::CellAddress::WELL,
|
||||
1} );
|
||||
double trans =
|
||||
transCondenser.condensedTransmissibility( externalCell,
|
||||
{true, RigTransmissibilityCondenser::CellAddress::WELL, 1} );
|
||||
|
||||
if ( trans > transCondenser.transmissibilityThreshold() )
|
||||
{
|
||||
@ -738,9 +731,8 @@ std::vector<RigCompletionData> RicExportFractureCompletionsImpl::generateCompdat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters( const RimFracture* fracture,
|
||||
std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double dFactorForFracture = fracture->nonDarcyProperties().dFactor;
|
||||
double khForFracture = fracture->nonDarcyProperties().conductivity;
|
||||
@ -763,8 +755,7 @@ void RicExportFractureCompletionsImpl::computeNonDarcyFlowParameters(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities(
|
||||
const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
double RicExportFractureCompletionsImpl::sumUpTransmissibilities( const std::vector<RigCompletionData>& allCompletionsForOneFracture )
|
||||
{
|
||||
double transmissibility = 0.0;
|
||||
for ( const auto& c : allCompletionsForOneFracture )
|
||||
|
@ -92,12 +92,13 @@ std::vector<RigCompletionData>
|
||||
return completionData;
|
||||
}
|
||||
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone lateral
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>> wellBorePartsInCells; // wellBore = main bore or fishbone
|
||||
// lateral
|
||||
findFishboneLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
|
||||
findFishboneImportedLateralsWellBoreParts( wellBorePartsInCells, wellPath, settings );
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::MATRIX_MODEL );
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
for ( const auto& cellAndWellBoreParts : wellBorePartsInCells )
|
||||
{
|
||||
@ -237,8 +238,9 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
}
|
||||
|
||||
{
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for fishbones
|
||||
// defined by ResInsight. It is not trivial to define the open section of the main bore for imported laterals.
|
||||
// Note that it is not supported to export main bore perforation intervals for Imported Laterals, only for
|
||||
// fishbones defined by ResInsight. It is not trivial to define the open section of the main bore for imported
|
||||
// laterals.
|
||||
|
||||
if ( wellPath->fishbonesCollection()->isChecked() )
|
||||
{
|
||||
@ -302,11 +304,12 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
for ( const auto& cellIntersectionInfo : intersectedCells )
|
||||
{
|
||||
QString completionMetaData = fishbonesPath->name();
|
||||
WellBorePartForTransCalc wellBorePart = WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
WellBorePartForTransCalc wellBorePart =
|
||||
WellBorePartForTransCalc( cellIntersectionInfo.intersectionLengthsInCellCS,
|
||||
holeRadius,
|
||||
skinFactor,
|
||||
isMainBore,
|
||||
completionMetaData );
|
||||
wellBorePart.intersectionWithWellMeasuredDepth = cellIntersectionInfo.startMD;
|
||||
|
||||
wellBorePartsInCells[cellIntersectionInfo.globCellIndex].push_back( wellBorePart );
|
||||
|
@ -48,10 +48,10 @@ private:
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void findFishboneImportedLateralsWellBoreParts(
|
||||
std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
static void
|
||||
findFishboneImportedLateralsWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings );
|
||||
|
||||
static void appendMainWellBoreParts( std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
|
@ -24,9 +24,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswCompletion::RicMswCompletion( const QString& label,
|
||||
size_t index /* = cvf::UNDEFINED_SIZE_T */,
|
||||
int branchNumber /*= 0*/ )
|
||||
RicMswCompletion::RicMswCompletion( const QString& label, size_t index /* = cvf::UNDEFINED_SIZE_T */, int branchNumber /*= 0*/ )
|
||||
: m_label( label )
|
||||
, m_index( index )
|
||||
, m_branchNumber( branchNumber )
|
||||
|
@ -54,10 +54,10 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
const std::vector<RimSimWellInView*>& simWells )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"COMPLETIONS" );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicExportCompletionDataSettingsUi* exportSettings = project->dialogData()->exportCompletionData();
|
||||
|
||||
|
@ -107,8 +107,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
else
|
||||
{
|
||||
int caseId = exportSettings.caseToApply->caseId();
|
||||
QString format = QString(
|
||||
"Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString format =
|
||||
QString( "Unit systems for well path \"%1\" must match unit system of chosen eclipse case \"%2\"" );
|
||||
QString errMsg = format.arg( wellPath->name() ).arg( caseId );
|
||||
RiaLogging::error( errMsg );
|
||||
}
|
||||
@ -142,19 +142,19 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
}
|
||||
else
|
||||
{
|
||||
fractureTransmissibilityExportInformationStream = std::unique_ptr<QTextStream>(
|
||||
new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
fractureTransmissibilityExportInformationStream =
|
||||
std::unique_ptr<QTextStream>( new QTextStream( &fractureTransmissibilityExportInformationFile ) );
|
||||
}
|
||||
}
|
||||
|
||||
size_t maxProgress = usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit ==
|
||||
RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
size_t maxProgress =
|
||||
usedWellPaths.size() * 3 + simWells.size() +
|
||||
( exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
|
||||
? usedWellPaths.size()
|
||||
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
|
||||
? usedWellPaths.size() * 3
|
||||
: 1 ) +
|
||||
simWells.size();
|
||||
|
||||
caf::ProgressInfo progress( maxProgress, "Export Completions" );
|
||||
|
||||
@ -437,18 +437,16 @@ std::vector<RigCompletionData>
|
||||
exportSettings.includeFractures = true;
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData = RicFishbonesTransmissibilityCalculationFeatureImp::
|
||||
generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath, exportSettings );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicFishbonesTransmissibilityCalculationFeatureImp::generateFishboneCompdatValuesUsingAdjustedCellVolume( wellPath,
|
||||
exportSettings );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RigCompletionData> completionData =
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath,
|
||||
eclipseCase,
|
||||
nullptr,
|
||||
nullptr );
|
||||
RicExportFractureCompletionsImpl::generateCompdatValuesForWellPath( wellPath, eclipseCase, nullptr, nullptr );
|
||||
|
||||
std::copy( completionData.begin(), completionData.end(), std::back_inserter( completionsPerEclipseCell ) );
|
||||
}
|
||||
@ -591,8 +589,7 @@ RigCompletionData RicWellPathExportCompletionDataFeatureImpl::combineEclipseCell
|
||||
RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEclipseDoes( settings.caseToApply(),
|
||||
skinfactor,
|
||||
wellBoreDiameter / 2,
|
||||
cellIndexIJK
|
||||
.globalCellIndex(),
|
||||
cellIndexIJK.globalCellIndex(),
|
||||
cellDirection );
|
||||
|
||||
double wpimult = combinedTrans / transmissibilityEclipseCalculation;
|
||||
@ -810,8 +807,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
for ( const auto& completion : completionsForLgr.second )
|
||||
{
|
||||
const auto wellPath = RicWellPathExportCompletionsFileTools::findWellPathFromExportName(
|
||||
completion.wellName() );
|
||||
const auto wellPath =
|
||||
RicWellPathExportCompletionsFileTools::findWellPathFromExportName( completion.wellName() );
|
||||
auto item = wellPathToLgrNameMap.find( wellPath );
|
||||
wellPathToLgrNameMap[wellPath].insert( completionsForLgr.first );
|
||||
}
|
||||
@ -821,9 +818,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
{
|
||||
const RimWellPath* wellPath = wellPathsForLgr.first;
|
||||
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD = std::make_tuple( std::numeric_limits<double>::max(),
|
||||
cvf::Vec2i(),
|
||||
"" );
|
||||
std::tuple<double, cvf::Vec2i, QString> itemWithLowestMD =
|
||||
std::make_tuple( std::numeric_limits<double>::max(), cvf::Vec2i(), "" );
|
||||
|
||||
// Find first LGR-intersection along the well path
|
||||
|
||||
@ -884,8 +880,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
{
|
||||
try
|
||||
{
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
fileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, fileName );
|
||||
|
||||
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
|
||||
completionsForGrid.insert( std::pair<QString, std::vector<RigCompletionData>>( "", completionsForMainGrid ) );
|
||||
@ -904,8 +900,8 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
try
|
||||
{
|
||||
QString lgrFileName = fileName + "_LGR";
|
||||
std::shared_ptr<QFile> exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
lgrFileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName, lgrFileName );
|
||||
|
||||
exportWellPathFractureReport( eclipseCase, exportFile, wellPathFractureReportItems );
|
||||
exportWelspeclToFile( eclipseCase, exportFile, completionsForSubGrids );
|
||||
@ -965,46 +961,44 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
|
||||
|
||||
if ( gridName.isEmpty() )
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDAT" );
|
||||
}
|
||||
else
|
||||
{
|
||||
header =
|
||||
{RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
header = {RifTextDataTableColumn( "Well" ),
|
||||
RifTextDataTableColumn( "LgrName" ),
|
||||
RifTextDataTableColumn( "I" ),
|
||||
RifTextDataTableColumn( "J" ),
|
||||
RifTextDataTableColumn( "K1" ),
|
||||
RifTextDataTableColumn( "K2" ),
|
||||
RifTextDataTableColumn( "Status" ),
|
||||
RifTextDataTableColumn( "SAT" ),
|
||||
RifTextDataTableColumn( "TR",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIAM" ),
|
||||
RifTextDataTableColumn( "KH",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "S" ),
|
||||
RifTextDataTableColumn( "Df",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ) ),
|
||||
RifTextDataTableColumn( "DIR" )};
|
||||
|
||||
formatter.keyword( "COMPDATL" );
|
||||
}
|
||||
@ -1167,8 +1161,8 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
return completionData;
|
||||
}
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = settings.caseToApply->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::MATRIX_MODEL );
|
||||
const RigActiveCellInfo* activeCellInfo =
|
||||
settings.caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->isChecked() )
|
||||
{
|
||||
@ -1218,21 +1212,19 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
|
||||
|
||||
transmissibility = transmissibilityData.connectionFactor();
|
||||
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_USER_DEFINED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
dFactor = nonDarcyParameters->userDefinedDFactor();
|
||||
}
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() ==
|
||||
RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
else if ( nonDarcyParameters->nonDarcyFlowType() == RimNonDarcyPerforationParameters::NON_DARCY_COMPUTED )
|
||||
{
|
||||
kh = transmissibilityData.kh();
|
||||
|
||||
const double effectiveH = transmissibilityData.effectiveH();
|
||||
|
||||
const double effectivePermeability = nonDarcyParameters->gridPermeabilityScalingFactor() *
|
||||
transmissibilityData.effectiveK();
|
||||
const double effectivePermeability =
|
||||
nonDarcyParameters->gridPermeabilityScalingFactor() * transmissibilityData.effectiveK();
|
||||
|
||||
dFactor = calculateDFactor( settings.caseToApply,
|
||||
effectiveH,
|
||||
@ -1418,8 +1410,7 @@ TransmissibilityData
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
|
||||
if ( ntgAccessObject.notNull() )
|
||||
{
|
||||
@ -1450,8 +1441,7 @@ TransmissibilityData
|
||||
if ( directionForVolumeScaling == CellDirection::DIR_K ) dz = dz / volumeScaleConstant;
|
||||
}
|
||||
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() *
|
||||
latNtg,
|
||||
const double transx = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.x() * latNtg,
|
||||
permy,
|
||||
permz,
|
||||
dy,
|
||||
@ -1459,8 +1449,7 @@ TransmissibilityData
|
||||
wellRadius,
|
||||
skinFactor,
|
||||
darcy );
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() *
|
||||
latNtg,
|
||||
const double transy = RigTransmissibilityEquations::wellBoreTransmissibilityComponent( internalCellLengths.y() * latNtg,
|
||||
permx,
|
||||
permz,
|
||||
dx,
|
||||
@ -1511,8 +1500,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateDFactor( RimEclipseC
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"PORO" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "PORO" ) );
|
||||
|
||||
if ( poroAccessObject.notNull() )
|
||||
{
|
||||
@ -1607,8 +1595,7 @@ double RicWellPathExportCompletionDataFeatureImpl::calculateTransmissibilityAsEc
|
||||
0,
|
||||
RiaDefines::MATRIX_MODEL,
|
||||
0,
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE,
|
||||
"NTG" ) );
|
||||
RigEclipseResultAddress( RiaDefines::STATIC_NATIVE, "NTG" ) );
|
||||
ntg = ntgAccessObject->cellScalarGlobIdx( globalCellIndex );
|
||||
}
|
||||
|
||||
@ -1690,8 +1677,8 @@ std::pair<double, cvf::Vec2i>
|
||||
for ( WellPathCellIntersectionInfo intersection : intersections )
|
||||
{
|
||||
size_t gridLocalCellIndex = 0;
|
||||
const RigGridBase* grid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex,
|
||||
&gridLocalCellIndex );
|
||||
const RigGridBase* grid =
|
||||
mainGrid->gridAndGridLocalIdxFromGlobalCellIdx( intersection.globCellIndex, &gridLocalCellIndex );
|
||||
|
||||
if ( grid->gridId() == gridId && activeCellInfo->isActive( intersection.globCellIndex ) )
|
||||
{
|
||||
|
@ -96,9 +96,8 @@ private:
|
||||
class RicWellPathExportCompletionDataFeatureImpl
|
||||
{
|
||||
public:
|
||||
static CellDirection calculateCellMainDirection( RimEclipseCase* eclipseCase,
|
||||
size_t globalCellIndex,
|
||||
const cvf::Vec3d& lengthsInCell );
|
||||
static CellDirection
|
||||
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
|
||||
|
||||
static TransmissibilityData
|
||||
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
|
||||
@ -124,9 +123,8 @@ public:
|
||||
static std::vector<RigCompletionData> computeStaticCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static std::vector<RigCompletionData> computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase,
|
||||
size_t timeStepIndex );
|
||||
static std::vector<RigCompletionData>
|
||||
computeDynamicCompletionsForWellPath( RimWellPath* wellPath, RimEclipseCase* eclipseCase, size_t timeStepIndex );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationsCompdatValues( const RimWellPath* wellPath,
|
||||
@ -161,13 +159,12 @@ private:
|
||||
QFilePtr exportFile,
|
||||
const std::map<QString, std::vector<RigCompletionData>>& completions );
|
||||
|
||||
static void
|
||||
sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
static void sortAndExportCompletionsToFile( RimEclipseCase* eclipseCase,
|
||||
const QString& exportFolder,
|
||||
const QString& fileName,
|
||||
const std::vector<RigCompletionData>& completions,
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems,
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType exportType );
|
||||
|
||||
static void exportCompdatAndWpimultTables( RimEclipseCase* sourceCase,
|
||||
QFilePtr exportFile,
|
||||
|
@ -91,8 +91,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString unifiedFileName =
|
||||
QString( "UnifiedCompletions_MSW_%1" ).arg( exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
unifiedFileName );
|
||||
unifiedExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, unifiedFileName );
|
||||
}
|
||||
|
||||
for ( const auto& wellPath : wellPaths )
|
||||
@ -111,8 +111,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString wellFileName = QString( "%1_UnifiedCompletions_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
unifiedWellPathFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
wellFileName );
|
||||
unifiedWellPathFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, wellFileName );
|
||||
}
|
||||
|
||||
if ( exportFractures )
|
||||
@ -124,10 +124,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fractureExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fracture_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fractureExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFractures( exportSettings.caseToApply,
|
||||
fractureExportFile,
|
||||
@ -146,8 +146,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
{
|
||||
QString fileName = QString( "%1_Perforation_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
perforationsExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
perforationsExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForPerforations( exportSettings.caseToApply,
|
||||
perforationsExportFile,
|
||||
@ -165,10 +165,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions(
|
||||
fishbonesExportFile = unifiedWellPathFile;
|
||||
else
|
||||
{
|
||||
QString fileName = QString( "%1_Fishbones_MSW_%2" )
|
||||
.arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
|
||||
fileName );
|
||||
QString fileName =
|
||||
QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
|
||||
fishbonesExportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder, fileName );
|
||||
}
|
||||
exportWellSegmentsForFishbones( exportSettings.caseToApply,
|
||||
fishbonesExportFile,
|
||||
@ -204,11 +204,10 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones(
|
||||
RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFishbones( RimEclipseCase* eclipseCase,
|
||||
std::shared_ptr<QFile> exportFile,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs )
|
||||
{
|
||||
if ( eclipseCase == nullptr )
|
||||
{
|
||||
@ -242,7 +241,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
|
||||
return;
|
||||
}
|
||||
|
||||
RicMswExportInfo exportInfo = generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
RicMswExportInfo exportInfo =
|
||||
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
|
||||
QTextStream stream( exportFile.get() );
|
||||
RifTextDataTableFormatter formatter( stream );
|
||||
@ -286,15 +286,16 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<RifTextDataTableColumn> header =
|
||||
{RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough", RifTextDataTableDoubleFormatting( RIF_FLOAT, 7 ) )};
|
||||
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "First Seg" ),
|
||||
RifTextDataTableColumn( "Last Seg" ),
|
||||
RifTextDataTableColumn( "Branch Num" ),
|
||||
RifTextDataTableColumn( "Outlet Seg" ),
|
||||
RifTextDataTableColumn( "Length" ),
|
||||
RifTextDataTableColumn( "Depth Change" ),
|
||||
RifTextDataTableColumn( "Diam" ),
|
||||
RifTextDataTableColumn( "Rough",
|
||||
RifTextDataTableDoubleFormatting( RIF_FLOAT,
|
||||
7 ) )};
|
||||
formatter.header( header );
|
||||
}
|
||||
|
||||
@ -329,8 +330,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
||||
|
||||
formatter.add( location->segmentNumber() ).add( location->segmentNumber() );
|
||||
formatter.add( 1 ); // All segments on main stem are branch 1
|
||||
formatter.add( location->segmentNumber() -
|
||||
1 ); // All main stem segments are connected to the segment below them
|
||||
formatter.add( location->segmentNumber() - 1 ); // All main stem segments are connected to the segment below
|
||||
// them
|
||||
formatter.add( length );
|
||||
formatter.add( depth );
|
||||
formatter.add( exportInfo.linerDiameter() );
|
||||
@ -442,9 +443,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsSegments(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader(
|
||||
RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
void RicWellPathExportMswCompletionsImpl::generateWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter,
|
||||
RigCompletionData::CompletionType completionType )
|
||||
{
|
||||
if ( completionType == RigCompletionData::CT_UNDEFINED )
|
||||
{
|
||||
@ -705,8 +705,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
|
||||
{
|
||||
if ( completion->completionType() == RigCompletionData::PERFORATION_AICD )
|
||||
{
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>(
|
||||
completion );
|
||||
std::shared_ptr<RicMswPerforationAICD> aicd = std::static_pointer_cast<RicMswPerforationAICD>( completion );
|
||||
if ( !aicd->isValid() )
|
||||
{
|
||||
RiaLogging::error( QString( "Export AICD Valve (%1): Valve is invalid. At least one required "
|
||||
@ -849,12 +848,11 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
{
|
||||
for ( auto& sub : subs->installedLateralIndices() )
|
||||
{
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount = SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD,
|
||||
subEndMD,
|
||||
maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
double subEndMD = subs->measuredDepth( sub.subIndex );
|
||||
double subEndTVD = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( subEndMD ).z();
|
||||
int subSegCount =
|
||||
SubSegmentIntersectionInfo::numberOfSplittedSegments( subStartMD, subEndMD, maxSegmentLength );
|
||||
double subSegLen = ( subEndMD - subStartMD ) / subSegCount;
|
||||
|
||||
double startMd = subStartMD;
|
||||
double startTvd = -wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( startMd ).z();
|
||||
@ -874,8 +872,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
if ( ssi == 0 )
|
||||
{
|
||||
// Add completion for ICD
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion(
|
||||
new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswFishbonesICD> icdCompletion( new RicMswFishbonesICD( QString( "ICD" ), nullptr ) );
|
||||
std::shared_ptr<RicMswSubSegment> icdSegment(
|
||||
new RicMswSubSegment( subEndMD, subEndMD + 0.1, subEndTVD, subEndTVD ) );
|
||||
icdCompletion->setFlowCoefficient( subs->icdFlowCoefficient() );
|
||||
@ -890,11 +887,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFishbonesMswExport
|
||||
QString label = QString( "Lateral %1" ).arg( lateralIndex );
|
||||
location->addCompletion( std::make_shared<RicMswFishbones>( label, lateralIndex ) );
|
||||
}
|
||||
assignFishbonesLateralIntersections( caseToApply,
|
||||
subs,
|
||||
location,
|
||||
&foundSubGridIntersections,
|
||||
maxSegmentLength );
|
||||
assignFishbonesLateralIntersections( caseToApply, subs, location, &foundSubGridIntersections, maxSegmentLength );
|
||||
}
|
||||
|
||||
exportInfo.addWellSegment( location );
|
||||
@ -928,10 +921,10 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo(
|
||||
RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
RicMswExportInfo
|
||||
RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath,
|
||||
const std::vector<RimWellPathFracture*>& fractures )
|
||||
{
|
||||
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
|
||||
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
@ -947,9 +940,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
|
||||
double maxSegmentLength = wellPath->fractureCollection()->mswParameters()->maxSegmentLength();
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( wellPathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double initialMD = 0.0;
|
||||
if ( wellPath->fractureCollection()->mswParameters()->referenceMDType() ==
|
||||
@ -988,9 +979,9 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
||||
double endTVD = cellIntInfo.endTVD;
|
||||
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@ -1122,10 +1113,8 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections = filterIntersections( intersections,
|
||||
initialMD,
|
||||
wellPathGeometry,
|
||||
eclipseCase );
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
|
||||
filterIntersections( intersections, initialMD, wellPathGeometry, eclipseCase );
|
||||
|
||||
const double maxSegmentLength = wellPath->perforationIntervalCollection()->mswParameters()->maxSegmentLength();
|
||||
|
||||
@ -1137,11 +1126,11 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::filterIntersections(
|
||||
const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
std::vector<WellPathCellIntersectionInfo>
|
||||
RicWellPathExportMswCompletionsImpl::filterIntersections( const std::vector<WellPathCellIntersectionInfo>& intersections,
|
||||
double initialMD,
|
||||
const RigWellPath* wellPathGeometry,
|
||||
const RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> filteredIntersections;
|
||||
|
||||
@ -1154,14 +1143,14 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::f
|
||||
|
||||
WellPathCellIntersectionInfo extraIntersection;
|
||||
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut = cvf::StructGridInterface::oppositeFace(
|
||||
firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.globCellIndex = std::numeric_limits<size_t>::max();
|
||||
extraIntersection.startPoint = intersectionPoint;
|
||||
extraIntersection.endPoint = firstIntersection.startPoint;
|
||||
extraIntersection.startMD = initialMD;
|
||||
extraIntersection.endMD = firstIntersection.startMD;
|
||||
extraIntersection.intersectedCellFaceIn = cvf::StructGridInterface::NO_FACE;
|
||||
extraIntersection.intersectedCellFaceOut =
|
||||
cvf::StructGridInterface::oppositeFace( firstIntersection.intersectedCellFaceIn );
|
||||
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
|
||||
|
||||
filteredIntersections.push_back( extraIntersection );
|
||||
@ -1236,11 +1225,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( segmentLength > segmentLengthThreshold )
|
||||
{
|
||||
QString label = QString( "Main stem segment %1" ).arg( mainBoreSegments.size() + 2 );
|
||||
std::shared_ptr<RicMswSegment> segment( new RicMswSegment( label,
|
||||
cellIntInfo.startMD,
|
||||
cellIntInfo.endMD,
|
||||
cellIntInfo.startTVD,
|
||||
cellIntInfo.endTVD ) );
|
||||
std::shared_ptr<RicMswSegment> segment(
|
||||
new RicMswSegment( label, cellIntInfo.startMD, cellIntInfo.endMD, cellIntInfo.startTVD, cellIntInfo.endTVD ) );
|
||||
|
||||
for ( const RimPerforationInterval* interval : perforationIntervals )
|
||||
{
|
||||
@ -1250,10 +1236,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
if ( overlap > 0.0 )
|
||||
{
|
||||
std::shared_ptr<RicMswCompletion> intervalCompletion( new RicMswPerforation( interval->name() ) );
|
||||
std::vector<RigCompletionData> completionData = generatePerforationIntersections( wellPath,
|
||||
interval,
|
||||
timeStep,
|
||||
eclipseCase );
|
||||
std::vector<RigCompletionData> completionData =
|
||||
generatePerforationIntersections( wellPath, interval, timeStep, eclipseCase );
|
||||
assignPerforationIntersections( completionData,
|
||||
intervalCompletion,
|
||||
cellIntInfo,
|
||||
@ -1267,9 +1251,8 @@ RicWellPathExportMswCompletionsImpl::MainBoreSegments
|
||||
}
|
||||
else
|
||||
{
|
||||
QString text = QString( "Skipping segment , threshold = %1, length = %2" )
|
||||
.arg( segmentLengthThreshold )
|
||||
.arg( segmentLength );
|
||||
QString text =
|
||||
QString( "Skipping segment , threshold = %1, length = %2" ).arg( segmentLengthThreshold ).arg( segmentLength );
|
||||
RiaLogging::info( text );
|
||||
}
|
||||
}
|
||||
@ -1353,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
|
||||
@ -1361,7 +1345,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
|
||||
}
|
||||
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) )
|
||||
{
|
||||
QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
QString valveLabel =
|
||||
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
|
||||
std::shared_ptr<RicMswSubSegment> subSegment(
|
||||
new RicMswSubSegment( overlapStart, overlapStart + 0.1, 0.0, 0.0 ) );
|
||||
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
|
||||
@ -1651,9 +1636,7 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
pathGeometry.m_wellPathPoints = lateralCoords;
|
||||
pathGeometry.m_measuredDepths = lateralMDs;
|
||||
std::vector<SubSegmentIntersectionInfo> subSegIntersections =
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry,
|
||||
intersections,
|
||||
maxSegmentLength );
|
||||
SubSegmentIntersectionInfo::spiltIntersectionSegmentsToMaxLength( &pathGeometry, intersections, maxSegmentLength );
|
||||
|
||||
double previousExitMD = lateralMDs.front();
|
||||
double previousExitTVD = -lateralCoords.front().z();
|
||||
@ -1661,9 +1644,9 @@ void RicWellPathExportMswCompletionsImpl::assignFishbonesLateralIntersections( c
|
||||
for ( const auto& cellIntInfo : subSegIntersections )
|
||||
{
|
||||
size_t localGridIdx = 0u;
|
||||
const RigGridBase* localGrid = grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex,
|
||||
&localGridIdx );
|
||||
QString gridName;
|
||||
const RigGridBase* localGrid =
|
||||
grid->gridAndGridLocalIdxFromGlobalCellIdx( cellIntInfo.globCellIndex, &localGridIdx );
|
||||
QString gridName;
|
||||
if ( localGrid != grid )
|
||||
{
|
||||
gridName = QString::fromStdString( localGrid->gridName() );
|
||||
@ -1728,11 +1711,11 @@ void RicWellPathExportMswCompletionsImpl::assignFractureIntersections( const Rim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RigCompletionData> RicWellPathExportMswCompletionsImpl::generatePerforationIntersections(
|
||||
const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
std::vector<RigCompletionData>
|
||||
RicWellPathExportMswCompletionsImpl::generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
std::vector<RigCompletionData> completionData;
|
||||
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::MATRIX_MODEL );
|
||||
|
@ -146,11 +146,10 @@ private:
|
||||
std::shared_ptr<RicMswSegment> location,
|
||||
bool* foundSubGridIntersections );
|
||||
|
||||
static std::vector<RigCompletionData>
|
||||
generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
static std::vector<RigCompletionData> generatePerforationIntersections( const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval,
|
||||
int timeStep,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
|
||||
std::shared_ptr<RicMswCompletion> perforationCompletion,
|
||||
|
@ -531,9 +531,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureInstancesText(
|
||||
floatNumberColumn( "LPerf" ),
|
||||
floatNumberColumn( "PerfEff" ),
|
||||
floatNumberColumn( "Wdia" ),
|
||||
RifTextDataTableColumn( "Dfac",
|
||||
RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ),
|
||||
RIGHT ),
|
||||
RifTextDataTableColumn( "Dfac", RifTextDataTableDoubleFormatting( RifTextDataTableDoubleFormat::RIF_SCIENTIFIC ), RIGHT ),
|
||||
};
|
||||
|
||||
formatter.header( header );
|
||||
|
@ -54,8 +54,7 @@ private:
|
||||
QString createFracturePressureDepletionSummaryText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
QString createConnectionsPerWellText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
QString createConnectionsPerWellText( const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems ) const;
|
||||
|
||||
void configureFormatter( RifTextDataTableFormatter* formatter ) const;
|
||||
};
|
||||
|
@ -54,8 +54,8 @@ void RicAppendSeparateIntersectionResultFeature::onActionTriggered( bool isCheck
|
||||
|
||||
CVF_ASSERT( intersectionResCollection );
|
||||
|
||||
RicAppendSeparateIntersectionResultFeatureCmd* cmd = new RicAppendSeparateIntersectionResultFeatureCmd(
|
||||
intersectionResCollection );
|
||||
RicAppendSeparateIntersectionResultFeatureCmd* cmd =
|
||||
new RicAppendSeparateIntersectionResultFeatureCmd( intersectionResCollection );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,7 @@ class RimIntersectionResultsDefinitionCollection;
|
||||
class RicAppendSeparateIntersectionResultFeatureCmd : public caf::CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
explicit RicAppendSeparateIntersectionResultFeatureCmd(
|
||||
RimIntersectionResultsDefinitionCollection* intersectionCollection );
|
||||
explicit RicAppendSeparateIntersectionResultFeatureCmd( RimIntersectionResultsDefinitionCollection* intersectionCollection );
|
||||
~RicAppendSeparateIntersectionResultFeatureCmd() override;
|
||||
|
||||
QString name() override;
|
||||
|
@ -63,8 +63,8 @@ void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
if ( !activeView ) return;
|
||||
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
|
||||
activeView->intersectionCollection() );
|
||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd =
|
||||
new RicNewAzimuthDipIntersectionFeatureCmd( activeView->intersectionCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
@ -80,8 +80,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(
|
||||
RimIntersectionCollection* intersectionCollection )
|
||||
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd( RimIntersectionCollection* intersectionCollection )
|
||||
: CmdExecuteCommand( nullptr )
|
||||
, m_intersectionCollection( intersectionCollection )
|
||||
{
|
||||
|
@ -62,8 +62,8 @@ void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
if ( !activeView ) return;
|
||||
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
|
||||
activeView->intersectionCollection() );
|
||||
RicNewPolylineIntersectionFeatureCmd* cmd =
|
||||
new RicNewPolylineIntersectionFeatureCmd( activeView->intersectionCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||
}
|
||||
|
||||
|
@ -60,8 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
CVF_ASSERT( proj );
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels()
|
||||
: nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
|
||||
|
||||
if ( analysisModels )
|
||||
{
|
||||
|
@ -74,9 +74,9 @@ void RicEclipseHideFaultFeature::onActionTriggered( bool isChecked )
|
||||
size_t currentCellIndex = static_cast<size_t>( list[0].toULongLong() );
|
||||
int currentFaceIndex = list[1].toInt();
|
||||
|
||||
const RigFault* fault = eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
|
||||
cvf::StructGridInterface::FaceType(
|
||||
currentFaceIndex ) );
|
||||
const RigFault* fault =
|
||||
eclView->mainGrid()->findFaultFromCellIndexAndCellFace( currentCellIndex,
|
||||
cvf::StructGridInterface::FaceType( currentFaceIndex ) );
|
||||
if ( fault )
|
||||
{
|
||||
QString faultName = fault->name();
|
||||
|
@ -37,7 +37,8 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterInsertFeature, "RicEclipsePropertyF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters =
|
||||
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
return RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable( propertyFilters[0] );
|
||||
@ -51,7 +52,8 @@ bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicEclipsePropertyFilterInsertFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
std::vector<RimEclipsePropertyFilter*> propertyFilters =
|
||||
RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters();
|
||||
if ( propertyFilters.size() == 1 )
|
||||
{
|
||||
RicEclipsePropertyFilterInsertExec* filterExec = new RicEclipsePropertyFilterInsertExec( propertyFilters[0] );
|
||||
|
@ -69,8 +69,8 @@ void RicEclipsePropertyFilterNewInViewFeature::onActionTriggered( bool isChecked
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
|
||||
if ( !eclView ) return;
|
||||
|
||||
RicEclipsePropertyFilterNewExec* filterExec = new RicEclipsePropertyFilterNewExec(
|
||||
eclView->eclipsePropertyFilterCollection() );
|
||||
RicEclipsePropertyFilterNewExec* filterExec =
|
||||
new RicEclipsePropertyFilterNewExec( eclView->eclipsePropertyFilterCollection() );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( filterExec );
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ void RicAdvancedSnapshotExportFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
|
||||
{
|
||||
QString fallbackFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath(
|
||||
"snapshots" );
|
||||
QString fallbackFolderName =
|
||||
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
QString folderName =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "ADVANCED_SNAPSHOT_EXPORT",
|
||||
fallbackFolderName );
|
||||
@ -157,8 +157,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
|
||||
if ( geomCase && sourceGeoMechView )
|
||||
{
|
||||
RimGeoMechView* copyOfGeoMechView = dynamic_cast<RimGeoMechView*>(
|
||||
sourceGeoMechView->xmlCapability()->copyByXmlSerialization(
|
||||
caf::PdmDefaultObjectFactory::instance() ) );
|
||||
sourceGeoMechView->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
CVF_ASSERT( copyOfGeoMechView );
|
||||
|
||||
geomCase->geoMechViews().push_back( copyOfGeoMechView );
|
||||
|
@ -48,9 +48,7 @@ private:
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
void clampValues();
|
||||
|
@ -86,13 +86,7 @@ bool RicEclipseCellResultToFileImpl::writeBinaryResultToTextFile( const QString&
|
||||
return false;
|
||||
}
|
||||
|
||||
return writeResultToTextFile( fileName,
|
||||
eclipseCase,
|
||||
resultAccessor.p(),
|
||||
eclipseKeyword,
|
||||
undefinedValue,
|
||||
logPrefix,
|
||||
errorMsg );
|
||||
return writeResultToTextFile( fileName, eclipseCase, resultAccessor.p(), eclipseKeyword, undefinedValue, logPrefix, errorMsg );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -56,9 +56,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
@ -97,9 +97,8 @@ void RicExportEclipseSectorModelFeature::executeCommand( RimEclipseView*
|
||||
const RicExportEclipseSectorModelUi& exportSettings,
|
||||
const QString& logPrefix )
|
||||
{
|
||||
int resultProgressPercentage = exportSettings.exportParameters()
|
||||
? std::min( (int)exportSettings.selectedKeywords().size(), 20 )
|
||||
: 0;
|
||||
int resultProgressPercentage =
|
||||
exportSettings.exportParameters() ? std::min( (int)exportSettings.selectedKeywords().size(), 20 ) : 0;
|
||||
|
||||
int faultsProgressPercentage = exportSettings.exportFaults() ? 10 : 0;
|
||||
|
||||
|
@ -47,9 +47,7 @@ void RicExportEclipseSectorModelUi::ResultExportOptionsEnum::setUp()
|
||||
{
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_NO_RESULTS, "NO_RESULTS", "Do not export" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_GRID_FILE, "TO_GRID_FILE", "Append to grid file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE,
|
||||
"TO_SINGLE_RESULT_FILE",
|
||||
"Export to single file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SINGLE_SEPARATE_FILE, "TO_SINGLE_RESULT_FILE", "Export to single file" );
|
||||
addItem( RicExportEclipseSectorModelUi::EXPORT_TO_SEPARATE_FILE_PER_RESULT,
|
||||
"TO_SEPARATE_RESULT_FILES",
|
||||
"Export to a separate file per parameter" );
|
||||
@ -235,9 +233,7 @@ void RicExportEclipseSectorModelUi::defineEditorAttribute( const caf::PdmFieldHa
|
||||
if ( !m_caseData ) return;
|
||||
|
||||
const RigMainGrid* mainGrid = m_caseData->mainGrid();
|
||||
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ),
|
||||
int( mainGrid->cellCountJ() ),
|
||||
int( mainGrid->cellCountK() ) );
|
||||
cvf::Vec3i gridDimensions( int( mainGrid->cellCountI() ), int( mainGrid->cellCountJ() ), int( mainGrid->cellCountK() ) );
|
||||
|
||||
caf::PdmUiLineEditorAttribute* lineEditorAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
|
||||
@ -521,8 +517,8 @@ QString RicExportEclipseSectorModelUi::defaultFolder() const
|
||||
if ( fallbackDirectory.isEmpty() )
|
||||
{
|
||||
QString generalFallback = RiaApplication::instance()->lastUsedDialogDirectory( "GENERAL_DATA" );
|
||||
fallbackDirectory = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID",
|
||||
generalFallback );
|
||||
fallbackDirectory =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "BINARY_GRID", generalFallback );
|
||||
}
|
||||
return RiaApplication::instance()->lastUsedDialogDirectoryWithFallback( "EXPORT_INPUT_GRID", fallbackDirectory );
|
||||
}
|
||||
|
@ -105,9 +105,7 @@ protected:
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
||||
|
@ -434,9 +434,7 @@ void RicExportLgrFeature::exportLgrsForWellPaths( const QString&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportLgrFeature::exportLgrs( const QString& exportFolder,
|
||||
const QString& wellName,
|
||||
const std::vector<LgrInfo>& lgrInfos )
|
||||
void RicExportLgrFeature::exportLgrs( const QString& exportFolder, const QString& wellName, const std::vector<LgrInfo>& lgrInfos )
|
||||
{
|
||||
if ( !lgrInfos.empty() )
|
||||
{
|
||||
@ -477,12 +475,9 @@ std::vector<LgrInfo>
|
||||
{
|
||||
for ( const auto& wellPath : wellPaths )
|
||||
{
|
||||
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
|
||||
wellPath,
|
||||
timeStep,
|
||||
completionTypes,
|
||||
&isIntersectingOtherLgrs );
|
||||
auto newLgrs = buildLgrsPerMainCell( firstLgrId + (int)lgrs.size(),
|
||||
auto intersectingCells =
|
||||
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
|
||||
auto newLgrs = buildLgrsPerMainCell( firstLgrId + (int)lgrs.size(),
|
||||
eclipseCase,
|
||||
wellPath,
|
||||
intersectingCells,
|
||||
@ -515,11 +510,8 @@ std::vector<LgrInfo>
|
||||
int lgrId = firstLgrId + (int)lgrs.size();
|
||||
auto lgrName = lgrNameFactory.newName( "WELL", lgrId );
|
||||
|
||||
auto intersectingCells = cellsIntersectingCompletions( eclipseCase,
|
||||
wellPath,
|
||||
timeStep,
|
||||
completionTypes,
|
||||
&isIntersectingOtherLgrs );
|
||||
auto intersectingCells =
|
||||
cellsIntersectingCompletions( eclipseCase, wellPath, timeStep, completionTypes, &isIntersectingOtherLgrs );
|
||||
lgrs.push_back( buildLgr( lgrId, lgrName, eclipseCase, wellPath->name(), intersectingCells, lgrCellCounts ) );
|
||||
|
||||
if ( isIntersectingOtherLgrs ) wellsIntersectingOtherLgrs->push_back( wellPath->name() );
|
||||
@ -610,12 +602,8 @@ std::vector<LgrInfo> RicExportLgrFeature::buildLgrsPerCompletion(
|
||||
for ( auto complInfo : occupiedBbs )
|
||||
{
|
||||
auto lgrName = lgrNameFactory.newName( complInfo.first.type );
|
||||
lgrs.push_back( buildLgr( lgrId++,
|
||||
lgrName,
|
||||
eclipseCase,
|
||||
complInfo.first.wellPathName,
|
||||
complInfo.second,
|
||||
lgrSizesPerMainGridCell ) );
|
||||
lgrs.push_back(
|
||||
buildLgr( lgrId++, lgrName, eclipseCase, complInfo.first.wellPathName, complInfo.second, lgrSizesPerMainGridCell ) );
|
||||
}
|
||||
return lgrs;
|
||||
}
|
||||
@ -713,12 +701,11 @@ std::vector<RigCompletionDataGridCell>
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<CompletionInfo, std::vector<RigCompletionDataGridCell>>
|
||||
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion(
|
||||
RimEclipseCase* eclipseCase,
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
size_t timeStep,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
QStringList* wellsIntersectingOtherLgrs )
|
||||
RicExportLgrFeature::cellsIntersectingCompletions_PerCompletion( RimEclipseCase* eclipseCase,
|
||||
const std::vector<RimWellPath*>& wellPaths,
|
||||
size_t timeStep,
|
||||
const std::set<RigCompletionData::CompletionType>& completionTypes,
|
||||
QStringList* wellsIntersectingOtherLgrs )
|
||||
{
|
||||
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
|
||||
|
@ -68,9 +68,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
|
@ -43,10 +43,8 @@ class RicExportSelectedWellPathsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
static void handleAction( const std::vector<RimWellPath*>& wellPaths );
|
||||
static void exportWellPath( const RimWellPath* wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder,
|
||||
bool writeProjectInfo = true );
|
||||
static void
|
||||
exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder, bool writeProjectInfo = true );
|
||||
|
||||
static RicExportWellPathsUi* openDialog();
|
||||
static QFilePtr openFileForExport( const QString& folderName, const QString& fileName );
|
||||
|
@ -141,8 +141,8 @@ void RicExportToLasFileFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<RimWellLogCurve*> curves = RicWellLogPlotCurveFeatureImpl::selectedWellLogCurves();
|
||||
if ( curves.size() == 0 ) return;
|
||||
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder(
|
||||
"WELL_LOGS_DIR" );
|
||||
QString defaultDir =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "WELL_LOGS_DIR" );
|
||||
|
||||
RigLasFileExporter lasExporter( curves );
|
||||
RicExportToLasFileResampleUi featureUi;
|
||||
|
@ -106,8 +106,7 @@ void RicExportToLasFileResampleUi::tvdrkbDiffForWellPaths( std::vector<double>*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames,
|
||||
const std::vector<double>& rkbDiffs )
|
||||
void RicExportToLasFileResampleUi::setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs )
|
||||
{
|
||||
for ( size_t i = 0; i < wellNames.size(); i++ )
|
||||
{
|
||||
@ -212,8 +211,8 @@ void RicExportToLasFileResampleUi::defineUiOrdering( QString uiConfigName, caf::
|
||||
caf::PdmUiGroup* tvdrkbGroup = uiOrdering.addNewGroup( "TVDRKB" );
|
||||
tvdrkbGroup->add( &exportTvdrkb );
|
||||
|
||||
caf::PdmUiGroup* group = tvdrkbGroup->addNewGroup(
|
||||
"Difference between TVDRKB and TVDMSL, clear diff for no export" );
|
||||
caf::PdmUiGroup* group =
|
||||
tvdrkbGroup->addNewGroup( "Difference between TVDRKB and TVDMSL, clear diff for no export" );
|
||||
for ( auto& obj : m_tvdrkbOffsets )
|
||||
{
|
||||
group->add( &obj->tvdrkbOffset );
|
||||
|
@ -69,9 +69,7 @@ public:
|
||||
void setRkbDiffs( const std::vector<QString>& wellNames, const std::vector<double>& rkbDiffs );
|
||||
void setUnitConversionOptionEnabled( bool enabled );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
@ -46,9 +46,7 @@ CAF_CMD_SOURCE_INIT( RicExportVisibleWellPathsFeature, "RicExportVisibleWellPath
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath,
|
||||
double mdStepSize,
|
||||
const QString& folder )
|
||||
void RicExportVisibleWellPathsFeature::exportWellPath( const RimWellPath* wellPath, double mdStepSize, const QString& folder )
|
||||
{
|
||||
auto geom = wellPath->wellPathGeometry();
|
||||
double currMd = geom->measureDepths().front() - mdStepSize;
|
||||
|
@ -83,8 +83,8 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered( bool isChecked )
|
||||
// Find input reservoir for this property
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
{
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(
|
||||
inputProperty->parentField()->ownerObject() );
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection =
|
||||
dynamic_cast<RimEclipseInputPropertyCollection*>( inputProperty->parentField()->ownerObject() );
|
||||
if ( !inputPropertyCollection ) return;
|
||||
|
||||
eclipseCase = dynamic_cast<RimEclipseCase*>( inputPropertyCollection->parentField()->ownerObject() );
|
||||
|
@ -54,9 +54,7 @@ protected:
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
QString getDefaultExportPath() const;
|
||||
|
@ -112,9 +112,8 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
|
||||
&errMsg );
|
||||
if ( !isOk )
|
||||
{
|
||||
QString fullError = QString( "Failed to exported current result to %1. Error was: %2" )
|
||||
.arg( exportSettings.fileName )
|
||||
.arg( errMsg );
|
||||
QString fullError =
|
||||
QString( "Failed to exported current result to %1. Error was: %2" ).arg( exportSettings.fileName ).arg( errMsg );
|
||||
RiaLogging::error( fullError );
|
||||
}
|
||||
}
|
||||
|
@ -91,8 +91,8 @@ void RicSaveEclipseResultAsInputPropertyFeature::onActionTriggered( bool isCheck
|
||||
|
||||
if ( eclipseCellColors )
|
||||
{
|
||||
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec = new RicSaveEclipseResultAsInputPropertyExec(
|
||||
eclipseCellColors );
|
||||
RicSaveEclipseResultAsInputPropertyExec* cellResultSaveExec =
|
||||
new RicSaveEclipseResultAsInputPropertyExec( eclipseCellColors );
|
||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cellResultSaveExec );
|
||||
}
|
||||
}
|
||||
|
@ -135,10 +135,9 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
|
||||
RimGridView* rigv = dynamic_cast<RimGridView*>( riv );
|
||||
if ( rigv )
|
||||
{
|
||||
QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage();
|
||||
absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath,
|
||||
fileName + "_Statistics",
|
||||
".png" );
|
||||
QImage img = rigv->overlayInfoConfig()->statisticsDialogScreenShotImage();
|
||||
absoluteFileName =
|
||||
caf::Utils::constructFullFileName( absSnapshotPath, fileName + "_Statistics", ".png" );
|
||||
RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, img );
|
||||
}
|
||||
}
|
||||
|
@ -63,10 +63,8 @@ QString RicSnapshotFilenameGenerator::generateSnapshotFilenameForRimView( Rim3dV
|
||||
QStringList timeSteps = rimView->ownerCase()->timeStepStrings();
|
||||
int timeStep = rimView->currentTimeStep();
|
||||
|
||||
QString fileName = QString( "%1_%2_%3" )
|
||||
.arg( rimView->ownerCase()->caseUserDescription() )
|
||||
.arg( rimView->name() )
|
||||
.arg( resultName( rimView ) );
|
||||
QString fileName =
|
||||
QString( "%1_%2_%3" ).arg( rimView->ownerCase()->caseUserDescription() ).arg( rimView->name() ).arg( resultName( rimView ) );
|
||||
|
||||
if ( !timeSteps.empty() )
|
||||
fileName += QString( "_%1_%2" ).arg( timeStep, 2, 10, QChar( '0' ) ).arg( timeSteps[timeStep] );
|
||||
|
@ -201,10 +201,8 @@ QString RicSnapshotViewToFileFeature::generateSaveFileName( const QString& defau
|
||||
}
|
||||
|
||||
QString defaultAbsFileName = caf::Utils::constructFullFileName( startPath, defaultFileBaseName, ".png" );
|
||||
QString fileName = QFileDialog::getSaveFileName( nullptr,
|
||||
tr( "Export to File" ),
|
||||
defaultAbsFileName,
|
||||
fileExtensionFilter );
|
||||
QString fileName =
|
||||
QFileDialog::getSaveFileName( nullptr, tr( "Export to File" ), defaultAbsFileName, fileExtensionFilter );
|
||||
if ( !fileName.isEmpty() )
|
||||
{
|
||||
// Remember the directory to next time
|
||||
|
@ -46,8 +46,8 @@ bool RicAddStoredFlowCharacteristicsPlotFeature::isCommandEnabled()
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot =
|
||||
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( flowPlotColl->defaultFlowCharacteristicsPlot() == flowCharacteristicsPlot )
|
||||
{
|
||||
@ -70,8 +70,8 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimFlowCharacteristicsPlot* sourceObject = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimFlowCharacteristicsPlot* sourceObject =
|
||||
dynamic_cast<RimFlowCharacteristicsPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimFlowCharacteristicsPlot* flowCharacteristicsPlot = dynamic_cast<RimFlowCharacteristicsPlot*>(
|
||||
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
@ -46,8 +46,8 @@ bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled()
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
if ( flowPlotColl->defaultWellAllocPlot() == wellAllocationPlot )
|
||||
{
|
||||
@ -70,8 +70,8 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
|
||||
RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
|
||||
if ( flowPlotColl )
|
||||
{
|
||||
RimWellAllocationPlot* sourceObject = dynamic_cast<RimWellAllocationPlot*>(
|
||||
caf::SelectionManager::instance()->selectedItem() );
|
||||
RimWellAllocationPlot* sourceObject =
|
||||
dynamic_cast<RimWellAllocationPlot*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
sourceObject->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
@ -77,9 +77,8 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
CAF_ASSERT( project );
|
||||
|
||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField()
|
||||
? project->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
if ( !sumCaseColl ) return;
|
||||
|
||||
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
|
||||
|
@ -101,8 +101,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
|
||||
// assert(flowDiagSolution);
|
||||
CVF_ASSERT( flowDiagSolution );
|
||||
|
||||
RimFlowDiagSolution::TracerStatusType tracerStatus = flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(),
|
||||
timeStep );
|
||||
RimFlowDiagSolution::TracerStatusType tracerStatus =
|
||||
flowDiagSolution->tracerStatusInTimeStep( selectedWell->name(), timeStep );
|
||||
if ( !( tracerStatus == RimFlowDiagSolution::INJECTOR || tracerStatus == RimFlowDiagSolution::PRODUCER ) )
|
||||
{
|
||||
return;
|
||||
@ -130,9 +130,8 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells( Rim
|
||||
viewToModify->cellResult()->loadDataAndUpdate();
|
||||
viewToModify->cellResult()->updateConnectedEditors();
|
||||
|
||||
std::vector<QString> tracerNames = findContributingTracerNames( flowDiagSolution,
|
||||
selectedWell->simWellData(),
|
||||
timeStep );
|
||||
std::vector<QString> tracerNames =
|
||||
findContributingTracerNames( flowDiagSolution, selectedWell->simWellData(), timeStep );
|
||||
|
||||
for ( RimSimWellInView* w : viewToModify->wellCollection()->wells() )
|
||||
{
|
||||
|
@ -35,8 +35,8 @@ CAF_CMD_SOURCE_INIT( RicShowContributingWellsFromPlotFeature, "RicShowContributi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
RiaGuiApplication::instance()->activePlotWindow() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
|
||||
|
||||
if ( wellAllocationPlot ) return true;
|
||||
|
||||
@ -48,8 +48,8 @@ bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowContributingWellsFromPlotFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimWellAllocationPlot* wellAllocationPlot = dynamic_cast<RimWellAllocationPlot*>(
|
||||
RiaGuiApplication::instance()->activePlotWindow() );
|
||||
RimWellAllocationPlot* wellAllocationPlot =
|
||||
dynamic_cast<RimWellAllocationPlot*>( RiaGuiApplication::instance()->activePlotWindow() );
|
||||
|
||||
if ( !wellAllocationPlot ) return;
|
||||
|
||||
|
@ -62,8 +62,8 @@ bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( view );
|
||||
if ( !eclView ) return false;
|
||||
|
||||
RimSimWellInView* simWellFromWellPath = eclView->wellCollection()->findWell(
|
||||
wellPathCollection[0]->associatedSimulationWellName() );
|
||||
RimSimWellInView* simWellFromWellPath =
|
||||
eclView->wellCollection()->findWell( wellPathCollection[0]->associatedSimulationWellName() );
|
||||
|
||||
if ( simWellFromWellPath )
|
||||
{
|
||||
|
@ -117,8 +117,8 @@ void RicCreateMultipleFracturesFeature::slotAppendFractures()
|
||||
// If this is the first fracture, set default result name
|
||||
if ( fractureCollection->allFractures().empty() )
|
||||
{
|
||||
RimEclipseView* activeView = dynamic_cast<RimEclipseView*>(
|
||||
RiaApplication::instance()->activeReservoirView() );
|
||||
RimEclipseView* activeView =
|
||||
dynamic_cast<RimEclipseView*>( RiaApplication::instance()->activeReservoirView() );
|
||||
if ( activeView )
|
||||
{
|
||||
activeView->fractureColors()->setDefaultResultName();
|
||||
@ -220,8 +220,9 @@ void RicCreateMultipleFracturesFeature::onActionTriggered( bool isChecked )
|
||||
dialogButtonBox->clear();
|
||||
|
||||
{
|
||||
QPushButton* pushButton = dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
|
||||
QDialogButtonBox::ActionRole );
|
||||
QPushButton* pushButton =
|
||||
dialogButtonBox->addButton( RiuCreateMultipleFractionsUi::REPLACE_FRACTURES_BUTTON_TEXT,
|
||||
QDialogButtonBox::ActionRole );
|
||||
connect( pushButton, SIGNAL( clicked() ), this, SLOT( slotDeleteAndAppendFractures() ) );
|
||||
pushButton->setDefault( false );
|
||||
pushButton->setAutoDefault( false );
|
||||
|
@ -44,9 +44,7 @@ public:
|
||||
bool isKLayerContained( int oneBasedK ) const;
|
||||
|
||||
private:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
|
@ -349,8 +349,8 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
}
|
||||
else
|
||||
{
|
||||
double spacing = std::max( options[i - 1].uiOption->minimumSpacing(),
|
||||
option.uiOption->minimumSpacing() );
|
||||
double spacing =
|
||||
std::max( options[i - 1].uiOption->minimumSpacing(), option.uiOption->minimumSpacing() );
|
||||
fracMdCandidate = lastFracMd - spacing;
|
||||
}
|
||||
|
||||
@ -358,8 +358,7 @@ std::vector<LocationForNewFracture> RiuCreateMultipleFractionsUi::locationsForNe
|
||||
|
||||
while ( fracMdCandidate > option.endMd )
|
||||
{
|
||||
items.push_back(
|
||||
LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
|
||||
items.push_back( LocationForNewFracture( option.uiOption->fractureTemplate(), w, fracMdCandidate ) );
|
||||
lastFracMd = fracMdCandidate;
|
||||
fracMdCandidate -= option.uiOption->minimumSpacing();
|
||||
fractureCountForWell++;
|
||||
|
@ -93,9 +93,7 @@ public:
|
||||
private:
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly ) override;
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu,
|
||||
QMenu* menu,
|
||||
QWidget* fieldEditorWidget ) override;
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
@ -90,8 +90,7 @@ void RicPasteGridCrossPlotDataSetFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>>
|
||||
RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
|
||||
std::vector<caf::PdmPointer<RimGridCrossPlotDataSet>> RicPasteGridCrossPlotDataSetFeature::gridCrossPlotDataSetsOnClipboard()
|
||||
{
|
||||
caf::PdmObjectGroup objectGroup;
|
||||
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
|
||||
|
@ -46,10 +46,7 @@ void RicHoloLensCreateSessionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicHoloLensCreateSessionUi createSessionUi;
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(),
|
||||
&createSessionUi,
|
||||
"HoloLens - Create Session",
|
||||
"" );
|
||||
caf::PdmUiPropertyViewDialog propertyDialog( RiuMainWindow::instance(), &createSessionUi, "HoloLens - Create Session", "" );
|
||||
propertyDialog.resize( QSize( 400, 330 ) );
|
||||
|
||||
{
|
||||
|
@ -71,8 +71,7 @@ RimGridView* RicHoloLensExportToFolderUi::viewForExport() const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
bool* useOptionsOnly )
|
||||
RicHoloLensExportToFolderUi::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user