mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
clang-format: Set column width to 140
* Set column width to 140 * Use c++20 * Remove redundant virtual
This commit is contained in:
parent
8768e186d8
commit
f8c5cf389f
@ -1,12 +1,12 @@
|
||||
---
|
||||
Language: Cpp
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
AlignEscapedNewlinesLeft: true
|
||||
AlignOperands: true
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
@ -26,30 +26,30 @@ BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: true
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 120
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
ColumnLimit: 140
|
||||
CommentPragmas: "^ IWYU pragma:"
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
|
||||
DisableFormat: false
|
||||
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '$'
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: ".*"
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: "$"
|
||||
IndentCaseLabels: true
|
||||
IndentWidth: 4
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
JavaScriptQuotes: Leave
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MacroBlockBegin: ""
|
||||
MacroBlockEnd: ""
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: Inner
|
||||
PenaltyBreakAssignment: 13
|
||||
@ -60,20 +60,19 @@ PenaltyBreakString: 100
|
||||
PenaltyExcessCharacter: 5
|
||||
PenaltyReturnTypeOnItsOwnLine: 30
|
||||
PointerAlignment: Left
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
ReflowComments: true
|
||||
SortIncludes: true
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: true
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
...
|
||||
Standard: c++20
|
||||
TabWidth: 4
|
||||
UseTab: Never
|
||||
|
@ -243,8 +243,7 @@ void RiaApplication::createMockModelCustomized()
|
||||
void RiaApplication::createInputMockModel()
|
||||
{
|
||||
bool createView = true;
|
||||
RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( QStringList( RiaDefines::mockModelBasicInputCase() ),
|
||||
createView );
|
||||
RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( QStringList( RiaDefines::mockModelBasicInputCase() ), createView );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -287,8 +286,7 @@ RimGridView* RiaApplication::activeMainOrComparisonGridView()
|
||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||
RimGridView* viewOrComparisonView = activeView;
|
||||
|
||||
if ( activeView != nullptr && activeView->viewer() &&
|
||||
activeView->viewer()->viewerCommands()->isCurrentPickInComparisonView() )
|
||||
if ( activeView != nullptr && activeView->viewer() && activeView->viewer()->viewerCommands()->isCurrentPickInComparisonView() )
|
||||
{
|
||||
if ( RimGridView* compView = dynamic_cast<RimGridView*>( activeView->activeComparisonView() ) )
|
||||
{
|
||||
@ -347,10 +345,9 @@ bool RiaApplication::openFile( const QString& fileName )
|
||||
}
|
||||
else if ( int( fileType ) & int( RiaDefines::ImportFileType::ANY_ECLIPSE_FILE ) )
|
||||
{
|
||||
bool createView = true;
|
||||
bool createPlot = true;
|
||||
loadingSucceded =
|
||||
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, createPlot, createView );
|
||||
bool createView = true;
|
||||
bool createPlot = true;
|
||||
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, createPlot, createView );
|
||||
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType );
|
||||
}
|
||||
|
||||
@ -358,8 +355,7 @@ bool RiaApplication::openFile( const QString& fileName )
|
||||
{
|
||||
if ( !lastUsedDialogTag.isEmpty() )
|
||||
{
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( lastUsedDialogTag,
|
||||
QFileInfo( fileName ).absolutePath() );
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory( lastUsedDialogTag, QFileInfo( fileName ).absolutePath() );
|
||||
}
|
||||
|
||||
onFileSuccessfullyLoaded( fileName, fileType );
|
||||
@ -429,9 +425,7 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath( QString proje
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::loadProject( const QString& projectFileName,
|
||||
ProjectLoadAction loadAction,
|
||||
RiaProjectModifier* projectModifier )
|
||||
bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAction loadAction, RiaProjectModifier* projectModifier )
|
||||
{
|
||||
// First Close the current project
|
||||
|
||||
@ -468,8 +462,8 @@ bool RiaApplication::loadProject( const QString& projectFileName,
|
||||
{
|
||||
closeProject();
|
||||
|
||||
QString errMsg = QString( "Unknown project file version detected in file \n%1\n\nCould not open project." )
|
||||
.arg( fullPathProjectFileName );
|
||||
QString errMsg =
|
||||
QString( "Unknown project file version detected in file \n%1\n\nCould not open project." ).arg( fullPathProjectFileName );
|
||||
|
||||
onProjectOpeningError( errMsg );
|
||||
|
||||
@ -919,9 +913,8 @@ 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,
|
||||
bool importGrouped,
|
||||
gsl::not_null<QStringList*> errorMessages )
|
||||
std::vector<RimWellPath*>
|
||||
RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, bool importGrouped, gsl::not_null<QStringList*> errorMessages )
|
||||
{
|
||||
if ( m_project == nullptr || m_project->oilFields.size() < 1 ) return {};
|
||||
|
||||
@ -990,8 +983,7 @@ 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();
|
||||
|
||||
@ -1103,9 +1095,7 @@ QProcessEnvironment RiaApplication::pythonProcessEnvironment() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::launchProcess( const QString& program,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnvironment )
|
||||
bool RiaApplication::launchProcess( const QString& program, const QStringList& arguments, const QProcessEnvironment& processEnvironment )
|
||||
{
|
||||
if ( m_workerProcess == nullptr )
|
||||
{
|
||||
@ -1242,8 +1232,7 @@ void RiaApplication::applyPreferences()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaApplication::commandLineParameterHelp()
|
||||
{
|
||||
QString helpText =
|
||||
QString( "\n%1 v. %2\n" ).arg( RI_APPLICATION_NAME ).arg( RiaApplication::getVersionStringApp( false ) );
|
||||
QString helpText = QString( "\n%1 v. %2\n" ).arg( RI_APPLICATION_NAME ).arg( RiaApplication::getVersionStringApp( false ) );
|
||||
helpText += "Copyright Equinor ASA, Ceetron Solution AS, Ceetron AS\n\n";
|
||||
helpText += m_commandLineHelpText;
|
||||
|
||||
|
@ -147,12 +147,10 @@ public:
|
||||
|
||||
bool openOdbCaseFromFile( const QString& fileName, bool applyTimeStepFilter = false );
|
||||
|
||||
std::vector<RimWellPath*> addWellPathsToModel( QList<QString> wellPathFilePaths,
|
||||
bool importGrouped,
|
||||
gsl::not_null<QStringList*> errorMessages );
|
||||
std::vector<RimWellPath*>
|
||||
addWellPathsToModel( QList<QString> wellPathFilePaths, bool importGrouped, gsl::not_null<QStringList*> errorMessages );
|
||||
void addWellPathFormationsToModel( QList<QString> wellPathFilePaths );
|
||||
std::vector<RimWellLogFile*> addWellLogsToModel( const QList<QString>& wellLogFilePaths,
|
||||
gsl::not_null<QStringList*> errorMessages );
|
||||
std::vector<RimWellLogFile*> addWellLogsToModel( const QList<QString>& wellLogFilePaths, gsl::not_null<QStringList*> errorMessages );
|
||||
|
||||
QString scriptDirectories() const;
|
||||
QString scriptEditorPath() const;
|
||||
|
@ -61,8 +61,7 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAndRedrawAllViews(
|
||||
const std::vector<RimEclipseCase*>& eclipseCases )
|
||||
void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAndRedrawAllViews( const std::vector<RimEclipseCase*>& eclipseCases )
|
||||
{
|
||||
clearCompletionTypeResults( eclipseCases );
|
||||
|
||||
|
@ -229,8 +229,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
{
|
||||
// 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
|
||||
@ -238,9 +237,8 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
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() )
|
||||
{
|
||||
@ -282,8 +280,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
|
||||
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() ) );
|
||||
|
||||
bool createView = true;
|
||||
bool createPlot = true;
|
||||
|
@ -32,8 +32,7 @@ RiaCurveSetDefinition::RiaCurveSetDefinition()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaCurveSetDefinition::RiaCurveSetDefinition( RimSummaryCaseCollection* ensemble,
|
||||
const RifEclipseSummaryAddress& summaryAddress )
|
||||
RiaCurveSetDefinition::RiaCurveSetDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
||||
: m_ensemble( ensemble )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
{
|
||||
|
@ -38,9 +38,7 @@ void caf::AppEnum<RiaDefines::TimeFormatComponents>::setUp()
|
||||
addItem( RiaDefines::TimeFormatComponents::TIME_FORMAT_NONE, "NO_TIME", "No Time of Day" );
|
||||
addItem( RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR, "HOUR", "Hour Only" );
|
||||
addItem( RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE, "HOUR_MINUTE", "Hour and Minute" );
|
||||
addItem( RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND,
|
||||
"HOUR_MINUTE_SECONDS",
|
||||
"Hour, Minutes and Seconds" );
|
||||
addItem( RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND, "HOUR_MINUTE_SECONDS", "Hour, Minutes and Seconds" );
|
||||
setDefault( RiaDefines::TimeFormatComponents::TIME_FORMAT_NONE );
|
||||
}
|
||||
|
||||
|
@ -232,10 +232,8 @@ QString RiaGuiApplication::promptForProjectSaveAsFileName() const
|
||||
startPath += "/ResInsightProject.rsp";
|
||||
}
|
||||
|
||||
QString fileName = RiuFileDialogTools::getSaveFileName( nullptr,
|
||||
tr( "Save File" ),
|
||||
startPath,
|
||||
tr( "Project Files (*.rsp);;All files(*.*)" ) );
|
||||
QString fileName =
|
||||
RiuFileDialogTools::getSaveFileName( nullptr, tr( "Save File" ), startPath, tr( "Project Files (*.rsp);;All files(*.*)" ) );
|
||||
return fileName;
|
||||
}
|
||||
|
||||
@ -244,8 +242,7 @@ QString RiaGuiApplication::promptForProjectSaveAsFileName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaGuiApplication::askUserToSaveModifiedProject()
|
||||
{
|
||||
if ( RiaPreferencesSystem::current()->showProjectChangedDialog() &&
|
||||
caf::PdmUiModelChangeDetector::instance()->isModelChanged() )
|
||||
if ( RiaPreferencesSystem::current()->showProjectChangedDialog() && caf::PdmUiModelChangeDetector::instance()->isModelChanged() )
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon( QMessageBox::Question );
|
||||
@ -643,8 +640,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
{
|
||||
// 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
|
||||
@ -652,9 +648,8 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
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() )
|
||||
{
|
||||
@ -696,8 +691,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
|
||||
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() ) );
|
||||
|
||||
bool createView = true;
|
||||
bool createPlot = true;
|
||||
@ -1106,8 +1100,7 @@ bool RiaGuiApplication::isMainPlotWindowVisible() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaGuiApplication::addToRecentFiles( const QString& fileName )
|
||||
{
|
||||
CVF_ASSERT( m_recentFileActionProvider &&
|
||||
"The provider needs to be created before any attempts to use the recent file actions" );
|
||||
CVF_ASSERT( m_recentFileActionProvider && "The provider needs to be created before any attempts to use the recent file actions" );
|
||||
m_recentFileActionProvider->addFileName( fileName );
|
||||
}
|
||||
|
||||
@ -1116,8 +1109,7 @@ void RiaGuiApplication::addToRecentFiles( const QString& fileName )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QAction*> RiaGuiApplication::recentFileActions() const
|
||||
{
|
||||
CVF_ASSERT( m_recentFileActionProvider &&
|
||||
"The provider needs to be created before any attempts to use the recent file actions" );
|
||||
CVF_ASSERT( m_recentFileActionProvider && "The provider needs to be created before any attempts to use the recent file actions" );
|
||||
return m_recentFileActionProvider->actions();
|
||||
}
|
||||
|
||||
@ -1461,22 +1453,20 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
auto rim3dView = dynamic_cast<Rim3dView*>( viewWindow );
|
||||
if ( rim3dView )
|
||||
{
|
||||
if ( oldPreferences &&
|
||||
( applySettingsToAllViews || rim3dView->meshMode() == oldPreferences->defaultMeshModeType() ) )
|
||||
if ( oldPreferences && ( applySettingsToAllViews || rim3dView->meshMode() == oldPreferences->defaultMeshModeType() ) )
|
||||
{
|
||||
rim3dView->meshMode = m_preferences->defaultMeshModeType();
|
||||
}
|
||||
|
||||
if ( oldPreferences && ( applySettingsToAllViews || rim3dView->backgroundColor() ==
|
||||
oldPreferences->defaultViewerBackgroundColor() ) )
|
||||
if ( oldPreferences &&
|
||||
( applySettingsToAllViews || rim3dView->backgroundColor() == oldPreferences->defaultViewerBackgroundColor() ) )
|
||||
{
|
||||
rim3dView->setBackgroundColor( m_preferences->defaultViewerBackgroundColor() );
|
||||
rim3dView->applyBackgroundColorAndFontChanges();
|
||||
}
|
||||
|
||||
if ( oldPreferences &&
|
||||
( applySettingsToAllViews ||
|
||||
rim3dView->scaleZ() == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
( applySettingsToAllViews || rim3dView->scaleZ() == static_cast<double>( oldPreferences->defaultScaleFactorZ() ) ) )
|
||||
{
|
||||
rim3dView->setScaleZ( static_cast<double>( m_preferences->defaultScaleFactorZ() ) );
|
||||
rim3dView->updateScaling();
|
||||
@ -1489,8 +1479,8 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( rim3dView );
|
||||
if ( eclipseView )
|
||||
{
|
||||
if ( oldPreferences && ( applySettingsToAllViews || eclipseView->wellCollection()->wellLabelColor() ==
|
||||
oldPreferences->defaultWellLabelColor() ) )
|
||||
if ( oldPreferences && ( applySettingsToAllViews ||
|
||||
eclipseView->wellCollection()->wellLabelColor() == oldPreferences->defaultWellLabelColor() ) )
|
||||
{
|
||||
eclipseView->wellCollection()->wellLabelColor = m_preferences->defaultWellLabelColor();
|
||||
}
|
||||
@ -1644,8 +1634,7 @@ void RiaGuiApplication::runMultiCaseSnapshots( const QString& templateProj
|
||||
if ( !m_mainWindow ) return;
|
||||
|
||||
QByteArray curState = m_mainWindow->dockManager()->saveState( 0 );
|
||||
m_mainWindow->dockManager()->restoreState(
|
||||
RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
m_mainWindow->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
|
||||
const size_t numGridFiles = gridFileNames.size();
|
||||
for ( size_t i = 0; i < numGridFiles; i++ )
|
||||
@ -1677,11 +1666,10 @@ bool RiaGuiApplication::notify( QObject* receiver, QEvent* event )
|
||||
if ( !memoryExhaustedBox && !allocatingMessageBox )
|
||||
{
|
||||
allocatingMessageBox = true;
|
||||
memoryExhaustedBox =
|
||||
new QMessageBox( QMessageBox::Critical,
|
||||
"ResInsight Exhausted Memory",
|
||||
"Memory is Exhausted!\n ResInsight could not allocate the memory needed, and is now "
|
||||
"unstable and will probably crash soon." );
|
||||
memoryExhaustedBox = new QMessageBox( QMessageBox::Critical,
|
||||
"ResInsight Exhausted Memory",
|
||||
"Memory is Exhausted!\n ResInsight could not allocate the memory needed, and is now "
|
||||
"unstable and will probably crash soon." );
|
||||
}
|
||||
|
||||
bool done = false;
|
||||
|
@ -97,9 +97,7 @@ public:
|
||||
bool askUserToSaveModifiedProject();
|
||||
bool saveProjectAs( const QString& fileName );
|
||||
|
||||
void runMultiCaseSnapshots( const QString& templateProjectFileName,
|
||||
std::vector<QString> gridFileNames,
|
||||
const QString& snapshotFolderName );
|
||||
void runMultiCaseSnapshots( const QString& templateProjectFileName, std::vector<QString> gridFileNames, const QString& snapshotFolderName );
|
||||
bool useShaders() const;
|
||||
|
||||
RiaDefines::RINavigationPolicy navigationPolicy() const;
|
||||
|
@ -196,9 +196,7 @@ std::set<RigEclipseResultAddress> RiaMemoryCleanup::findEclipseResultsInUse() co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaMemoryCleanup::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RiaMemoryCleanup::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_case )
|
||||
{
|
||||
@ -243,7 +241,7 @@ QList<caf::PdmOptionItemInfo> RiaMemoryCleanup::calculateValueOptions( const caf
|
||||
if ( eclipseCase )
|
||||
{
|
||||
std::set<RigEclipseResultAddress> resultsInUse = findEclipseResultsInUse();
|
||||
RigCaseCellResultsData* caseData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
RigCaseCellResultsData* caseData = eclipseCase->results( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
if ( caseData )
|
||||
{
|
||||
m_eclipseResultAddresses = caseData->existingResults();
|
||||
@ -279,11 +277,10 @@ QList<caf::PdmOptionItemInfo> RiaMemoryCleanup::calculateValueOptions( const caf
|
||||
|
||||
for ( size_t i = 0; i < m_geomResultAddresses.size(); ++i )
|
||||
{
|
||||
const RigFemResultAddress& result = m_geomResultAddresses[i];
|
||||
bool inUse = resultsInUse.count( result );
|
||||
QString posText = caf::AppEnum<RigFemResultPosEnum>::uiTextFromIndex( result.resultPosType );
|
||||
QString resultsText =
|
||||
QString( "%1, %2" ).arg( posText ).arg( QString::fromStdString( result.fieldName ) );
|
||||
const RigFemResultAddress& result = m_geomResultAddresses[i];
|
||||
bool inUse = resultsInUse.count( result );
|
||||
QString posText = caf::AppEnum<RigFemResultPosEnum>::uiTextFromIndex( result.resultPosType );
|
||||
QString resultsText = QString( "%1, %2" ).arg( posText ).arg( QString::fromStdString( result.fieldName ) );
|
||||
if ( !result.componentName.empty() )
|
||||
{
|
||||
resultsText += QString( ", %1" ).arg( QString::fromStdString( result.componentName ) );
|
||||
@ -313,9 +310,7 @@ void RiaMemoryCleanup::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaMemoryCleanup::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RiaMemoryCleanup::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_performDelete )
|
||||
{
|
||||
|
@ -50,9 +50,7 @@ private:
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimCase*> m_case;
|
||||
|
@ -41,8 +41,7 @@ RiaPlotWindowRedrawScheduler* RiaPlotWindowRedrawScheduler::instance()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPlotWindowRedrawScheduler::scheduleMultiPlotBookUpdate( RiuMultiPlotBook* plotBook,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType )
|
||||
void RiaPlotWindowRedrawScheduler::scheduleMultiPlotBookUpdate( RiuMultiPlotBook* plotBook, RiaDefines::MultiPlotPageUpdateType updateType )
|
||||
{
|
||||
if ( m_plotBooksToUpdate.count( plotBook ) == 0 )
|
||||
{
|
||||
@ -59,8 +58,7 @@ void RiaPlotWindowRedrawScheduler::scheduleMultiPlotBookUpdate( RiuMultiPlotBook
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPlotWindowRedrawScheduler::scheduleMultiPlotPageUpdate( RiuMultiPlotPage* plotPage,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType )
|
||||
void RiaPlotWindowRedrawScheduler::scheduleMultiPlotPageUpdate( RiuMultiPlotPage* plotPage, RiaDefines::MultiPlotPageUpdateType updateType )
|
||||
{
|
||||
if ( m_plotPagesToUpdate.count( plotPage ) == 0 )
|
||||
{
|
||||
@ -170,10 +168,7 @@ void RiaPlotWindowRedrawScheduler::startTimer( int msecs )
|
||||
if ( !m_plotWindowUpdateTimer )
|
||||
{
|
||||
m_plotWindowUpdateTimer.reset( new QTimer( this ) );
|
||||
connect( m_plotWindowUpdateTimer.data(),
|
||||
SIGNAL( timeout() ),
|
||||
this,
|
||||
SLOT( slotUpdateAndReplotScheduledItemsWhenReady() ) );
|
||||
connect( m_plotWindowUpdateTimer.data(), SIGNAL( timeout() ), this, SLOT( slotUpdateAndReplotScheduledItemsWhenReady() ) );
|
||||
}
|
||||
|
||||
if ( !m_plotWindowUpdateTimer->isActive() )
|
||||
|
@ -40,12 +40,10 @@ class RiaPlotWindowRedrawScheduler : public QObject
|
||||
public:
|
||||
static RiaPlotWindowRedrawScheduler* instance();
|
||||
|
||||
void scheduleMultiPlotBookUpdate(
|
||||
RiuMultiPlotBook* plotWindow,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType = RiaDefines::MultiPlotPageUpdateType::ALL );
|
||||
void scheduleMultiPlotPageUpdate(
|
||||
RiuMultiPlotPage* plotWindow,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType = RiaDefines::MultiPlotPageUpdateType::ALL );
|
||||
void scheduleMultiPlotBookUpdate( RiuMultiPlotBook* plotWindow,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType = RiaDefines::MultiPlotPageUpdateType::ALL );
|
||||
void scheduleMultiPlotPageUpdate( RiuMultiPlotPage* plotWindow,
|
||||
RiaDefines::MultiPlotPageUpdateType updateType = RiaDefines::MultiPlotPageUpdateType::ALL );
|
||||
void schedulePlotWidgetReplot( RiuPlotWidget* plotWidget );
|
||||
void clearAllScheduledUpdates();
|
||||
void performScheduledUpdatesAndReplots();
|
||||
|
@ -84,13 +84,7 @@ RiaPreferences::RiaPreferences()
|
||||
caf::AppEnum<RiaDefines::RINavigationPolicy>( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_RMS ),
|
||||
"Navigation Mode" );
|
||||
|
||||
CAF_PDM_InitField( &enableGrpcServer,
|
||||
"enableGrpcServer",
|
||||
true,
|
||||
"Enable Python Script Server",
|
||||
"",
|
||||
"Remote Procedure Call Scripting Engine",
|
||||
"" );
|
||||
CAF_PDM_InitField( &enableGrpcServer, "enableGrpcServer", true, "Enable Python Script Server", "", "Remote Procedure Call Scripting Engine", "" );
|
||||
CAF_PDM_InitField( &defaultGrpcPortNumber, "defaultGrpcPort", 50051, "Default Python Script Server Port" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &scriptDirectories, "scriptDirectory", "Shared Script Folder(s)" );
|
||||
@ -195,10 +189,7 @@ RiaPreferences::RiaPreferences()
|
||||
"Disable SSL Certificate Verification (HoloLens)" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &holoLensDisableCertificateVerification );
|
||||
|
||||
CAF_PDM_InitField( &csvTextExportFieldSeparator,
|
||||
"csvTextExportFieldSeparator",
|
||||
QString( "," ),
|
||||
"CSV Text Export Field Separator" );
|
||||
CAF_PDM_InitField( &csvTextExportFieldSeparator, "csvTextExportFieldSeparator", QString( "," ), "CSV Text Export Field Separator" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_readerSettings, "readerSettings", "Reader Settings" );
|
||||
m_readerSettings = new RifReaderSettings;
|
||||
@ -215,10 +206,7 @@ RiaPreferences::RiaPreferences()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotTemplateFolders, "plotTemplateFolders", "Plot Template Folder(s)" );
|
||||
m_plotTemplateFolders.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
CAF_PDM_InitField( &m_maxPlotTemplateFoldersDepth,
|
||||
"MaxPlotTemplateFoldersDepth",
|
||||
2,
|
||||
"Maximum Plot Template Folder Search Depth" );
|
||||
CAF_PDM_InitField( &m_maxPlotTemplateFoldersDepth, "MaxPlotTemplateFoldersDepth", 2, "Maximum Plot Template Folder Search Depth" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_lastUsedPlotTemplate, "defaultPlotTemplate", "Default Plot Template" );
|
||||
|
||||
@ -287,9 +275,7 @@ RiaPreferences* RiaPreferences::current()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
m_readerSettings->defineEditorAttribute( field, uiConfigName, attribute );
|
||||
m_summaryPreferences->defineEditorAttribute( field, uiConfigName, attribute );
|
||||
@ -320,8 +306,7 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
caf::PdmUiLineEditorAttribute* myAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->validator =
|
||||
new RiaValidRegExpValidator( RiaPreferences::current()->defaultMultiLateralWellNamePattern() );
|
||||
myAttr->validator = new RiaValidRegExpValidator( RiaPreferences::current()->defaultMultiLateralWellNamePattern() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -472,8 +457,7 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::
|
||||
{
|
||||
QDate exampleDate = QDate( 2019, 8, 16 );
|
||||
QString fullDateFormat =
|
||||
RiaQDateTimeTools::dateFormatString( dateFormat,
|
||||
RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||
RiaQDateTimeTools::dateFormatString( dateFormat, RiaDefines::DateFormatComponents::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 ) ) );
|
||||
@ -485,8 +469,7 @@ QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::
|
||||
{
|
||||
QTime exampleTime = QTime( 15, 48, 22 );
|
||||
QString timeFormatString =
|
||||
RiaQDateTimeTools::timeFormatString( timeFormat,
|
||||
RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
||||
RiaQDateTimeTools::timeFormatString( timeFormat, RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
||||
QString uiText = QString( "%1 (%2)" ).arg( timeFormatString ).arg( exampleTime.toString( timeFormatString ) );
|
||||
uiText.replace( "AP", "AM/PM" );
|
||||
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( timeFormat ) ) );
|
||||
@ -506,9 +489,7 @@ void RiaPreferences::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferences::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RiaPreferences::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_pageSize )
|
||||
{
|
||||
@ -666,8 +647,7 @@ const QString& RiaPreferences::timeFormat() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferences::dateTimeFormat( RiaDefines::DateFormatComponents dateComponents,
|
||||
RiaDefines::TimeFormatComponents timeComponents ) const
|
||||
QString RiaPreferences::dateTimeFormat( RiaDefines::DateFormatComponents dateComponents, RiaDefines::TimeFormatComponents timeComponents ) const
|
||||
{
|
||||
return QString( "%1 %2" )
|
||||
.arg( RiaQDateTimeTools::dateFormatString( m_dateFormat(), dateComponents ) )
|
||||
|
@ -72,9 +72,9 @@ public:
|
||||
|
||||
const QString& dateFormat() const;
|
||||
const QString& timeFormat() const;
|
||||
QString dateTimeFormat(
|
||||
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY,
|
||||
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND ) const;
|
||||
QString
|
||||
dateTimeFormat( RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY,
|
||||
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND ) const;
|
||||
|
||||
int maxScriptFoldersDepth() const;
|
||||
int maxPlotTemplateFoldersDepth() const;
|
||||
@ -146,13 +146,11 @@ public:
|
||||
caf::PdmField<QString> csvTextExportFieldSeparator;
|
||||
|
||||
protected:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) 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();
|
||||
|
@ -45,10 +45,7 @@ RiaPreferencesGeoMech::RiaPreferencesGeoMech()
|
||||
CAF_PDM_InitField( &m_keepTemporaryFiles, "keepTemporaryFile", false, "Keep temporary parameter files (for debugging)" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_keepTemporaryFiles );
|
||||
|
||||
CAF_PDM_InitField( &m_waitForInputFileEdit,
|
||||
"waitForInputFileEdit",
|
||||
true,
|
||||
"Pause to allow modification of input files before running modeling." );
|
||||
CAF_PDM_InitField( &m_waitForInputFileEdit, "waitForInputFileEdit", true, "Pause to allow modification of input files before running modeling." );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_waitForInputFileEdit );
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,7 @@ void RiaPreferencesSummary::SummaryHistoryCurveStyleModeType::setUp()
|
||||
{
|
||||
addItem( RiaPreferencesSummary::SummaryHistoryCurveStyleMode::SYMBOLS, "SYMBOLS", "Symbols" );
|
||||
addItem( RiaPreferencesSummary::SummaryHistoryCurveStyleMode::LINES, "LINES", "Lines" );
|
||||
addItem( RiaPreferencesSummary::SummaryHistoryCurveStyleMode::SYMBOLS_AND_LINES,
|
||||
"SYMBOLS_AND_LINES",
|
||||
"Symbols and Lines" );
|
||||
addItem( RiaPreferencesSummary::SummaryHistoryCurveStyleMode::SYMBOLS_AND_LINES, "SYMBOLS_AND_LINES", "Symbols and Lines" );
|
||||
setDefault( RiaPreferencesSummary::SummaryHistoryCurveStyleMode::SYMBOLS );
|
||||
}
|
||||
|
||||
@ -83,9 +81,7 @@ CAF_PDM_SOURCE_INIT( RiaPreferencesSummary, "RiaPreferencesSummary" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaPreferencesSummary::RiaPreferencesSummary()
|
||||
{
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryRestartFilesShowImportDialog,
|
||||
"summaryRestartFilesShowImportDialog",
|
||||
"Show Import Dialog" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_summaryRestartFilesShowImportDialog, "summaryRestartFilesShowImportDialog", "Show Import Dialog" );
|
||||
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_summaryRestartFilesShowImportDialog );
|
||||
|
||||
@ -413,9 +409,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesSummary::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RiaPreferencesSummary::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_defaultRowsPerPage || field == &m_defaultColumnCount )
|
||||
{
|
||||
@ -471,10 +465,8 @@ QList<caf::PdmOptionItemInfo> RiaPreferencesSummary::calculateValueOptions( cons
|
||||
SummaryRestartFilesImportModeType skip( RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT );
|
||||
SummaryRestartFilesImportModeType separate( RiaPreferencesSummary::SummaryRestartFilesImportMode::SEPARATE_CASES );
|
||||
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( skip.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( separate.uiText(),
|
||||
RiaPreferencesSummary::SummaryRestartFilesImportMode::SEPARATE_CASES ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( skip.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( separate.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::SEPARATE_CASES ) );
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_summaryEnsembleImportMode )
|
||||
{
|
||||
@ -482,24 +474,19 @@ QList<caf::PdmOptionItemInfo> RiaPreferencesSummary::calculateValueOptions( cons
|
||||
SummaryRestartFilesImportModeType skip( RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT );
|
||||
SummaryRestartFilesImportModeType allowImport( RiaPreferencesSummary::SummaryRestartFilesImportMode::IMPORT );
|
||||
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( skip.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( allowImport.uiText(),
|
||||
RiaPreferencesSummary::SummaryRestartFilesImportMode::IMPORT ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( skip.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::NOT_IMPORT ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( allowImport.uiText(), RiaPreferencesSummary::SummaryRestartFilesImportMode::IMPORT ) );
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_defaultColumnCount )
|
||||
{
|
||||
for ( size_t i = 0; i < ColumnCountEnum::size(); ++i )
|
||||
{
|
||||
RiaDefines::ColumnCount enumVal = ColumnCountEnum::fromIndex( i );
|
||||
QString columnCountString = ( enumVal == RiaDefines::ColumnCount::COLUMNS_UNLIMITED )
|
||||
? "Unlimited"
|
||||
: QString( "%1" ).arg( static_cast<int>( enumVal ) );
|
||||
RiaDefines::ColumnCount enumVal = ColumnCountEnum::fromIndex( i );
|
||||
QString columnCountString =
|
||||
( enumVal == RiaDefines::ColumnCount::COLUMNS_UNLIMITED ) ? "Unlimited" : QString( "%1" ).arg( static_cast<int>( enumVal ) );
|
||||
QString iconPath = QString( ":/Columns%1.png" ).arg( columnCountString );
|
||||
options.push_back( caf::PdmOptionItemInfo( ColumnCountEnum::uiText( enumVal ),
|
||||
enumVal,
|
||||
false,
|
||||
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( ColumnCountEnum::uiText( enumVal ), enumVal, false, caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
|
||||
}
|
||||
}
|
||||
else if ( fieldNeedingOptions == &m_defaultRowsPerPage )
|
||||
@ -508,10 +495,8 @@ QList<caf::PdmOptionItemInfo> RiaPreferencesSummary::calculateValueOptions( cons
|
||||
{
|
||||
RiaDefines::RowCount enumVal = RowCountEnum::fromIndex( i );
|
||||
QString iconPath = QString( ":/Rows%1.png" ).arg( static_cast<int>( enumVal ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( RowCountEnum::uiText( enumVal ),
|
||||
enumVal,
|
||||
false,
|
||||
caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( RowCountEnum::uiText( enumVal ), enumVal, false, caf::IconProvider( iconPath, QSize( 24, 16 ) ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -545,9 +530,7 @@ cvf::Color3f RiaPreferencesSummary::historyCurveContrastColor() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesSummary::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue )
|
||||
void RiaPreferencesSummary::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_selectDefaultTemplates )
|
||||
{
|
||||
@ -580,8 +563,7 @@ std::vector<QString> RiaPreferencesSummary::defaultSummaryPlotTemplates( bool re
|
||||
if ( singleTemplate && returnEnsembleTemplates ) continue;
|
||||
if ( !singleTemplate && !returnEnsembleTemplates ) continue;
|
||||
|
||||
if ( std::count( templatesToUse.begin(), templatesToUse.end(), fileName ) == 0 )
|
||||
templatesToUse.push_back( fileName );
|
||||
if ( std::count( templatesToUse.begin(), templatesToUse.end(), fileName ) == 0 ) templatesToUse.push_back( fileName );
|
||||
}
|
||||
|
||||
return templatesToUse;
|
||||
|
@ -114,9 +114,7 @@ public:
|
||||
|
||||
cvf::Color3f historyCurveContrastColor() const;
|
||||
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
protected:
|
||||
|
@ -29,9 +29,7 @@ namespace caf
|
||||
template <>
|
||||
void RiaPreferencesSystem::EclipseTextFileReaderModeType::setUp()
|
||||
{
|
||||
addItem( RiaPreferencesSystem::EclipseTextFileReaderMode::MEMORY_MAPPED_FILE,
|
||||
"MEMORY_MAPPED_FILE",
|
||||
"Memory Mapped File Import" );
|
||||
addItem( RiaPreferencesSystem::EclipseTextFileReaderMode::MEMORY_MAPPED_FILE, "MEMORY_MAPPED_FILE", "Memory Mapped File Import" );
|
||||
addItem( RiaPreferencesSystem::EclipseTextFileReaderMode::FILE, "FILE", "Default File Import" );
|
||||
|
||||
setDefault( RiaPreferencesSystem::EclipseTextFileReaderMode::FILE );
|
||||
@ -53,10 +51,7 @@ RiaPreferencesSystem::RiaPreferencesSystem()
|
||||
CAF_PDM_InitField( &m_appendClassNameToUiText, "appendClassNameToUiText", false, "Show Class Names" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_appendClassNameToUiText );
|
||||
|
||||
CAF_PDM_InitField( &m_appendFieldKeywordToToolTipText,
|
||||
"appendFieldKeywordToToolTipText",
|
||||
false,
|
||||
"Show Field Keyword in ToolTip" );
|
||||
CAF_PDM_InitField( &m_appendFieldKeywordToToolTipText, "appendFieldKeywordToToolTipText", false, "Show Field Keyword in ToolTip" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_appendFieldKeywordToToolTipText );
|
||||
|
||||
CAF_PDM_InitField( &m_showViewIdInProjectTree, "showViewIdInTree", false, "Show View Id in Project Tree" );
|
||||
@ -65,10 +60,7 @@ RiaPreferencesSystem::RiaPreferencesSystem()
|
||||
CAF_PDM_InitField( &m_showTestToolbar, "showTestToolbar", false, "Enable Test Toolbar" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_showTestToolbar );
|
||||
|
||||
CAF_PDM_InitField( &m_includeFractureDebugInfoFile,
|
||||
"includeFractureDebugInfoFile",
|
||||
false,
|
||||
"Include Fracture Debug Info for Completion Export" );
|
||||
CAF_PDM_InitField( &m_includeFractureDebugInfoFile, "includeFractureDebugInfoFile", false, "Include Fracture Debug Info for Completion Export" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_includeFractureDebugInfoFile );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_holoLensExportFolder, "holoLensExportFolder", "HoloLens Export Folder" );
|
||||
@ -273,9 +265,7 @@ QList<caf::PdmOptionItemInfo> RiaPreferencesSystem::calculateValueOptions( const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesSystem::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RiaPreferencesSystem::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_holoLensExportFolder )
|
||||
{
|
||||
|
@ -62,9 +62,7 @@ public:
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_appendClassNameToUiText;
|
||||
|
@ -21,9 +21,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaRftPltCurveDefinition::RiaRftPltCurveDefinition( const RifDataSourceForRftPlt& address,
|
||||
const QString& wellName,
|
||||
const QDateTime& timeStep )
|
||||
RiaRftPltCurveDefinition::RiaRftPltCurveDefinition( const RifDataSourceForRftPlt& address, const QString& wellName, const QDateTime& timeStep )
|
||||
: m_curveAddress( address )
|
||||
, m_wellName( wellName )
|
||||
, m_timeStep( timeStep )
|
||||
|
@ -33,9 +33,7 @@ class RimSummaryCase;
|
||||
class RiaRftPltCurveDefinition
|
||||
{
|
||||
public:
|
||||
explicit RiaRftPltCurveDefinition( const RifDataSourceForRftPlt& address,
|
||||
const QString& wellName,
|
||||
const QDateTime& timeStep );
|
||||
explicit RiaRftPltCurveDefinition( const RifDataSourceForRftPlt& address, const QString& wellName, const QDateTime& timeStep );
|
||||
|
||||
const RifDataSourceForRftPlt& address() const;
|
||||
const QString& wellName() const;
|
||||
|
@ -45,13 +45,9 @@ void AppEnum<RiaDefines::CurveProperty>::setUp()
|
||||
addItem( RiaDefines::CurveProperty::FLUID_LOSS_COEFFICIENT, "FLUID_LOSS_COEFFICIENT", "Fluid Loss Coefficient" );
|
||||
addItem( RiaDefines::CurveProperty::SPURT_LOSS, "SPURT_LOSS", "Spurt Loss" );
|
||||
addItem( RiaDefines::CurveProperty::TEMPERATURE, "TEMPERATURE", "Temperature" );
|
||||
addItem( RiaDefines::CurveProperty::RELATIVE_PERMEABILITY_FACTOR,
|
||||
"RELATIVE_PERMEABILITY_FACTOR",
|
||||
"Relative Permeability Factor" );
|
||||
addItem( RiaDefines::CurveProperty::RELATIVE_PERMEABILITY_FACTOR, "RELATIVE_PERMEABILITY_FACTOR", "Relative Permeability Factor" );
|
||||
addItem( RiaDefines::CurveProperty::PORO_ELASTIC_CONSTANT, "PORO_ELASTIC_CONSTANT", "Poro-Elastic Constant" );
|
||||
addItem( RiaDefines::CurveProperty::THERMAL_EXPANSION_COEFFICIENT,
|
||||
"THERMAL_EXPANSION_COEFFICIENT",
|
||||
"Thermal Expansion Coefficient" );
|
||||
addItem( RiaDefines::CurveProperty::THERMAL_EXPANSION_COEFFICIENT, "THERMAL_EXPANSION_COEFFICIENT", "Thermal Expansion Coefficient" );
|
||||
addItem( RiaDefines::CurveProperty::IMMOBILE_FLUID_SATURATION, "IMMOBILE_FLUID_SATURATION", "Immobile Fluid Saturation" );
|
||||
addItem( RiaDefines::CurveProperty::NET_TO_GROSS, "NET_TO_GROSS", "Net-To-Gross" );
|
||||
addItem( RiaDefines::CurveProperty::POROSITY_UNSCALED, "POROSITY_UNSCALED", "Porosity (Unscaled)" );
|
||||
|
@ -50,8 +50,7 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble,
|
||||
const RifEclipseSummaryAddress& summaryAddress )
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
||||
: m_summaryCase( nullptr )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
, m_ensemble( ensemble )
|
||||
@ -102,8 +101,7 @@ void RiaSummaryCurveDefinition::setSummaryAddress( const RifEclipseSummaryAddres
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition,
|
||||
gsl::not_null<std::vector<double>*> values )
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddress().isValid() ) return;
|
||||
if ( !curveDefinition.summaryCase() ) return;
|
||||
@ -145,8 +143,7 @@ QString RiaSummaryCurveDefinition::curveDefinitionText() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaSummaryCurveDefinition::curveDefinitionText( const QString& caseName,
|
||||
const RifEclipseSummaryAddress& summaryAddress )
|
||||
QString RiaSummaryCurveDefinition::curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress )
|
||||
{
|
||||
QString txt;
|
||||
|
||||
|
@ -37,9 +37,7 @@ class RiaSummaryCurveDefinition
|
||||
{
|
||||
public:
|
||||
RiaSummaryCurveDefinition();
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCase,
|
||||
const RifEclipseSummaryAddress& summaryAddress,
|
||||
bool isEnsembleCurve );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& summaryAddress, bool isEnsembleCurve );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
||||
|
||||
RimSummaryCase* summaryCase() const;
|
||||
@ -51,7 +49,7 @@ public:
|
||||
bool operator<( const RiaSummaryCurveDefinition& other ) const;
|
||||
|
||||
// TODO: Consider moving to a separate tools class
|
||||
static void resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values );
|
||||
static void resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values );
|
||||
static std::vector<time_t> timeSteps( const RiaSummaryCurveDefinition& curveDefinition );
|
||||
|
||||
QString curveDefinitionText() const;
|
||||
|
@ -78,8 +78,7 @@ QString viscosityResultName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString getExpectedThermalFractureUnit( const QString& name, RiaDefines::EclipseUnitSystem unitSystem )
|
||||
{
|
||||
CAF_ASSERT( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC ||
|
||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
||||
CAF_ASSERT( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC || unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
||||
|
||||
// parameter name --> { metric unit, field unit }
|
||||
std::map<QString, std::pair<QString, QString>> mapping =
|
||||
|
@ -88,8 +88,7 @@ void RiaViewRedrawScheduler::updateAndRedrawScheduledViews()
|
||||
independent3DViewsToUpdate.insert( m_resViewsToUpdate[i] );
|
||||
}
|
||||
|
||||
for ( std::set<Rim3dView*>::iterator it = independent3DViewsToUpdate.begin(); it != independent3DViewsToUpdate.end();
|
||||
++it )
|
||||
for ( std::set<Rim3dView*>::iterator it = independent3DViewsToUpdate.begin(); it != independent3DViewsToUpdate.end(); ++it )
|
||||
{
|
||||
if ( *it )
|
||||
{
|
||||
|
@ -67,19 +67,10 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
||||
"If <filename> has extension .SMSPEC, import the summary file (does not open the "
|
||||
"corresponding grid file)",
|
||||
cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "size",
|
||||
"<width> <height>",
|
||||
"Set size of the main application window.",
|
||||
cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "size", "<width> <height>", "Set size of the main application window.", cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "console", "", "Launch as a console application without graphics" );
|
||||
progOpt->registerOption( "server",
|
||||
"[<portnumber>]",
|
||||
"Launch as a GRPC server. Default port is 50051",
|
||||
cvf::ProgramOptions::SINGLE_VALUE );
|
||||
progOpt->registerOption( "portnumberfile",
|
||||
"[<filename>]",
|
||||
"Write the port number to this file.",
|
||||
cvf::ProgramOptions::SINGLE_VALUE );
|
||||
progOpt->registerOption( "server", "[<portnumber>]", "Launch as a GRPC server. Default port is 50051", cvf::ProgramOptions::SINGLE_VALUE );
|
||||
progOpt->registerOption( "portnumberfile", "[<filename>]", "Write the port number to this file.", cvf::ProgramOptions::SINGLE_VALUE );
|
||||
|
||||
progOpt->registerOption( "startdir", "<folder>", "Set startup directory.\n", cvf::ProgramOptions::SINGLE_VALUE );
|
||||
|
||||
@ -101,10 +92,7 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
||||
"'commandFileReplaceCases'.\n",
|
||||
cvf::ProgramOptions::SINGLE_VALUE );
|
||||
|
||||
progOpt->registerOption( "snapshotsize",
|
||||
"<width> <height>",
|
||||
"Set size of exported snapshot images.",
|
||||
cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "snapshotsize", "<width> <height>", "Set size of exported snapshot images.", cvf::ProgramOptions::MULTI_VALUE );
|
||||
progOpt->registerOption( "snapshotfolder",
|
||||
"<folder>",
|
||||
"Set the destination folder for exported snapshot images.\n",
|
||||
|
@ -53,8 +53,7 @@ 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 ),
|
||||
@ -77,9 +76,7 @@ std::vector<cvf::Vec3d>
|
||||
for ( int i = 0; i < 12; i++ )
|
||||
{
|
||||
int partCountsIndex = i / 4;
|
||||
edgePoints[i] = splitLine( mainCellCorners[edgeCorners[i].first],
|
||||
mainCellCorners[edgeCorners[i].second],
|
||||
nxyz[partCountsIndex] );
|
||||
edgePoints[i] = splitLine( mainCellCorners[edgeCorners[i].first], mainCellCorners[edgeCorners[i].second], nxyz[partCountsIndex] );
|
||||
}
|
||||
|
||||
// lowIJ, highIJ, lowJK, highKJ,
|
||||
@ -134,8 +131,7 @@ std::vector<cvf::Vec3d>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaCellDividingTools::computeFlowDistance( const std::array<cvf::Vec3d, 8>& cellVertices,
|
||||
const cvf::Vec3d& areaCenter )
|
||||
double RiaCellDividingTools::computeFlowDistance( const std::array<cvf::Vec3d, 8>& cellVertices, const cvf::Vec3d& areaCenter )
|
||||
{
|
||||
auto subCellCorners = createHexCornerCoords( cellVertices, 2, 2, 2 );
|
||||
|
||||
|
@ -29,8 +29,7 @@
|
||||
class RiaCellDividingTools
|
||||
{
|
||||
public:
|
||||
static std::vector<cvf::Vec3d>
|
||||
createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners, size_t nx, size_t ny, size_t nz );
|
||||
static std::vector<cvf::Vec3d> createHexCornerCoords( std::array<cvf::Vec3d, 8> mainCellCorners, size_t nx, size_t ny, size_t nz );
|
||||
|
||||
static double computeFlowDistance( const std::array<cvf::Vec3d, 8>& cellVertices, const cvf::Vec3d& areaCenter );
|
||||
};
|
||||
|
@ -636,12 +636,9 @@ caf::ColorTable RiaColorTables::createBrightnessBasedColorTable( cvf::Color3ub b
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<RiaDefines::PhaseType, caf::ColorTable> RiaColorTables::phaseColors()
|
||||
{
|
||||
static std::vector<cvf::Color3ub> waterColors{ cvf::Color3ub( cvf::Color3::DARK_BLUE ),
|
||||
cvf::Color3ub( cvf::Color3::SKY_BLUE ) };
|
||||
static std::vector<cvf::Color3ub> gasColors{ cvf::Color3ub( cvf::Color3::DARK_RED ),
|
||||
cvf::Color3ub( cvf::Color3::PINK ) };
|
||||
static std::vector<cvf::Color3ub> oilColors{ cvf::Color3ub( cvf::Color3::DARK_GREEN ),
|
||||
cvf::Color3ub( cvf::Color3::YELLOW_GREEN ) };
|
||||
static std::vector<cvf::Color3ub> waterColors{ cvf::Color3ub( cvf::Color3::DARK_BLUE ), cvf::Color3ub( cvf::Color3::SKY_BLUE ) };
|
||||
static std::vector<cvf::Color3ub> gasColors{ cvf::Color3ub( cvf::Color3::DARK_RED ), cvf::Color3ub( cvf::Color3::PINK ) };
|
||||
static std::vector<cvf::Color3ub> oilColors{ cvf::Color3ub( cvf::Color3::DARK_GREEN ), cvf::Color3ub( cvf::Color3::YELLOW_GREEN ) };
|
||||
|
||||
return { { RiaDefines::PhaseType::WATER_PHASE, caf::ColorTable( waterColors ) },
|
||||
{ RiaDefines::PhaseType::GAS_PHASE, caf::ColorTable( gasColors ) },
|
||||
|
@ -160,10 +160,7 @@ cvf::Color3f RiaColorTools::textColor3f()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::blendCvfColors( const cvf::Color3f& color1,
|
||||
const cvf::Color3f& color2,
|
||||
int weight1 /*= 1*/,
|
||||
int weight2 /*= 1*/ )
|
||||
cvf::Color3f RiaColorTools::blendCvfColors( const cvf::Color3f& color1, const cvf::Color3f& color2, int weight1 /*= 1*/, int weight2 /*= 1*/ )
|
||||
{
|
||||
CVF_ASSERT( weight1 > 0 && weight2 > 0 );
|
||||
int weightsum = weight1 + weight2;
|
||||
|
@ -45,9 +45,8 @@ public:
|
||||
static QColor textColor();
|
||||
static cvf::Color3f textColor3f();
|
||||
|
||||
static cvf::Color3f
|
||||
blendCvfColors( const cvf::Color3f& color1, const cvf::Color3f& color2, int weight1 = 1, int weight2 = 1 );
|
||||
static QColor blendQColors( const QColor& color1, const QColor& color2, int weight1 = 1, int weight2 = 1 );
|
||||
static cvf::Color3f blendCvfColors( const cvf::Color3f& color1, const cvf::Color3f& color2, int weight1 = 1, int weight2 = 1 );
|
||||
static QColor blendQColors( const QColor& color1, const QColor& color2, int weight1 = 1, int weight2 = 1 );
|
||||
|
||||
static cvf::Color3f makeLighter( const cvf::Color3f& color1, float normalizedScalingFactor );
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaCurveDataTools::CurveIntervals RiaCurveDataTools::calculateIntervalsOfValidValues( const std::vector<double>& values,
|
||||
bool includePositiveValuesOnly )
|
||||
bool includePositiveValuesOnly )
|
||||
{
|
||||
CurveIntervals intervals;
|
||||
|
||||
|
@ -43,12 +43,10 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
static CurveIntervals calculateIntervalsOfValidValues( const std::vector<double>& values,
|
||||
bool includePositiveValuesOnly );
|
||||
static CurveIntervals calculateIntervalsOfValidValues( const std::vector<double>& values, 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 );
|
||||
|
||||
|
@ -63,9 +63,8 @@ public:
|
||||
public:
|
||||
// Helper methods, available as public to be able to access from unit tests
|
||||
|
||||
static double interpolatedYValue( const XValueType& xValue,
|
||||
const std::vector<XValueType>& curveXValues,
|
||||
const std::vector<double>& curveYValues );
|
||||
static double
|
||||
interpolatedYValue( const XValueType& xValue, const std::vector<XValueType>& curveXValues, const std::vector<double>& curveYValues );
|
||||
|
||||
private:
|
||||
void computeUnionOfXValues( bool includeValuesFromPartialCurves );
|
||||
|
@ -156,9 +156,8 @@ void RiaCurveMerger<XValueType>::computeInterpolatedValues( bool includeValuesFr
|
||||
|
||||
for ( size_t valueIndex = 0; valueIndex < dataValueCount; valueIndex++ )
|
||||
{
|
||||
double interpolValue = interpolatedYValue( m_allXValues[valueIndex],
|
||||
m_originalValues[curveIdx].first,
|
||||
m_originalValues[curveIdx].second );
|
||||
double interpolValue =
|
||||
interpolatedYValue( m_allXValues[valueIndex], m_originalValues[curveIdx].first, m_originalValues[curveIdx].second );
|
||||
if ( !RiaCurveDataTools::isValidValue( interpolValue, false ) )
|
||||
{
|
||||
accumulatedValidValues[valueIndex] = HUGE_VAL;
|
||||
@ -203,7 +202,7 @@ void RiaCurveMerger<XValueType>::computeUnionOfXValues( bool includeValuesForPar
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename XValueType>
|
||||
void RiaCurveMerger<XValueType>::removeValuesForPartialCurves( std::set<XValueType, XComparator>& unionOfXValues,
|
||||
void RiaCurveMerger<XValueType>::removeValuesForPartialCurves( std::set<XValueType, XComparator>& unionOfXValues,
|
||||
const std::vector<std::pair<XValueType, XValueType>>& originalXBounds )
|
||||
{
|
||||
for ( auto it = unionOfXValues.begin(); it != unionOfXValues.end(); )
|
||||
|
@ -62,11 +62,7 @@ QDateTime RiaDateStringParser::parseDateString( const std::string& dateString, O
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& dateString,
|
||||
int& year,
|
||||
int& month,
|
||||
int& day,
|
||||
OrderPreference preference )
|
||||
bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
||||
{
|
||||
auto tryParseAllYearFirst = []( const std::string& dateString, int& year, int& month, int& day ) {
|
||||
return tryParseYearFirst( dateString, year, month, day ) || tryParseDayFirst( dateString, year, month, day ) ||
|
||||
@ -85,21 +81,15 @@ bool RiaDateStringParser::parseDateStringWithSeparators( const std::string& date
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDateStringParser::parseDateStringWithoutSeparators( const std::string& dateString,
|
||||
int& year,
|
||||
int& month,
|
||||
int& day,
|
||||
OrderPreference preference )
|
||||
bool RiaDateStringParser::parseDateStringWithoutSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference )
|
||||
{
|
||||
auto tryParseAllYearFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day ) {
|
||||
return tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
||||
tryParseDayFirstNoSeparators( dateString, year, month, day ) ||
|
||||
tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
||||
tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
||||
};
|
||||
|
||||
auto tryParseAllDayFirstNoSeparators = []( const std::string& dateString, int& year, int& month, int& day ) {
|
||||
return tryParseDayFirstNoSeparators( dateString, year, month, day ) ||
|
||||
tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
||||
return tryParseDayFirstNoSeparators( dateString, year, month, day ) || tryParseYearFirstNoSeparators( dateString, year, month, day ) ||
|
||||
tryParseMonthFirstNoSeparators( dateString, year, month, day );
|
||||
};
|
||||
|
||||
@ -108,9 +98,8 @@ bool RiaDateStringParser::parseDateStringWithoutSeparators( const std::string& d
|
||||
{
|
||||
std::string subString = dateString.substr( firstNumerical );
|
||||
|
||||
return ( preference == OrderPreference::YEAR_FIRST )
|
||||
? tryParseAllYearFirstNoSeparators( subString, year, month, day )
|
||||
: tryParseAllDayFirstNoSeparators( subString, year, month, day );
|
||||
return ( preference == OrderPreference::YEAR_FIRST ) ? tryParseAllYearFirstNoSeparators( subString, year, month, day )
|
||||
: tryParseAllDayFirstNoSeparators( subString, year, month, day );
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -297,9 +286,7 @@ bool RiaDateStringParser::tryParseMonth( const std::string& s, int& month )
|
||||
{
|
||||
auto sMonth = s;
|
||||
sMonth = trimString( sMonth );
|
||||
std::transform( sMonth.begin(), sMonth.end(), sMonth.begin(), []( const char c ) -> char {
|
||||
return (char)::tolower( c );
|
||||
} );
|
||||
std::transform( sMonth.begin(), sMonth.end(), sMonth.begin(), []( const char c ) -> char { return (char)::tolower( c ); } );
|
||||
|
||||
for ( int i = 0; i < 12; i++ )
|
||||
{
|
||||
|
@ -37,21 +37,12 @@ public:
|
||||
};
|
||||
|
||||
static QDateTime parseDateString( const QString& dateString, OrderPreference preference = OrderPreference::YEAR_FIRST );
|
||||
static QDateTime parseDateString( const std::string& dateStringString,
|
||||
OrderPreference preference = OrderPreference::YEAR_FIRST );
|
||||
static QDateTime parseDateString( const std::string& dateStringString, OrderPreference preference = OrderPreference::YEAR_FIRST );
|
||||
|
||||
private:
|
||||
static bool parseDateStringWithSeparators( const std::string& dateString,
|
||||
int& year,
|
||||
int& month,
|
||||
int& day,
|
||||
OrderPreference preference );
|
||||
static bool parseDateStringWithSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference );
|
||||
|
||||
static bool parseDateStringWithoutSeparators( const std::string& dateString,
|
||||
int& year,
|
||||
int& month,
|
||||
int& day,
|
||||
OrderPreference preference );
|
||||
static bool parseDateStringWithoutSeparators( const std::string& dateString, int& year, int& month, int& day, OrderPreference preference );
|
||||
|
||||
static bool tryParseYearFirst( const std::string& s, int& year, int& month, int& day );
|
||||
static bool tryParseDayFirst( const std::string& s, int& year, int& month, int& day );
|
||||
|
@ -50,8 +50,7 @@ double RiaEclipseUnitTools::darcysConstant( RiaDefines::EclipseUnitSystem unitSy
|
||||
/// Convert Gas to oil equivalents
|
||||
/// If field unit, the Gas is in Mega ft^3 while the others are in [stb] (barrel)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem caseUnitSystem,
|
||||
double eclGasFlowRate )
|
||||
double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( RiaDefines::EclipseUnitSystem caseUnitSystem, double eclGasFlowRate )
|
||||
{
|
||||
/// Unused Gas to Barrel conversion :
|
||||
/// we convert gas to stb as well. Based on
|
||||
@ -65,10 +64,8 @@ double RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents( RiaDefine
|
||||
|
||||
double oilEquivalentGasRate = HUGE_VAL;
|
||||
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
oilEquivalentGasRate = fieldGasToOilEquivalent * eclGasFlowRate;
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
oilEquivalentGasRate = metricGasToOilEquivalent * eclGasFlowRate;
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD ) oilEquivalentGasRate = fieldGasToOilEquivalent * eclGasFlowRate;
|
||||
if ( caseUnitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC ) oilEquivalentGasRate = metricGasToOilEquivalent * eclGasFlowRate;
|
||||
|
||||
return oilEquivalentGasRate;
|
||||
}
|
||||
|
@ -91,8 +91,7 @@ QString RiaEnsembleNameTools::findSuitableEnsembleName( const QStringList& fileN
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QStringList> RiaEnsembleNameTools::groupFilesByEnsemble( const QStringList& fileNames,
|
||||
EnsembleGroupingMode groupingMode )
|
||||
std::vector<QStringList> RiaEnsembleNameTools::groupFilesByEnsemble( const QStringList& fileNames, EnsembleGroupingMode groupingMode )
|
||||
{
|
||||
std::vector<QStringList> componentsForAllFilePaths;
|
||||
|
||||
@ -282,12 +281,9 @@ QString RiaEnsembleNameTools::findCommonBaseName( const QStringList& fileNames )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaEnsembleNameTools::uniqueShortName( const QString& sourceFileName,
|
||||
const QStringList& allFileNames,
|
||||
const QString& ensembleCaseName )
|
||||
QString RiaEnsembleNameTools::uniqueShortName( const QString& sourceFileName, const QStringList& allFileNames, const QString& ensembleCaseName )
|
||||
{
|
||||
std::map<QString, QStringList> keyFileComponentsForAllFiles =
|
||||
RiaFilePathTools::keyPathComponentsForEachFilePath( allFileNames );
|
||||
std::map<QString, QStringList> keyFileComponentsForAllFiles = RiaFilePathTools::keyPathComponentsForEachFilePath( allFileNames );
|
||||
|
||||
return uniqueShortNameFromComponents( sourceFileName, keyFileComponentsForAllFiles, ensembleCaseName );
|
||||
}
|
||||
|
@ -42,9 +42,8 @@ public:
|
||||
static QString findSuitableEnsembleName( const QStringList& fileNames, EnsembleGroupingMode groupingMode );
|
||||
static QString findCommonBaseName( const QStringList& fileNames );
|
||||
|
||||
static QString uniqueShortName( const QString& sourceFileName,
|
||||
const QStringList& allFileNames,
|
||||
const QString& ensembleCaseName = QString() );
|
||||
static QString
|
||||
uniqueShortName( const QString& sourceFileName, const QStringList& allFileNames, const QString& ensembleCaseName = QString() );
|
||||
|
||||
static QString uniqueShortNameFromComponents( const QString& sourceFileName,
|
||||
const std::map<QString, QStringList>& keyFileComponentsForAllFiles,
|
||||
|
@ -27,8 +27,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase )
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase )
|
||||
{
|
||||
if ( !( wellPath && eclipseCase ) ) return nullptr;
|
||||
|
||||
@ -41,8 +40,7 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath,
|
||||
RimGeoMechCase* geomCase )
|
||||
RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase )
|
||||
{
|
||||
if ( !( wellPath && geomCase ) ) return nullptr;
|
||||
|
||||
@ -55,8 +53,7 @@ RigGeoMechWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( const RimSimWellInView* simWell,
|
||||
const RigWellPath* wellPathGeom )
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom )
|
||||
{
|
||||
if ( !( simWell && wellPathGeom ) ) return nullptr;
|
||||
|
||||
@ -72,10 +69,7 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( co
|
||||
|
||||
QString caseUserDescription = eclipseCase->caseUserDescription();
|
||||
|
||||
return wlPlotCollection->findOrCreateSimWellExtractor( simWell->name,
|
||||
caseUserDescription,
|
||||
wellPathGeom,
|
||||
eclipseCase->eclipseCaseData() );
|
||||
return wlPlotCollection->findOrCreateSimWellExtractor( simWell->name, caseUserDescription, wellPathGeom, eclipseCase->eclipseCaseData() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -36,8 +36,7 @@ void RiaFieldHandleTools::disableWriteAndSetFieldHidden( caf::PdmFieldHandle* fi
|
||||
|
||||
if ( fieldHandle->uiCapability() )
|
||||
{
|
||||
if ( dynamic_cast<caf::PdmChildFieldHandle*>( fieldHandle ) ||
|
||||
dynamic_cast<caf::PdmChildArrayFieldHandle*>( fieldHandle ) )
|
||||
if ( dynamic_cast<caf::PdmChildFieldHandle*>( fieldHandle ) || dynamic_cast<caf::PdmChildArrayFieldHandle*>( fieldHandle ) )
|
||||
fieldHandle->uiCapability()->setUiTreeHidden( true );
|
||||
else
|
||||
fieldHandle->uiCapability()->setUiHidden( true );
|
||||
@ -52,9 +51,7 @@ void RiaFieldHandleTools::disableWriteAndSetFieldHidden( caf::PdmFieldHandle* fi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaFieldHandleTools::updateOverrideStateAndLabel( caf::PdmFieldHandle* fieldHandle,
|
||||
bool isOverridden,
|
||||
const QString& toolTip )
|
||||
void RiaFieldHandleTools::updateOverrideStateAndLabel( caf::PdmFieldHandle* fieldHandle, bool isOverridden, const QString& toolTip )
|
||||
{
|
||||
// Get the label text as given by the init_field macro
|
||||
QString labelText = fieldHandle->uiCapability()->uiName( fieldHandle->uiCapability()->uiConfigNameForStaticData() );
|
||||
|
@ -109,25 +109,24 @@ void RiaImageCompareReporter::generateHTMLReport( const std::string& fileName, c
|
||||
html += " <tr>\n";
|
||||
if ( m_showOriginal )
|
||||
{
|
||||
html += " <td> <img src=\"" + baseImageFolder + "/" + baseImageNames[fIdx] +
|
||||
"\" width=\"100%\" alt=\"" + baseImageFolder + "/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
html += " <td> <img src=\"" + baseImageFolder + "/" + baseImageNames[fIdx] + "\" width=\"100%\" alt=\"" +
|
||||
baseImageFolder + "/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
}
|
||||
|
||||
if ( m_showGenerated )
|
||||
{
|
||||
html += " <td> <img src=\"" + genImageFolder + "/" + baseImageNames[fIdx] +
|
||||
"\" width=\"100%\" alt=\"" + genImageFolder + "/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
html += " <td> <img src=\"" + genImageFolder + "/" + baseImageNames[fIdx] + "\" width=\"100%\" alt=\"" +
|
||||
genImageFolder + "/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
}
|
||||
|
||||
if ( m_showInteractiveDiff )
|
||||
{
|
||||
html += " <td> <div class = \"image-slider\"> <div> <img src=\"" + baseImageFolder + "/" +
|
||||
baseImageNames[fIdx] + "\" > </div> <img src = \"" + genImageFolder + "/" +
|
||||
baseImageNames[fIdx] + "\" > </div> </td>\n";
|
||||
html += " <td> <div class = \"image-slider\"> <div> <img src=\"" + baseImageFolder + "/" + baseImageNames[fIdx] +
|
||||
"\" > </div> <img src = \"" + genImageFolder + "/" + baseImageNames[fIdx] + "\" > </div> </td>\n";
|
||||
}
|
||||
|
||||
html += " <td> <img src=\"" + diffImageFolder + "/" + baseImageNames[fIdx] +
|
||||
"\" width=\"100%\" alt=\"" + diffImageFolder + "/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
html += " <td> <img src=\"" + diffImageFolder + "/" + baseImageNames[fIdx] + "\" width=\"100%\" alt=\"" + diffImageFolder +
|
||||
"/" + baseImageNames[fIdx] + "\" > </td>\n";
|
||||
html += " </tr>\n";
|
||||
|
||||
// A little air between images
|
||||
|
@ -42,10 +42,7 @@ private:
|
||||
private:
|
||||
struct DirSet
|
||||
{
|
||||
DirSet( const std::string& title,
|
||||
const std::string& baseImageDir,
|
||||
const std::string& newImagesDir,
|
||||
const std::string& diffImagesDir )
|
||||
DirSet( const std::string& title, const std::string& baseImageDir, const std::string& newImagesDir, const std::string& diffImagesDir )
|
||||
: m_title( title )
|
||||
, m_baseImageDir( baseImageDir )
|
||||
, m_newImagesDir( newImagesDir )
|
||||
|
@ -79,13 +79,10 @@ bool RiaImageFileCompare::runComparison( const QString& imgFileName, const QStri
|
||||
// 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 )
|
||||
.arg( refFileName )
|
||||
.arg( ( diffFileName ) );
|
||||
QString args =
|
||||
QString( "-fuzz 0.4% -lowlight-color white -metric ae \"%1\" \"%2\" \"%3\"" ).arg( imgFileName ).arg( refFileName ).arg( ( diffFileName ) );
|
||||
#endif
|
||||
QString completeCommand = QString( "\"%1\" %2" ).arg( m_compareExecutable ).arg( args );
|
||||
|
||||
|
@ -112,8 +112,8 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
|
||||
if ( importSummaryCases && !summaryFileInfos.empty() )
|
||||
{
|
||||
RimSummaryCaseMainCollection* sumCaseColl =
|
||||
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection()
|
||||
: nullptr;
|
||||
if ( sumCaseColl )
|
||||
{
|
||||
std::vector<RimSummaryCase*> candidateCases = sumCaseColl->createSummaryCasesFromFileInfos( summaryFileInfos );
|
||||
@ -122,15 +122,13 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
for ( RimSummaryCase* newSumCase : candidateCases )
|
||||
{
|
||||
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() );
|
||||
auto* existingGridSummaryCase = dynamic_cast<RimGridSummaryCase*>( existingSummaryCase );
|
||||
auto* existingFileSummaryCase = dynamic_cast<RimFileSummaryCase*>( existingSummaryCase );
|
||||
RimSummaryCase* existingSummaryCase = sumCaseColl->findSummaryCaseFromFileName( newSumCase->summaryHeaderFilename() );
|
||||
auto* existingGridSummaryCase = dynamic_cast<RimGridSummaryCase*>( existingSummaryCase );
|
||||
auto* existingFileSummaryCase = dynamic_cast<RimFileSummaryCase*>( existingSummaryCase );
|
||||
if ( existingGridSummaryCase )
|
||||
{
|
||||
duplicatedCases.push_back( newSumCase );
|
||||
@ -204,8 +202,7 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
// Delete cases that already was present
|
||||
for ( auto duplicateCase : duplicatedCases )
|
||||
{
|
||||
candidateCases.erase( std::remove( candidateCases.begin(), candidateCases.end(), duplicateCase ),
|
||||
candidateCases.end() );
|
||||
candidateCases.erase( std::remove( candidateCases.begin(), candidateCases.end(), duplicateCase ), candidateCases.end() );
|
||||
delete duplicateCase;
|
||||
}
|
||||
|
||||
@ -246,17 +243,12 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaImportEclipseCaseTools::openEclipseCaseFromFile( const QString& fileName,
|
||||
bool createView,
|
||||
std::shared_ptr<RifReaderSettings> readerSettings )
|
||||
int RiaImportEclipseCaseTools::openEclipseCaseFromFile( const QString& fileName, bool createView, std::shared_ptr<RifReaderSettings> readerSettings )
|
||||
{
|
||||
if ( !caf::Utils::fileExists( fileName ) ) return -1;
|
||||
|
||||
bool showTimeStepFilter = false;
|
||||
return RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( fileName,
|
||||
showTimeStepFilter,
|
||||
createView,
|
||||
readerSettings );
|
||||
return RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( fileName, showTimeStepFilter, createView, readerSettings );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -268,10 +260,7 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilter( const QString
|
||||
|
||||
bool showTimeStepFilter = true;
|
||||
bool createView = true;
|
||||
return RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( fileName,
|
||||
showTimeStepFilter,
|
||||
createView,
|
||||
nullptr ) >= 0;
|
||||
return RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( fileName, showTimeStepFilter, createView, nullptr ) >= 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -293,8 +282,7 @@ int RiaImportEclipseCaseTools::openEclipseInputCaseFromFileNames( const QStringL
|
||||
return -1;
|
||||
}
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels()
|
||||
: nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr;
|
||||
if ( analysisModels == nullptr ) return false;
|
||||
|
||||
analysisModels->cases.push_back( rimInputReservoir );
|
||||
@ -337,9 +325,9 @@ bool RiaImportEclipseCaseTools::openMockModel( const QString& name )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QString& fileName,
|
||||
bool showTimeStepFilter,
|
||||
bool createView,
|
||||
int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QString& fileName,
|
||||
bool showTimeStepFilter,
|
||||
bool createView,
|
||||
std::shared_ptr<RifReaderSettings> readerSettings )
|
||||
{
|
||||
QFileInfo gridFileName( fileName );
|
||||
@ -352,8 +340,7 @@ int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QStr
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels()
|
||||
: nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr;
|
||||
if ( analysisModels == nullptr )
|
||||
{
|
||||
delete rimResultReservoir;
|
||||
@ -409,8 +396,7 @@ int RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl( const QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaImportEclipseCaseTools::addEclipseCases( const QStringList& fileNames,
|
||||
RimIdenticalGridCaseGroup** resultingCaseGroup /*=nullptr*/ )
|
||||
bool RiaImportEclipseCaseTools::addEclipseCases( const QStringList& fileNames, RimIdenticalGridCaseGroup** resultingCaseGroup /*=nullptr*/ )
|
||||
{
|
||||
if ( fileNames.empty() ) return true;
|
||||
|
||||
@ -531,8 +517,7 @@ int RiaImportEclipseCaseTools::openRoffCaseFromFileNames( const QStringList& fil
|
||||
return -1;
|
||||
}
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels()
|
||||
: nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr;
|
||||
if ( !analysisModels ) return -1;
|
||||
|
||||
analysisModels->cases.push_back( roffCase );
|
||||
@ -546,8 +531,7 @@ int RiaImportEclipseCaseTools::openRoffCaseFromFileNames( const QStringList& fil
|
||||
|
||||
if ( RiaGuiApplication::isRunning() )
|
||||
{
|
||||
if ( RiuMainWindow::instance() )
|
||||
RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() );
|
||||
if ( RiuMainWindow::instance() ) RiuMainWindow::instance()->selectAsCurrentItem( eclipseView->cellResult() );
|
||||
}
|
||||
|
||||
eclipseView->loadDataAndUpdate();
|
||||
|
@ -48,9 +48,7 @@ public:
|
||||
|
||||
static bool addEclipseCases( const QStringList& fileNames, RimIdenticalGridCaseGroup** resultingCaseGroup = nullptr );
|
||||
|
||||
static int openEclipseCaseFromFile( const QString& fileName,
|
||||
bool createView,
|
||||
std::shared_ptr<RifReaderSettings> readerSettings = nullptr );
|
||||
static int openEclipseCaseFromFile( const QString& fileName, bool createView, std::shared_ptr<RifReaderSettings> readerSettings = nullptr );
|
||||
|
||||
static int openRoffCaseFromFileNames( const QStringList& fileNames, bool createDefaultView );
|
||||
|
||||
|
@ -41,10 +41,7 @@ bool almostEqual( double a, double b, double maxRelDiff = std::numeric_limits<do
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaInterpolationTools::linear( const std::vector<double>& x,
|
||||
const std::vector<double>& y,
|
||||
double value,
|
||||
ExtrapolationMode extrapolationMode )
|
||||
double RiaInterpolationTools::linear( const std::vector<double>& x, const std::vector<double>& y, double value, ExtrapolationMode extrapolationMode )
|
||||
{
|
||||
CAF_ASSERT( x.size() == y.size() );
|
||||
|
||||
@ -151,12 +148,7 @@ int RiaInterpolationTools::findPreviousDataPoint( const std::vector<double>& val
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaInterpolationTools::extrapolateRange( int start,
|
||||
int end,
|
||||
int firstPoint,
|
||||
int lastPoint,
|
||||
const std::vector<double>& x,
|
||||
std::vector<double>& y )
|
||||
int RiaInterpolationTools::extrapolateRange( int start, int end, int firstPoint, int lastPoint, const std::vector<double>& x, std::vector<double>& y )
|
||||
{
|
||||
std::vector<double> xs = { x[firstPoint], x[lastPoint] };
|
||||
std::vector<double> ys = { y[firstPoint], y[lastPoint] };
|
||||
@ -175,12 +167,7 @@ int RiaInterpolationTools::extrapolateRange( int start,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaInterpolationTools::interpolateRange( int start,
|
||||
int end,
|
||||
int firstPoint,
|
||||
int lastPoint,
|
||||
const std::vector<double>& x,
|
||||
std::vector<double>& y )
|
||||
int RiaInterpolationTools::interpolateRange( int start, int end, int firstPoint, int lastPoint, const std::vector<double>& x, std::vector<double>& y )
|
||||
{
|
||||
CAF_ASSERT( start <= end );
|
||||
|
||||
|
@ -42,20 +42,10 @@ public:
|
||||
static void interpolateMissingValues( const std::vector<double>& x, std::vector<double>& y );
|
||||
|
||||
private:
|
||||
static int interpolateRange( int start,
|
||||
int end,
|
||||
int firstPoint,
|
||||
int lastPoint,
|
||||
const std::vector<double>& x,
|
||||
std::vector<double>& y );
|
||||
static int extrapolateRange( int start,
|
||||
int end,
|
||||
int firstPoint,
|
||||
int lastPoint,
|
||||
const std::vector<double>& x,
|
||||
std::vector<double>& y );
|
||||
static int findNextDataPoint( const std::vector<double>& values, int index );
|
||||
static int findPreviousDataPoint( const std::vector<double>& values, int index );
|
||||
static int interpolateRange( int start, int end, int firstPoint, int lastPoint, const std::vector<double>& x, std::vector<double>& y );
|
||||
static int extrapolateRange( int start, int end, int firstPoint, int lastPoint, const std::vector<double>& x, std::vector<double>& y );
|
||||
static int findNextDataPoint( const std::vector<double>& values, int index );
|
||||
static int findPreviousDataPoint( const std::vector<double>& values, int index );
|
||||
static double extrapolate( const std::vector<double>& x, const std::vector<double>& y, double value );
|
||||
static double extrapolateClosestValue( const std::vector<double>& x, const std::vector<double>& y, double value );
|
||||
};
|
||||
|
@ -26,8 +26,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaOptionItemFactory::appendOptionItemFromViewNameAndCaseName( Rim3dView* view,
|
||||
QList<caf::PdmOptionItemInfo>* optionItems )
|
||||
void RiaOptionItemFactory::appendOptionItemFromViewNameAndCaseName( Rim3dView* view, QList<caf::PdmOptionItemInfo>* optionItems )
|
||||
{
|
||||
if ( !view || !optionItems ) return;
|
||||
|
||||
@ -57,8 +56,7 @@ void RiaOptionItemFactory::appendOptionItemsForEnsembleCurveSets( QList<caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo
|
||||
RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType )
|
||||
caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType )
|
||||
{
|
||||
auto uiText = caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText( summaryType );
|
||||
|
||||
|
@ -29,7 +29,7 @@ class Rim3dView;
|
||||
class RiaOptionItemFactory
|
||||
{
|
||||
public:
|
||||
static void appendOptionItemFromViewNameAndCaseName( Rim3dView* view, QList<caf::PdmOptionItemInfo>* optionItems );
|
||||
static void appendOptionItemsForEnsembleCurveSets( QList<caf::PdmOptionItemInfo>* options );
|
||||
static void appendOptionItemFromViewNameAndCaseName( Rim3dView* view, QList<caf::PdmOptionItemInfo>* optionItems );
|
||||
static void appendOptionItemsForEnsembleCurveSets( QList<caf::PdmOptionItemInfo>* options );
|
||||
static caf::PdmOptionItemInfo optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType );
|
||||
};
|
||||
|
@ -23,8 +23,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaProjectFileVersionTools::isCandidateVersionNewerThanOther( const QString& candidateProjectFileVersion,
|
||||
const QString& projectFileVersion )
|
||||
bool RiaProjectFileVersionTools::isCandidateVersionNewerThanOther( const QString& candidateProjectFileVersion, const QString& projectFileVersion )
|
||||
{
|
||||
int candidateMajorVersion = 0;
|
||||
int candidateMinorVersion = 0;
|
||||
@ -42,11 +41,7 @@ bool RiaProjectFileVersionTools::isCandidateVersionNewerThanOther( const QString
|
||||
int patchNumber = -1;
|
||||
int developmentId = -1;
|
||||
|
||||
RiaProjectFileVersionTools::decodeVersionString( projectFileVersion,
|
||||
&majorVersion,
|
||||
&minorVersion,
|
||||
&patchNumber,
|
||||
&developmentId );
|
||||
RiaProjectFileVersionTools::decodeVersionString( projectFileVersion, &majorVersion, &minorVersion, &patchNumber, &developmentId );
|
||||
|
||||
return RiaProjectFileVersionTools::isCandidateNewerThanOther( candidateMajorVersion,
|
||||
candidateMinorVersion,
|
||||
|
@ -26,15 +26,10 @@
|
||||
class RiaProjectFileVersionTools
|
||||
{
|
||||
public:
|
||||
static bool isCandidateVersionNewerThanOther( const QString& candidateProjectFileVersion,
|
||||
const QString& otherProjectFileVersion );
|
||||
static bool isCandidateVersionNewerThanOther( const QString& candidateProjectFileVersion, const QString& otherProjectFileVersion );
|
||||
|
||||
// Public to be able to unit test function, not intended to be used
|
||||
static void decodeVersionString( const QString& projectFileVersion,
|
||||
int* majorVersion,
|
||||
int* minorVersion,
|
||||
int* patch,
|
||||
int* developmentId );
|
||||
static void decodeVersionString( const QString& projectFileVersion, int* majorVersion, int* minorVersion, int* patch, int* developmentId );
|
||||
|
||||
private:
|
||||
static bool isCandidateNewerThanOther( int candidateMajorVersion,
|
||||
|
@ -84,12 +84,12 @@ public:
|
||||
static std::vector<QString> supportedDateFormats();
|
||||
static std::vector<QString> supportedTimeFormats();
|
||||
|
||||
static QString dateFormatString(
|
||||
const QString& fullDateFormat,
|
||||
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||
static QString timeFormatString( const QString& fullTimeFormat,
|
||||
RiaDefines::TimeFormatComponents timeComponents =
|
||||
RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
||||
static QString
|
||||
dateFormatString( const QString& fullDateFormat,
|
||||
RiaDefines::DateFormatComponents dateComponents = RiaDefines::DateFormatComponents::DATE_FORMAT_YEAR_MONTH_DAY );
|
||||
static QString
|
||||
timeFormatString( const QString& fullTimeFormat,
|
||||
RiaDefines::TimeFormatComponents timeComponents = RiaDefines::TimeFormatComponents::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
||||
|
||||
static QList<caf::PdmOptionItemInfo> createOptionItems( const std::vector<time_t>& timeSteps );
|
||||
|
||||
|
@ -114,12 +114,10 @@ void RiaRegressionTest::readSettingsFromApplicationStore()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaRegressionTest::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
void RiaRegressionTest::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &folderContainingDiffTool || field == &folderContainingCompareTool ||
|
||||
field == ®ressionTestFolder || field == &folderContainingGitTool )
|
||||
if ( field == &folderContainingDiffTool || field == &folderContainingCompareTool || field == ®ressionTestFolder ||
|
||||
field == &folderContainingGitTool )
|
||||
{
|
||||
auto* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
|
@ -59,7 +59,5 @@ public:
|
||||
caf::PdmField<caf::AppEnum<PlotEngine>> overridePlotEngine;
|
||||
|
||||
protected:
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
QString uiConfigName,
|
||||
caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
};
|
||||
|
@ -181,8 +181,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
}
|
||||
}
|
||||
|
||||
QString htmlReportFileName =
|
||||
generateHtmlReport( folderList, baseFolderName, generatedFolderName, diffFolderName, testDir );
|
||||
QString htmlReportFileName = generateHtmlReport( folderList, baseFolderName, generatedFolderName, diffFolderName, testDir );
|
||||
|
||||
if ( regressionTestConfig.openReportInBrowser() )
|
||||
{
|
||||
@ -203,8 +202,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
{
|
||||
QDir testCaseFolder( folderFileInfo.filePath() );
|
||||
|
||||
bool anyCommandFilesExecuted =
|
||||
findAndExecuteCommandFiles( testCaseFolder, regressionTestConfig, htmlReportFileName );
|
||||
bool anyCommandFilesExecuted = findAndExecuteCommandFiles( testCaseFolder, regressionTestConfig, htmlReportFileName );
|
||||
|
||||
if ( !anyCommandFilesExecuted )
|
||||
{
|
||||
@ -233,9 +231,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
}
|
||||
logInfoTextWithTimeInSeconds( timeStamp, "Initializing test :" + testCaseFolder.absolutePath() );
|
||||
|
||||
app->loadProject( testCaseFolder.filePath( projectFileName ),
|
||||
RiaApplication::ProjectLoadAction::PLA_NONE,
|
||||
projectModifier.p() );
|
||||
app->loadProject( testCaseFolder.filePath( projectFileName ), RiaApplication::ProjectLoadAction::PLA_NONE, projectModifier.p() );
|
||||
|
||||
// Wait until all command objects have completed
|
||||
app->waitUntilCommandObjectsHasBeenProcessed();
|
||||
@ -272,8 +268,8 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Could not find a regression test file named : " + testCaseFolder.absolutePath() +
|
||||
"/" + regTestProjectName + ".rsp" );
|
||||
RiaLogging::error( "Could not find a regression test file named : " + testCaseFolder.absolutePath() + "/" +
|
||||
regTestProjectName + ".rsp" );
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,9 +287,7 @@ void RiaRegressionTestRunner::runRegressionTest()
|
||||
{
|
||||
QString fileName = baseImageFileNames[fIdx];
|
||||
RiaImageFileCompare imgComparator( RegTestNames::imageCompareExeName );
|
||||
bool ok = imgComparator.runComparison( genDir.filePath( fileName ),
|
||||
baseDir.filePath( fileName ),
|
||||
diffDir.filePath( fileName ) );
|
||||
bool ok = imgComparator.runComparison( genDir.filePath( fileName ), baseDir.filePath( fileName ), diffDir.filePath( fileName ) );
|
||||
if ( !ok )
|
||||
{
|
||||
qDebug() << "Error comparing :" << imgComparator.errorMessage() << "\n" << imgComparator.errorDetails();
|
||||
@ -434,9 +428,8 @@ bool RiaRegressionTestRunner::findAndExecuteCommandFiles( const QDir&
|
||||
|
||||
html += "<table>\n";
|
||||
html += " <tr>\n";
|
||||
html +=
|
||||
" <td colspan=\"3\" bgcolor=\"darkblue\" height=\"40\"> <b><font color=\"white\" size=\"3\"> " +
|
||||
headerText + " </font></b> </td>\n";
|
||||
html += " <td colspan=\"3\" bgcolor=\"darkblue\" height=\"40\"> <b><font color=\"white\" size=\"3\"> " + headerText +
|
||||
" </font></b> </td>\n";
|
||||
html += " </tr>\n";
|
||||
|
||||
textFileCompare.runComparison( baseFilesFolderName, generatedFilesFolderName );
|
||||
@ -628,8 +621,7 @@ QFileInfoList RiaRegressionTestRunner::subDirectoriesForTestExecution( const QDi
|
||||
for ( const auto& s : m_testFilter )
|
||||
{
|
||||
QString trimmed = s.trimmed();
|
||||
if ( ( m_appendAllTestsAfterLastItemInFilter && anyMatchFound ) ||
|
||||
baseName.compare( trimmed, Qt::CaseInsensitive ) == 0 )
|
||||
if ( ( m_appendAllTestsAfterLastItemInFilter && anyMatchFound ) || baseName.compare( trimmed, Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
foldersMatchingTestFilter.push_back( fi );
|
||||
anyMatchFound = true;
|
||||
@ -669,8 +661,7 @@ void RiaRegressionTestRunner::executeRegressionTests( const QString& regressionT
|
||||
{
|
||||
mainWnd->statusBar()->close();
|
||||
QByteArray curState = mainWnd->dockManager()->saveState( 0 );
|
||||
mainWnd->dockManager()->restoreState(
|
||||
RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
|
||||
mainWnd->setDefaultWindowSize();
|
||||
|
||||
|
@ -29,12 +29,11 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const RigWellPath*> RiaSimWellBranchTools::simulationWellBranches( const QString& simWellName,
|
||||
bool useAutoDetectionOfBranches )
|
||||
std::vector<const RigWellPath*> RiaSimWellBranchTools::simulationWellBranches( const QString& simWellName, bool useAutoDetectionOfBranches )
|
||||
{
|
||||
std::vector<RimEclipseCase*> simCases = RimEclipseCaseTools::eclipseCases();
|
||||
|
||||
auto caseItr = std::find_if( simCases.begin(), simCases.end(), [&simWellName]( const RimEclipseCase* eclCase ) {
|
||||
auto caseItr = std::find_if( simCases.begin(), simCases.end(), [&simWellName]( const RimEclipseCase* eclCase ) {
|
||||
const auto& eclData = eclCase->eclipseCaseData();
|
||||
return eclData != nullptr && eclData->hasSimulationWell( simWellName );
|
||||
} );
|
||||
@ -47,8 +46,7 @@ std::vector<const RigWellPath*> RiaSimWellBranchTools::simulationWellBranches( c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo>
|
||||
RiaSimWellBranchTools::valueOptionsForBranchIndexField( const std::vector<const RigWellPath*>& simulationWellPaths )
|
||||
QList<caf::PdmOptionItemInfo> RiaSimWellBranchTools::valueOptionsForBranchIndexField( const std::vector<const RigWellPath*>& simulationWellPaths )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
@ -61,8 +59,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
{
|
||||
for ( int bIdx = 0; bIdx < static_cast<int>( branchCount ); ++bIdx )
|
||||
{
|
||||
options.push_back(
|
||||
caf::PdmOptionItemInfo( "Branch " + QString::number( bIdx + 1 ), QVariant::fromValue( bIdx ) ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( "Branch " + QString::number( bIdx + 1 ), QVariant::fromValue( bIdx ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,29 +69,26 @@ QList<caf::PdmOptionItemInfo>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& wellPathOrSimWellName,
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& wellPathOrSimWellName,
|
||||
const caf::PdmField<bool>& branchDetectionField,
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
{
|
||||
if ( !RimWellPlotTools::hasAssociatedWellPath( wellPathOrSimWellName ) )
|
||||
{
|
||||
const QString simWellName = RimWellPlotTools::simWellName( wellPathOrSimWellName );
|
||||
|
||||
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( uiOrdering,
|
||||
simWellName,
|
||||
branchDetectionField,
|
||||
branchIndexField );
|
||||
RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( uiOrdering, simWellName, branchDetectionField, branchIndexField );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& simWellName,
|
||||
void RiaSimWellBranchTools::appendSimWellBranchFieldsIfRequiredFromSimWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& simWellName,
|
||||
const caf::PdmField<bool>& branchDetectionField,
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
const caf::PdmField<int>& branchIndexField )
|
||||
{
|
||||
if ( RiaSimWellBranchTools::simulationWellBranches( simWellName, true ).size() > 1 )
|
||||
{
|
||||
|
@ -39,11 +39,9 @@ class PdmUiOrdering;
|
||||
class RiaSimWellBranchTools
|
||||
{
|
||||
public:
|
||||
static std::vector<const RigWellPath*> simulationWellBranches( const QString& simWellName,
|
||||
bool useAutoDetectionOfBranches );
|
||||
static std::vector<const RigWellPath*> simulationWellBranches( const QString& simWellName, bool useAutoDetectionOfBranches );
|
||||
|
||||
static QList<caf::PdmOptionItemInfo>
|
||||
valueOptionsForBranchIndexField( const std::vector<const RigWellPath*>& simulationWellPaths );
|
||||
static QList<caf::PdmOptionItemInfo> valueOptionsForBranchIndexField( const std::vector<const RigWellPath*>& simulationWellPaths );
|
||||
|
||||
static void appendSimWellBranchFieldsIfRequiredFromWellName( caf::PdmUiOrdering* uiOrdering,
|
||||
const QString& wellPathOrSimWellName,
|
||||
|
@ -163,8 +163,7 @@ std::string RiaStdStringTools::toUpper( const std::string& s )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaStdStringTools::endsWith( const std::string& mainStr, const std::string& toMatch )
|
||||
{
|
||||
if ( mainStr.size() >= toMatch.size() &&
|
||||
mainStr.compare( mainStr.size() - toMatch.size(), toMatch.size(), toMatch ) == 0 )
|
||||
if ( mainStr.size() >= toMatch.size() && mainStr.compare( mainStr.size() - toMatch.size(), toMatch.size(), toMatch ) == 0 )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -227,7 +227,7 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const
|
||||
const std::string& secondaryIdentifier ) const
|
||||
{
|
||||
std::vector<QString> identifierStrings;
|
||||
|
||||
@ -294,9 +294,8 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RifEclipseSummaryAddress>
|
||||
RiaSummaryAddressAnalyzer::addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
std::vector<RifEclipseSummaryAddress> RiaSummaryAddressAnalyzer::addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
{
|
||||
std::vector<RifEclipseSummaryAddress> filteredAddresses;
|
||||
|
||||
@ -330,8 +329,7 @@ std::string RiaSummaryAddressAnalyzer::correspondingHistorySummaryCurveName( con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string>
|
||||
RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
{
|
||||
auto it = m_categories.find( category );
|
||||
if ( it != m_categories.end() ) return it->second;
|
||||
@ -452,8 +450,7 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd
|
||||
{
|
||||
m_aquifers.insert( { address.aquiferNumber(), address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD ||
|
||||
address.category() == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD || address.category() == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
{
|
||||
m_otherCategory.push_back( address );
|
||||
}
|
||||
@ -498,8 +495,8 @@ std::set<int> RiaSummaryAddressAnalyzer::keysInMap( const std::multimap<int, Rif
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> RiaSummaryAddressAnalyzer::keysInMap(
|
||||
const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map )
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
RiaSummaryAddressAnalyzer::keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map )
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> keys;
|
||||
for ( const auto& [key, value] : map )
|
||||
|
@ -62,12 +62,10 @@ public:
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> addressesGroupedByObject() const;
|
||||
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const;
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category, const std::string& secondaryIdentifier ) const;
|
||||
|
||||
static std::vector<RifEclipseSummaryAddress>
|
||||
addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
|
||||
static std::string correspondingHistorySummaryCurveName( const std::string& curveName );
|
||||
|
||||
@ -84,11 +82,9 @@ private:
|
||||
static std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map );
|
||||
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>>
|
||||
valuesInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>> valuesInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>>
|
||||
valuesInMap( const std::multimap<int, RifEclipseSummaryAddress>& map );
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>> valuesInMap( const std::multimap<int, RifEclipseSummaryAddress>& map );
|
||||
|
||||
private:
|
||||
std::set<std::string> m_quantities;
|
||||
|
@ -95,8 +95,7 @@ std::pair<QStringList, QStringList> RiaSummaryStringTools::splitIntoAddressAndDa
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaSummaryStringTools::hasFilterAnyMatch( const QString& curveFilter,
|
||||
const std::set<RifEclipseSummaryAddress>& summaryAddresses )
|
||||
bool RiaSummaryStringTools::hasFilterAnyMatch( const QString& curveFilter, const std::set<RifEclipseSummaryAddress>& summaryAddresses )
|
||||
{
|
||||
for ( const auto& addr : summaryAddresses )
|
||||
{
|
||||
@ -143,8 +142,7 @@ void RiaSummaryStringTools::splitUsingDataSourceNames( const QStringList& filter
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<std::vector<RimSummaryCase*>, std::vector<RimSummaryCaseCollection*>>
|
||||
RiaSummaryStringTools::allDataSourcesInProject()
|
||||
std::pair<std::vector<RimSummaryCase*>, std::vector<RimSummaryCaseCollection*>> RiaSummaryStringTools::allDataSourcesInProject()
|
||||
{
|
||||
auto sumCaseMainColl = RiaSummaryTools::summaryCaseMainCollection();
|
||||
if ( !sumCaseMainColl ) return { {}, {} };
|
||||
@ -245,10 +243,9 @@ QStringList RiaSummaryStringTools::dataSourceNames( const std::vector<RimSummary
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress>
|
||||
RiaSummaryStringTools::computeFilteredAddresses( const QStringList& textFilters,
|
||||
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
||||
bool includeDiffCurves )
|
||||
std::set<RifEclipseSummaryAddress> RiaSummaryStringTools::computeFilteredAddresses( const QStringList& textFilters,
|
||||
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
||||
bool includeDiffCurves )
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress> addresses;
|
||||
|
||||
|
@ -50,10 +50,9 @@ public:
|
||||
static QStringList dataSourceNames( const std::vector<RimSummaryCase*>& summaryCases,
|
||||
const std::vector<RimSummaryCaseCollection*>& ensembles );
|
||||
|
||||
static std::set<RifEclipseSummaryAddress>
|
||||
computeFilteredAddresses( const QStringList& textFilters,
|
||||
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
||||
bool includeDiffCurves );
|
||||
static std::set<RifEclipseSummaryAddress> computeFilteredAddresses( const QStringList& textFilters,
|
||||
const std::set<RifEclipseSummaryAddress>& sourceAddresses,
|
||||
bool includeDiffCurves );
|
||||
|
||||
// Consider private, set public to be able to test
|
||||
static void splitUsingDataSourceNames( const QStringList& filters,
|
||||
|
@ -248,11 +248,10 @@ void RiaSummaryTools::getSummaryCasesAndAddressesForCalculation( int
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<std::vector<time_t>, std::vector<double>>
|
||||
RiaSummaryTools::resampledValuesForPeriod( const RifEclipseSummaryAddress& address,
|
||||
const std::vector<time_t>& timeSteps,
|
||||
std::vector<double>& values,
|
||||
RiaDefines::DateTimePeriod period )
|
||||
std::pair<std::vector<time_t>, std::vector<double>> RiaSummaryTools::resampledValuesForPeriod( const RifEclipseSummaryAddress& address,
|
||||
const std::vector<time_t>& timeSteps,
|
||||
std::vector<double>& values,
|
||||
RiaDefines::DateTimePeriod period )
|
||||
{
|
||||
RiaTimeHistoryCurveResampler resampler;
|
||||
resampler.setCurveData( values, timeSteps );
|
||||
|
@ -70,11 +70,10 @@ public:
|
||||
std::vector<RimSummaryCase*>& cases,
|
||||
std::vector<RifEclipseSummaryAddress>& addresses );
|
||||
|
||||
static std::pair<std::vector<time_t>, std::vector<double>>
|
||||
resampledValuesForPeriod( const RifEclipseSummaryAddress& address,
|
||||
const std::vector<time_t>& timeSteps,
|
||||
std::vector<double>& values,
|
||||
RiaDefines::DateTimePeriod period );
|
||||
static std::pair<std::vector<time_t>, std::vector<double>> resampledValuesForPeriod( const RifEclipseSummaryAddress& address,
|
||||
const std::vector<time_t>& timeSteps,
|
||||
std::vector<double>& values,
|
||||
RiaDefines::DateTimePeriod period );
|
||||
|
||||
static RimSummaryCase* summaryCaseById( int caseId );
|
||||
static RimSummaryCaseCollection* ensembleById( int ensembleId );
|
||||
|
@ -74,8 +74,7 @@ bool RiaTextFileCompare::runComparison( const QString& baseFolder, const QString
|
||||
// See https://docs.freebsd.org/info/diff/diff.info.diff_Options.html
|
||||
QString args = "-r -u --strip-trailing-cr";
|
||||
|
||||
QString completeCommand =
|
||||
QString( "\"%1\" %2 %3 %4" ).arg( fullFilePath ).arg( baseFolder ).arg( generatedFolder ).arg( args );
|
||||
QString completeCommand = QString( "\"%1\" %2 %3 %4" ).arg( fullFilePath ).arg( baseFolder ).arg( generatedFolder ).arg( args );
|
||||
|
||||
// Launch process and wait
|
||||
QProcess proc;
|
||||
|
@ -143,8 +143,7 @@ QStringList RiaTextStringTools::splitSkipEmptyParts( const QString& text, const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaTextStringTools::replaceTemplateTextWithValues( const QString& templateText,
|
||||
const std::map<QString, QString>& valueMap )
|
||||
QString RiaTextStringTools::replaceTemplateTextWithValues( const QString& templateText, const std::map<QString, QString>& valueMap )
|
||||
{
|
||||
QString resolvedText = templateText;
|
||||
|
||||
|
@ -100,9 +100,7 @@ const std::vector<double>& RiaTimeHistoryCurveResampler::resampledValues() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<time_t> RiaTimeHistoryCurveResampler::timeStepsFromTimeRange( RiaDefines::DateTimePeriod period,
|
||||
time_t minTime,
|
||||
time_t maxTime )
|
||||
std::vector<time_t> RiaTimeHistoryCurveResampler::timeStepsFromTimeRange( RiaDefines::DateTimePeriod period, time_t minTime, time_t maxTime )
|
||||
{
|
||||
if ( minTime > maxTime ) return std::vector<time_t>();
|
||||
|
||||
@ -145,8 +143,7 @@ void RiaTimeHistoryCurveResampler::computeWeightedMeanValues( RiaDefines::DateTi
|
||||
double wMean = 0.0;
|
||||
time_t periodStart =
|
||||
i > 0 ? m_timeSteps[i - 1]
|
||||
: RiaQDateTimeTools::subtractPeriod( RiaQDateTimeTools::fromTime_t( m_timeSteps[0] ), period )
|
||||
.toSecsSinceEpoch();
|
||||
: RiaQDateTimeTools::subtractPeriod( RiaQDateTimeTools::fromTime_t( m_timeSteps[0] ), period ).toSecsSinceEpoch();
|
||||
time_t periodEnd = m_timeSteps[i];
|
||||
time_t periodLength = periodEnd - periodStart;
|
||||
|
||||
@ -272,13 +269,11 @@ void RiaTimeHistoryCurveResampler::computeResampledTimeSteps( RiaDefines::DateTi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QDateTime RiaTimeHistoryCurveResampler::firstResampledTimeStep( const QDateTime& firstTimeStep,
|
||||
RiaDefines::DateTimePeriod period )
|
||||
QDateTime RiaTimeHistoryCurveResampler::firstResampledTimeStep( const QDateTime& firstTimeStep, RiaDefines::DateTimePeriod period )
|
||||
{
|
||||
QDateTime truncatedTime = RiaQDateTimeTools::truncateTime( firstTimeStep, period );
|
||||
|
||||
if ( RiaQDateTimeTools::lessThan( truncatedTime, firstTimeStep ) )
|
||||
return RiaQDateTimeTools::addPeriod( truncatedTime, period );
|
||||
if ( RiaQDateTimeTools::lessThan( truncatedTime, firstTimeStep ) ) return RiaQDateTimeTools::addPeriod( truncatedTime, period );
|
||||
return truncatedTime;
|
||||
}
|
||||
|
||||
|
@ -111,9 +111,8 @@ void RiaWellLogCurveMerger::computeLookupValues( bool includeValuesFromPartialCu
|
||||
|
||||
for ( size_t valueIndex = 0; valueIndex < dataValueCount; valueIndex++ )
|
||||
{
|
||||
double interpolValue = lookupYValue( m_allXValues[valueIndex],
|
||||
m_originalValues[curveIdx].first,
|
||||
m_originalValues[curveIdx].second );
|
||||
double interpolValue =
|
||||
lookupYValue( m_allXValues[valueIndex], m_originalValues[curveIdx].first, m_originalValues[curveIdx].second );
|
||||
if ( !RiaCurveDataTools::isValidValue( interpolValue, false ) )
|
||||
{
|
||||
accumulatedValidValues[valueIndex] = HUGE_VAL;
|
||||
@ -158,8 +157,7 @@ void RiaWellLogCurveMerger::computeUnionOfXValues( bool includeValuesForPartialC
|
||||
originalXBounds.push_back( std::make_pair( *( minmax_it.first ), *( minmax_it.second ) ) );
|
||||
}
|
||||
|
||||
if ( !includeValuesForPartialCurves )
|
||||
RiaCurveMerger<double>::removeValuesForPartialCurves( unionOfXValues, originalXBounds );
|
||||
if ( !includeValuesForPartialCurves ) RiaCurveMerger<double>::removeValuesForPartialCurves( unionOfXValues, originalXBounds );
|
||||
|
||||
m_allXValues = std::vector<double>( unionOfXValues.begin(), unionOfXValues.end() );
|
||||
}
|
||||
|
@ -42,9 +42,7 @@ public:
|
||||
private:
|
||||
void computeUnionOfXValues( bool includeValuesFromPartialCurves );
|
||||
|
||||
static double lookupYValue( const double& xValue,
|
||||
const std::vector<double>& curveXValues,
|
||||
const std::vector<double>& curveYValues );
|
||||
static double lookupYValue( const double& xValue, const std::vector<double>& curveXValues, const std::vector<double>& curveYValues );
|
||||
|
||||
std::vector<std::pair<std::vector<double>, std::vector<double>>> m_originalValues;
|
||||
|
||||
|
@ -44,17 +44,14 @@ public:
|
||||
static QString pascalUnitStringShort();
|
||||
|
||||
public:
|
||||
static std::vector<FloatType> convertDepths( const std::vector<FloatType>& depthsIn,
|
||||
RiaDefines::DepthUnitType unitsIn,
|
||||
RiaDefines::DepthUnitType unitsOut );
|
||||
static std::vector<FloatType>
|
||||
convertDepths( const std::vector<FloatType>& depthsIn, RiaDefines::DepthUnitType unitsIn, RiaDefines::DepthUnitType unitsOut );
|
||||
|
||||
static std::vector<std::pair<FloatType, FloatType>>
|
||||
convertDepths( const std::vector<std::pair<FloatType, FloatType>>& depthsIn,
|
||||
RiaDefines::DepthUnitType unitsIn,
|
||||
RiaDefines::DepthUnitType unitsOut );
|
||||
static std::vector<std::pair<FloatType, FloatType>> convertDepths( const std::vector<std::pair<FloatType, FloatType>>& depthsIn,
|
||||
RiaDefines::DepthUnitType unitsIn,
|
||||
RiaDefines::DepthUnitType unitsOut );
|
||||
|
||||
static FloatType
|
||||
convertDepth( FloatType depthIn, RiaDefines::DepthUnitType unitsIn, RiaDefines::DepthUnitType unitsOut );
|
||||
static FloatType convertDepth( FloatType depthIn, RiaDefines::DepthUnitType unitsIn, RiaDefines::DepthUnitType unitsOut );
|
||||
|
||||
static bool convertValues( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesIn,
|
||||
@ -69,15 +66,11 @@ public:
|
||||
static std::vector<FloatType> tvdRKBs( const std::vector<FloatType>& measuredDepths, const RigWellPath* wellPath );
|
||||
|
||||
// Supported conversions
|
||||
static std::vector<FloatType> convertGpcm3ToBar( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInGpcm3 );
|
||||
static std::vector<FloatType> convertBarToGpcm3( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar );
|
||||
static std::vector<FloatType> convertGpcm3ToBar( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInGpcm3 );
|
||||
static std::vector<FloatType> convertBarToGpcm3( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInBar );
|
||||
|
||||
static std::vector<FloatType> convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar );
|
||||
static std::vector<FloatType> convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar );
|
||||
static std::vector<FloatType> convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInBar );
|
||||
static std::vector<FloatType> convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInBar );
|
||||
static std::vector<FloatType> multiply( const std::vector<FloatType>& values, FloatType factor );
|
||||
static FloatType pascalPerBar();
|
||||
static FloatType MPaPerBar();
|
||||
|
@ -153,9 +153,7 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertDepths( const std:
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
FloatType RiaWellLogUnitTools<FloatType>::convertDepth( FloatType depthIn,
|
||||
RiaDefines::DepthUnitType unitsIn,
|
||||
RiaDefines::DepthUnitType unitsOut )
|
||||
FloatType RiaWellLogUnitTools<FloatType>::convertDepth( FloatType depthIn, RiaDefines::DepthUnitType unitsIn, RiaDefines::DepthUnitType unitsOut )
|
||||
{
|
||||
FloatType factor = 1.0;
|
||||
if ( unitsOut == RiaDefines::DepthUnitType::UNIT_METER && unitsIn == RiaDefines::DepthUnitType::UNIT_FEET )
|
||||
@ -334,8 +332,7 @@ bool RiaWellLogUnitTools<FloatType>::convertValues( std::vector<std::pair<FloatT
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
std::vector<FloatType>
|
||||
RiaWellLogUnitTools<FloatType>::tvdRKBs( const std::vector<FloatType>& measuredDepths, const RigWellPath* wellPath )
|
||||
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::tvdRKBs( const std::vector<FloatType>& measuredDepths, const RigWellPath* wellPath )
|
||||
{
|
||||
if ( measuredDepths.empty() ) return {};
|
||||
|
||||
@ -352,8 +349,8 @@ std::vector<FloatType>
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertGpcm3ToBar( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInGpcm3 )
|
||||
std::vector<FloatType>
|
||||
RiaWellLogUnitTools<FloatType>::convertGpcm3ToBar( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInGpcm3 )
|
||||
{
|
||||
if ( tvdRKBs.empty() ) return {};
|
||||
|
||||
@ -381,8 +378,8 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertGpcm3ToBar( const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertBarToGpcm3( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar )
|
||||
std::vector<FloatType>
|
||||
RiaWellLogUnitTools<FloatType>::convertBarToGpcm3( const std::vector<FloatType>& tvdRKBs, const std::vector<FloatType>& valuesInBar )
|
||||
{
|
||||
if ( tvdRKBs.empty() ) return {};
|
||||
|
||||
@ -410,9 +407,8 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertBarToGpcm3( const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
std::vector<FloatType>
|
||||
RiaWellLogUnitTools<FloatType>::convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& normalizedValues )
|
||||
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& normalizedValues )
|
||||
{
|
||||
if ( tvdRKBs.empty() ) return {};
|
||||
|
||||
@ -430,9 +426,8 @@ std::vector<FloatType>
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
template <typename FloatType>
|
||||
std::vector<FloatType>
|
||||
RiaWellLogUnitTools<FloatType>::convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar )
|
||||
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs,
|
||||
const std::vector<FloatType>& valuesInBar )
|
||||
{
|
||||
if ( tvdRKBs.empty() ) return {};
|
||||
|
||||
|
@ -41,9 +41,8 @@ public:
|
||||
static QString removeSpacesFromName( const QString& wellName );
|
||||
|
||||
private:
|
||||
static QString tryMatchName( QString searchName,
|
||||
const std::vector<QString>& nameList,
|
||||
std::function<QString( QString )> stringFormatter = nullptr );
|
||||
static QString
|
||||
tryMatchName( QString searchName, const std::vector<QString>& nameList, std::function<QString( QString )> stringFormatter = nullptr );
|
||||
|
||||
static QString removeWellNamePrefix( const QString& name );
|
||||
|
||||
|
@ -42,29 +42,17 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
||||
if ( activeWellPathTargets.size() == 1 )
|
||||
{
|
||||
m_lineArcEndpoints.push_back( activeWellPathTargets[0].targetPointXYZ + referencePointXyz );
|
||||
m_targetStatuses.resize( activeWellPathTargets.size(),
|
||||
{ 0.0,
|
||||
0.0,
|
||||
false,
|
||||
true,
|
||||
std::numeric_limits<double>::infinity(),
|
||||
false,
|
||||
true,
|
||||
std::numeric_limits<double>::infinity() } );
|
||||
m_targetStatuses
|
||||
.resize( activeWellPathTargets.size(),
|
||||
{ 0.0, 0.0, false, true, std::numeric_limits<double>::infinity(), false, true, std::numeric_limits<double>::infinity() } );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_targetStatuses.resize( activeWellPathTargets.size(),
|
||||
{ 0.0,
|
||||
0.0,
|
||||
false,
|
||||
false,
|
||||
std::numeric_limits<double>::infinity(),
|
||||
false,
|
||||
false,
|
||||
std::numeric_limits<double>::infinity() } );
|
||||
m_targetStatuses
|
||||
.resize( activeWellPathTargets.size(),
|
||||
{ 0.0, 0.0, false, false, std::numeric_limits<double>::infinity(), false, false, std::numeric_limits<double>::infinity() } );
|
||||
|
||||
std::vector<WellTarget> adjustedWellPathTargets = activeWellPathTargets;
|
||||
|
||||
@ -149,8 +137,8 @@ RiaLineArcWellPathCalculator::RiaLineArcWellPathCalculator( const cvf::Vec3d&
|
||||
target2Status.resultInclinationRadians = t12Sph.inc();
|
||||
}
|
||||
|
||||
m_startTangent = RiaOffshoreSphericalCoords::unitVectorFromAziInc( target1Status.resultAzimuthRadians,
|
||||
target1Status.resultInclinationRadians );
|
||||
m_startTangent =
|
||||
RiaOffshoreSphericalCoords::unitVectorFromAziInc( target1Status.resultAzimuthRadians, target1Status.resultInclinationRadians );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -39,8 +39,7 @@ public:
|
||||
double radius2;
|
||||
};
|
||||
|
||||
RiaLineArcWellPathCalculator( const cvf::Vec3d& referencePointXyz,
|
||||
const std::vector<RiaLineArcWellPathCalculator::WellTarget>& targets );
|
||||
RiaLineArcWellPathCalculator( const cvf::Vec3d& referencePointXyz, const std::vector<RiaLineArcWellPathCalculator::WellTarget>& targets );
|
||||
|
||||
struct WellTargetStatus
|
||||
{
|
||||
|
@ -25,8 +25,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaPolyArcLineSampler::RiaPolyArcLineSampler( const cvf::Vec3d& startTangent,
|
||||
const std::vector<cvf::Vec3d>& lineArcEndPoints )
|
||||
RiaPolyArcLineSampler::RiaPolyArcLineSampler( const cvf::Vec3d& startTangent, const std::vector<cvf::Vec3d>& lineArcEndPoints )
|
||||
: m_startTangent( startTangent )
|
||||
, m_lineArcEndPoints( lineArcEndPoints )
|
||||
, m_maxSamplingsInterval( 0.15 )
|
||||
@ -38,8 +37,8 @@ RiaPolyArcLineSampler::RiaPolyArcLineSampler( const cvf::Vec3d& sta
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>>
|
||||
RiaPolyArcLineSampler::sampledPointsAndMDs( double sampleInterval, bool isResamplingLines )
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> RiaPolyArcLineSampler::sampledPointsAndMDs( double sampleInterval,
|
||||
bool isResamplingLines )
|
||||
{
|
||||
CVF_ASSERT( sampleInterval > 0.0 );
|
||||
|
||||
|
@ -27,8 +27,7 @@ class RiaPolyArcLineSampler
|
||||
public:
|
||||
RiaPolyArcLineSampler( const cvf::Vec3d& startTangent, const std::vector<cvf::Vec3d>& lineArcEndPoints );
|
||||
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> sampledPointsAndMDs( double maxSampleInterval,
|
||||
bool isResamplingLines );
|
||||
std::pair<std::vector<cvf::Vec3d>, std::vector<double>> sampledPointsAndMDs( double maxSampleInterval, bool isResamplingLines );
|
||||
|
||||
static std::vector<cvf::Vec3d> pointsWithoutDuplicates( const std::vector<cvf::Vec3d>& points );
|
||||
|
||||
|
@ -28,14 +28,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1,
|
||||
double azi1,
|
||||
double inc1,
|
||||
double rad1,
|
||||
cvf::Vec3d p2,
|
||||
double azi2,
|
||||
double inc2,
|
||||
double rad2 )
|
||||
RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, double azi1, double inc1, double rad1, cvf::Vec3d p2, double azi2, double inc2, double rad2 )
|
||||
: m_isCalculationOK( false )
|
||||
, m_p1( p1 )
|
||||
, m_p2( p2 )
|
||||
@ -66,10 +59,10 @@ RiaSCurveCalculator::RiaSCurveCalculator( cvf::Vec3d p1, cvf::Vec3d q1, cvf::Vec
|
||||
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
|
||||
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
|
||||
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;
|
||||
@ -221,14 +214,7 @@ bool isZeroCrossing( double newError, double oldError, double maxError )
|
||||
/// R1(q1, q2), R2(q1, q2)
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
double azi1,
|
||||
double inc1,
|
||||
double r1,
|
||||
cvf::Vec3d p2,
|
||||
double azi2,
|
||||
double inc2,
|
||||
double r2 )
|
||||
void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1, double azi1, double inc1, double r1, cvf::Vec3d p2, double azi2, double inc2, double r2 )
|
||||
{
|
||||
// Algorithm options
|
||||
|
||||
@ -249,8 +235,7 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
double initialq1q2 = 0.2 * p1p2Length;
|
||||
double deltaPos = initialq1q2 + delta;
|
||||
|
||||
RiaSCurveCalculator ev_0 =
|
||||
RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, initialq1q2, p2, azi2, inc2, initialq1q2 );
|
||||
RiaSCurveCalculator ev_0 = RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, initialq1q2, p2, azi2, inc2, initialq1q2 );
|
||||
|
||||
if ( ev_0.curveStatus() == RiaSCurveCalculator::OK_INFINITE_RADIUS12 )
|
||||
{
|
||||
@ -259,10 +244,8 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
return;
|
||||
} // Todo: Handle infinite radius in one place
|
||||
|
||||
RiaSCurveCalculator ev_dq1 =
|
||||
RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, deltaPos, p2, azi2, inc2, initialq1q2 );
|
||||
RiaSCurveCalculator ev_dq2 =
|
||||
RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, initialq1q2, p2, azi2, inc2, deltaPos );
|
||||
RiaSCurveCalculator ev_dq1 = RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, deltaPos, p2, azi2, inc2, initialq1q2 );
|
||||
RiaSCurveCalculator ev_dq2 = RiaSCurveCalculator::fromTangentsAndLength( p1, azi1, inc1, initialq1q2, p2, azi2, inc2, deltaPos );
|
||||
|
||||
// Initial Jacobi
|
||||
double dR1_dq1 = ( ( r1 - ev_dq1.firstRadius() ) - ( r1 - ev_0.firstRadius() ) ) / delta;
|
||||
@ -290,9 +273,8 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
std::cout << std::endl;
|
||||
std::cout << "Targets: R1, R2: " << r1 << " , " << r2 << std::endl;
|
||||
|
||||
std::cout << 0 << ": " << q1Step << " , " << q2Step << " : " << q1 << " , " << q2 << " | " << ev_0.isOk() << " : "
|
||||
<< ev_0.firstRadius() << " , " << ev_0.secondRadius() << " : " << R1_error << " , " << R2_error
|
||||
<< std::endl;
|
||||
std::cout << 0 << ": " << q1Step << " , " << q2Step << " : " << q1 << " , " << q2 << " | " << ev_0.isOk() << " : " << ev_0.firstRadius()
|
||||
<< " , " << ev_0.secondRadius() << " : " << R1_error << " , " << R2_error << std::endl;
|
||||
#endif
|
||||
|
||||
SolveStatus solveResultStatus = NOT_SOLVED;
|
||||
@ -338,9 +320,9 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
double R2_error_new = r2 - ev_1.secondRadius();
|
||||
|
||||
#ifdef DEBUG_OUTPUT_ON
|
||||
std::cout << iteration << ": " << q1Step << q1R1StepCorrMarker << " , " << q2Step << q2R2StepCorrMarker << " : "
|
||||
<< q1 << " , " << q2 << " | " << ev_1.isOk() << " : " << ev_1.firstRadius() << " , "
|
||||
<< ev_1.secondRadius() << " : " << R1_error_new << " , " << R2_error_new;
|
||||
std::cout << iteration << ": " << q1Step << q1R1StepCorrMarker << " , " << q2Step << q2R2StepCorrMarker << " : " << q1 << " , "
|
||||
<< q2 << " | " << ev_1.isOk() << " : " << ev_1.firstRadius() << " , " << ev_1.secondRadius() << " : " << R1_error_new
|
||||
<< " , " << R2_error_new;
|
||||
#endif
|
||||
|
||||
if ( ( fabs( R1_error_new ) < maxError || ev_1.curveStatus() == OK_INFINITE_RADIUS1 ) &&
|
||||
|
@ -61,24 +61,11 @@ public:
|
||||
|
||||
void dump() const;
|
||||
|
||||
static RiaSCurveCalculator fromTangentsAndLength( cvf::Vec3d p1,
|
||||
double azi1,
|
||||
double inc1,
|
||||
double lengthToQ1,
|
||||
cvf::Vec3d p2,
|
||||
double azi2,
|
||||
double inc2,
|
||||
double lengthToQ2 );
|
||||
static RiaSCurveCalculator
|
||||
fromTangentsAndLength( cvf::Vec3d p1, double azi1, double inc1, double lengthToQ1, cvf::Vec3d p2, double azi2, double inc2, double lengthToQ2 );
|
||||
|
||||
private:
|
||||
void initializeByFinding_q1q2( cvf::Vec3d p1,
|
||||
double azi1,
|
||||
double inc1,
|
||||
double r1,
|
||||
cvf::Vec3d p2,
|
||||
double azi2,
|
||||
double inc2,
|
||||
double r2 );
|
||||
void initializeByFinding_q1q2( cvf::Vec3d p1, double azi1, double inc1, double r1, cvf::Vec3d p2, double azi2, double inc2, double r2 );
|
||||
|
||||
bool m_isCalculationOK;
|
||||
|
||||
|
@ -26,8 +26,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaWellPlanCalculator::RiaWellPlanCalculator( const cvf::Vec3d& startTangent,
|
||||
const std::vector<cvf::Vec3d>& lineArcEndPoints )
|
||||
RiaWellPlanCalculator::RiaWellPlanCalculator( const cvf::Vec3d& startTangent, const std::vector<cvf::Vec3d>& lineArcEndPoints )
|
||||
: m_startTangent( startTangent )
|
||||
, m_lineArcEndPoints( lineArcEndPoints )
|
||||
{
|
||||
@ -123,10 +122,10 @@ void RiaWellPlanCalculator::addArcSegment( cvf::Vec3d t1, cvf::Vec3d p1, cvf::Ve
|
||||
segment.EW = p2.x();
|
||||
segment.dogleg = cvf::Math::toDegrees( 30.0 / arcCalc.radius() );
|
||||
RiaOffshoreSphericalCoords startAziIncRad( t1 );
|
||||
double buildInRadsPrLength = ( arcCalc.endInclination() - startAziIncRad.inc() ) / arcCalc.arcLength();
|
||||
double turnInRadsPrLength = ( arcCalc.endAzimuth() - startAziIncRad.azi() ) / arcCalc.arcLength();
|
||||
segment.build = 30 * cvf::Math::toDegrees( buildInRadsPrLength );
|
||||
segment.turn = 30 * cvf::Math::toDegrees( turnInRadsPrLength );
|
||||
double buildInRadsPrLength = ( arcCalc.endInclination() - startAziIncRad.inc() ) / arcCalc.arcLength();
|
||||
double turnInRadsPrLength = ( arcCalc.endAzimuth() - startAziIncRad.azi() ) / arcCalc.arcLength();
|
||||
segment.build = 30 * cvf::Math::toDegrees( buildInRadsPrLength );
|
||||
segment.turn = 30 * cvf::Math::toDegrees( turnInRadsPrLength );
|
||||
|
||||
m_wpResult.push_back( segment );
|
||||
|
||||
|
@ -37,9 +37,8 @@ class PdmScriptIOMessages;
|
||||
class RicfCommandFileReader
|
||||
{
|
||||
public:
|
||||
static std::vector<RicfCommandObject*> readCommands( QTextStream& inputStream,
|
||||
caf::PdmObjectFactory* objectFactory,
|
||||
caf::PdmScriptIOMessages* errorMessageContainer );
|
||||
static std::vector<RicfCommandObject*>
|
||||
readCommands( QTextStream& inputStream, caf::PdmObjectFactory* objectFactory, caf::PdmScriptIOMessages* errorMessageContainer );
|
||||
|
||||
static void writeCommands( QTextStream& outputStream, const std::vector<RicfCommandObject*>& commandsToWrite );
|
||||
};
|
||||
|
@ -34,8 +34,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Empty wellPathNames returns all well paths
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStringList& wellPathNames,
|
||||
QStringList* wellsNotFound )
|
||||
std::vector<RimWellPath*> RicfApplicationTools::wellPathsFromNames( const QStringList& wellPathNames, QStringList* wellsNotFound )
|
||||
{
|
||||
std::vector<RimWellPath*> wellPaths;
|
||||
auto allWellPaths = RimProject::current()->allWellPaths();
|
||||
|
@ -59,8 +59,7 @@ public:
|
||||
|
||||
static RicfCommandFileExecutor* instance();
|
||||
|
||||
static std::vector<RicfCommandObject*>
|
||||
prepareFileCommandsForExecution( const std::vector<RicfCommandObject*>& commandsReadFromFile );
|
||||
static std::vector<RicfCommandObject*> prepareFileCommandsForExecution( const std::vector<RicfCommandObject*>& commandsReadFromFile );
|
||||
|
||||
private:
|
||||
void clearCachedData();
|
||||
|
@ -94,8 +94,7 @@ caf::PdmScriptResponse RicfComputeCaseGroupStatistics::execute()
|
||||
|
||||
if ( !foundCase )
|
||||
{
|
||||
QString warning =
|
||||
QString( "computeCaseGroupStatistics: Could not find statistics case with ID %1." ).arg( caseId );
|
||||
QString warning = QString( "computeCaseGroupStatistics: Could not find statistics case with ID %1." ).arg( caseId );
|
||||
|
||||
RiaLogging::warning( warning );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
|
@ -34,8 +34,7 @@ CAF_PDM_SOURCE_INIT( RicfCreateGridCaseGroupResult, "createGridCaseGroupResult"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicfCreateGridCaseGroupResult::RicfCreateGridCaseGroupResult( int caseGroupId /*= -1*/,
|
||||
const QString& caseGroupName /*= ""*/ )
|
||||
RicfCreateGridCaseGroupResult::RicfCreateGridCaseGroupResult( int caseGroupId /*= -1*/, const QString& caseGroupName /*= ""*/ )
|
||||
{
|
||||
CAF_PDM_InitObject( "case_group_result" );
|
||||
CAF_PDM_InitField( &this->caseGroupId, "groupId", caseGroupId, "" );
|
||||
|
@ -72,8 +72,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error = QString( "createLgrForCompletions: These well paths were not found: " ) +
|
||||
wellsNotFound.join( ", " );
|
||||
QString error = QString( "createLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " );
|
||||
RiaLogging::error( error );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -87,8 +86,7 @@ caf::PdmScriptResponse RicfCreateLgrForCompletions::execute()
|
||||
}
|
||||
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
auto feature = dynamic_cast<RicCreateTemporaryLgrFeature*>(
|
||||
commandManager->getCommandFeature( "RicCreateTemporaryLgrFeature" ) );
|
||||
auto feature = dynamic_cast<RicCreateTemporaryLgrFeature*>( commandManager->getCommandFeature( "RicCreateTemporaryLgrFeature" ) );
|
||||
|
||||
RimEclipseCase* eclipseCase = nullptr;
|
||||
{
|
||||
|
@ -93,8 +93,7 @@ caf::PdmScriptResponse 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 caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -109,8 +108,7 @@ caf::PdmScriptResponse 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 caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -131,8 +129,8 @@ caf::PdmScriptResponse RicfCreateMultipleFractures::execute()
|
||||
|
||||
RicCreateMultipleFracturesOptionItemUi* options = new RicCreateMultipleFracturesOptionItemUi();
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
auto feature = dynamic_cast<RicCreateMultipleFracturesFeature*>(
|
||||
commandManager->getCommandFeature( "RicCreateMultipleFracturesFeature" ) );
|
||||
auto feature =
|
||||
dynamic_cast<RicCreateMultipleFracturesFeature*>( commandManager->getCommandFeature( "RicCreateMultipleFracturesFeature" ) );
|
||||
|
||||
// Default layers
|
||||
int topLayer = m_topLayer;
|
||||
|
@ -91,8 +91,8 @@ caf::PdmScriptResponse RicfCreateWellBoreStabilityPlotFeature::execute()
|
||||
{
|
||||
if ( !chosenWellPath->wellPathGeometry() )
|
||||
{
|
||||
QString error = QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" )
|
||||
.arg( chosenWellPath->name() );
|
||||
QString error =
|
||||
QString( "The well path %1 has no geometry. Cannot create a Well Bore Stability Plot" ).arg( chosenWellPath->name() );
|
||||
RiaLogging::error( error );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
@ -71,8 +71,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
wellPaths = TOOLS::wellPathsFromNames( TOOLS::toQStringList( m_wellPathNames ), &wellsNotFound );
|
||||
if ( !wellsNotFound.empty() )
|
||||
{
|
||||
QString error( QString( "exportLgrForCompletions: These well paths were not found: " ) +
|
||||
wellsNotFound.join( ", " ) );
|
||||
QString error( QString( "exportLgrForCompletions: These well paths were not found: " ) + wellsNotFound.join( ", " ) );
|
||||
RiaLogging::error( error );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -92,7 +91,7 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
}
|
||||
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
auto feature = dynamic_cast<RicExportLgrFeature*>( commandManager->getCommandFeature( "RicExportLgrFeature" ) );
|
||||
auto feature = dynamic_cast<RicExportLgrFeature*>( commandManager->getCommandFeature( "RicExportLgrFeature" ) );
|
||||
|
||||
RimEclipseCase* eclipseCase = TOOLS::caseFromId( m_caseId() );
|
||||
if ( !eclipseCase )
|
||||
@ -119,10 +118,8 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
caf::PdmScriptResponse response;
|
||||
if ( !wellsIntersectingOtherLgrs.empty() )
|
||||
{
|
||||
auto wellsList = wellsIntersectingOtherLgrs.join( ", " );
|
||||
QString warning(
|
||||
"exportLgrForCompletions: No export for some wells due to existing intersecting LGR(s).Affected wells : " +
|
||||
wellsList );
|
||||
auto wellsList = wellsIntersectingOtherLgrs.join( ", " );
|
||||
QString warning( "exportLgrForCompletions: No export for some wells due to existing intersecting LGR(s).Affected wells : " + wellsList );
|
||||
RiaLogging::warning( warning );
|
||||
response.updateStatus( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
}
|
||||
|
@ -70,8 +70,7 @@ caf::PdmScriptResponse RicfExportMsw::execute()
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
|
||||
QString exportFolder =
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
|
||||
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
|
||||
if ( exportFolder.isNull() )
|
||||
{
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );
|
||||
|
@ -67,8 +67,7 @@ caf::PdmScriptResponse RicfExportMultiCaseSnapshots::execute()
|
||||
std::vector<QString> listFileNames = RiaApplication::readFileListFromTextFile( m_gridListFile() );
|
||||
app->runMultiCaseSnapshots( lastProjectPath,
|
||||
listFileNames,
|
||||
RicfCommandFileExecutor::instance()->getExportPath(
|
||||
RicfCommandFileExecutor::ExportType::SNAPSHOTS ) );
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS ) );
|
||||
|
||||
return caf::PdmScriptResponse();
|
||||
}
|
||||
|
@ -97,8 +97,7 @@ caf::PdmScriptResponse RicfExportProperty::execute()
|
||||
QString filePath = m_exportFileName;
|
||||
if ( filePath.isNull() )
|
||||
{
|
||||
QDir propertiesDir(
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
|
||||
QDir propertiesDir( RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
|
||||
QString fileName = QString( "%1-%2" ).arg( eclipseCase->caseUserDescription() ).arg( m_propertyName );
|
||||
fileName = caf::Utils::makeValidFileBasename( fileName );
|
||||
filePath = propertiesDir.filePath( fileName );
|
||||
|
@ -128,24 +128,19 @@ caf::PdmScriptResponse 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( caf::PdmScriptResponse::COMMAND_WARNING, warning );
|
||||
continue;
|
||||
}
|
||||
|
||||
QDir propertiesDir(
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
|
||||
QDir propertiesDir( RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::PROPERTIES ) );
|
||||
|
||||
QString fileName = QString( "%1-%2-T%3-%4" )
|
||||
.arg( eclipseCase->caseUserDescription() )
|
||||
.arg( view->name() )
|
||||
.arg( view->currentTimeStep() )
|
||||
.arg( propertyName );
|
||||
QString fileName =
|
||||
QString( "%1-%2-T%3-%4" ).arg( eclipseCase->caseUserDescription() ).arg( view->name() ).arg( view->currentTimeStep() ).arg( propertyName );
|
||||
|
||||
fileName = caf::Utils::makeValidFileBasename( fileName );
|
||||
const QString filePath = propertiesDir.filePath( fileName );
|
||||
|
@ -52,10 +52,7 @@ RicfExportSimWellFractureCompletions::RicfExportSimWellFractureCompletions()
|
||||
CAF_PDM_InitScriptableField( &m_timeStep, "timeStep", -1, "Time Step Index" );
|
||||
CAF_PDM_InitScriptableField( &m_simWellNames, "simulationWellNames", std::vector<QString>(), "Simulation Well Names" );
|
||||
CAF_PDM_InitScriptableField( &m_fileSplit, "fileSplit", RicExportCompletionDataSettingsUi::ExportSplitType(), "File Split" );
|
||||
CAF_PDM_InitScriptableField( &m_compdatExport,
|
||||
"compdatExport",
|
||||
RicExportCompletionDataSettingsUi::CompdatExportType(),
|
||||
"Compdat Export" );
|
||||
CAF_PDM_InitScriptableField( &m_compdatExport, "compdatExport", RicExportCompletionDataSettingsUi::CompdatExportType(), "Compdat Export" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -83,8 +80,7 @@ caf::PdmScriptResponse RicfExportSimWellFractureCompletions::execute()
|
||||
exportSettings.caseToApply = eclipseCase;
|
||||
}
|
||||
|
||||
QString exportFolder =
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
|
||||
QString exportFolder = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::COMPLETIONS );
|
||||
if ( exportFolder.isNull() )
|
||||
{
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "completions" );
|
||||
|
@ -87,13 +87,11 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
CVF_ASSERT( mainWnd );
|
||||
|
||||
QByteArray curState = mainWnd->dockManager()->saveState( 0 );
|
||||
mainWnd->dockManager()->restoreState(
|
||||
RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
|
||||
QString absolutePathToSnapshotDir =
|
||||
RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
|
||||
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
|
||||
|
||||
if ( !m_exportFolder().isEmpty() )
|
||||
{
|
||||
@ -101,8 +99,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
}
|
||||
if ( absolutePathToSnapshotDir.isNull() )
|
||||
{
|
||||
absolutePathToSnapshotDir =
|
||||
RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
absolutePathToSnapshotDir = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "snapshots" );
|
||||
}
|
||||
if ( m_type == RicfExportSnapshots::SnapshotsType::VIEWS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
|
||||
{
|
||||
@ -113,10 +110,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir,
|
||||
m_prefix,
|
||||
m_caseId(),
|
||||
m_viewId() );
|
||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir, m_prefix, m_caseId(), m_viewId() );
|
||||
}
|
||||
if ( m_type == RicfExportSnapshots::SnapshotsType::PLOTS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
|
||||
{
|
||||
@ -134,11 +128,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
|
||||
QString fileSuffix = ".png";
|
||||
if ( m_plotOutputFormat == PlotOutputFormat::PDF ) fileSuffix = ".pdf";
|
||||
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir,
|
||||
activateWidget,
|
||||
m_prefix,
|
||||
m_viewId(),
|
||||
fileSuffix );
|
||||
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir, activateWidget, m_prefix, m_viewId(), fileSuffix );
|
||||
}
|
||||
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
|
@ -66,10 +66,7 @@ RicfExportVisibleCells::RicfExportVisibleCells()
|
||||
CAF_PDM_InitScriptableField( &m_caseId, "caseId", -1, "Case ID" );
|
||||
CAF_PDM_InitScriptableField( &m_viewId, "viewId", -1, "View ID" );
|
||||
CAF_PDM_InitScriptableField( &m_viewName, "viewName", QString(), "View Name" );
|
||||
CAF_PDM_InitScriptableField( &m_exportKeyword,
|
||||
"exportKeyword",
|
||||
caf::AppEnum<RicfExportVisibleCells::ExportKeyword>(),
|
||||
"Export Keyword" );
|
||||
CAF_PDM_InitScriptableField( &m_exportKeyword, "exportKeyword", caf::AppEnum<RicfExportVisibleCells::ExportKeyword>(), "Export Keyword" );
|
||||
CAF_PDM_InitScriptableField( &m_visibleActiveCellsValue, "visibleActiveCellsValue", 1, "Visible Active Cells Value" );
|
||||
CAF_PDM_InitScriptableField( &m_hiddenActiveCellsValue, "hiddenActiveCellsValue", 0, "Hidden Active Cells Value" );
|
||||
CAF_PDM_InitScriptableField( &m_inactiveCellsValue, "inactiveCellsValue", 0, "Inactive Cells Value" );
|
||||
@ -97,10 +94,8 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
|
||||
}
|
||||
if ( !eclipseView )
|
||||
{
|
||||
QString error( QString( "exportVisibleCells: Could not find view of id %1 or named '%2' in case ID %3" )
|
||||
.arg( m_viewId )
|
||||
.arg( m_viewName )
|
||||
.arg( m_caseId ) );
|
||||
QString error(
|
||||
QString( "exportVisibleCells: Could not find view of id %1 or named '%2' in case ID %3" ).arg( m_viewId ).arg( m_viewName ).arg( m_caseId ) );
|
||||
RiaLogging::error( error );
|
||||
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
|
||||
}
|
||||
@ -123,8 +118,7 @@ caf::PdmScriptResponse RicfExportVisibleCells::execute()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfExportVisibleCells::buildExportSettings( const QString& exportFolder,
|
||||
RicSaveEclipseInputVisibleCellsUi* exportSettings )
|
||||
void RicfExportVisibleCells::buildExportSettings( const QString& exportFolder, RicSaveEclipseInputVisibleCellsUi* exportSettings )
|
||||
{
|
||||
QDir baseDir( exportFolder );
|
||||
exportSettings->exportFilename = baseDir.absoluteFilePath( QString( "%1.grdecl" ).arg( m_exportKeyword().text() ) );
|
||||
|
@ -92,10 +92,7 @@ caf::PdmScriptResponse RicfExportWellLogPlotData::execute()
|
||||
if ( m_format() == ExportFormat::ASCII )
|
||||
{
|
||||
QString validFileName =
|
||||
RicAsciiExportWellLogPlotFeature::makeValidExportFileName( plot,
|
||||
m_folder(),
|
||||
m_filePrefix(),
|
||||
m_capitalizeFileNames() );
|
||||
RicAsciiExportWellLogPlotFeature::makeValidExportFileName( plot, m_folder(), m_filePrefix(), m_capitalizeFileNames() );
|
||||
if ( RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( validFileName, plot ) )
|
||||
{
|
||||
result->exportedFiles.v().push_back( validFileName );
|
||||
@ -103,24 +100,21 @@ caf::PdmScriptResponse RicfExportWellLogPlotData::execute()
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<QString> exportedFiles =
|
||||
RicExportToLasFileFeature::exportToLasFiles( m_folder(),
|
||||
m_filePrefix(),
|
||||
plot,
|
||||
m_exportTvdRkb(),
|
||||
m_capitalizeFileNames(),
|
||||
true,
|
||||
m_resampleInterval(),
|
||||
m_convertCurveUnits() );
|
||||
std::vector<QString> exportedFiles = RicExportToLasFileFeature::exportToLasFiles( m_folder(),
|
||||
m_filePrefix(),
|
||||
plot,
|
||||
m_exportTvdRkb(),
|
||||
m_capitalizeFileNames(),
|
||||
true,
|
||||
m_resampleInterval(),
|
||||
m_convertCurveUnits() );
|
||||
if ( exportedFiles.empty() )
|
||||
{
|
||||
errorMessages << QString( "No files exported for '%1'" ).arg( plot->description() );
|
||||
}
|
||||
else
|
||||
{
|
||||
result->exportedFiles.v().insert( result->exportedFiles.v().end(),
|
||||
exportedFiles.begin(),
|
||||
exportedFiles.end() );
|
||||
result->exportedFiles.v().insert( result->exportedFiles.v().end(), exportedFiles.begin(), exportedFiles.end() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user