Merge branch 'dev' into cmake-improvements

This commit is contained in:
Magne Sjaastad 2018-02-28 08:33:39 +01:00
commit 25a1823f35
141 changed files with 1097 additions and 804 deletions

View File

@ -93,11 +93,9 @@
#include "RiuWellAllocationPlot.h"
#include "RiuFlowCharacteristicsPlot.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimFractureTemplateCollection.h"
#include "RimWellPathFracture.h"
#include "RimStimPlanColors.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "RicImportInputEclipseCaseFeature.h"
@ -511,10 +509,9 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
rimObservedData->updateMetaData();
}
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
oilField->fractureDefinitionCollection()->loadAndUpdateData();
oilField->fractureDefinitionCollection()->createAndAssignTemplateCopyForNonMatchingUnit();
oilField->fractureDefinitionCollection()->setDefaultConductivityResultIfEmpty();
{
@ -526,7 +523,6 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
fracture->loadDataAndUpdate();
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
@ -572,7 +568,6 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
viewProgress.setProgressDescription(riv->name());
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (m_project->isProjectFileVersionEqualOrOlderThan("2018.1.0.103"))
{
std::vector<RimStimPlanColors*> stimPlanColors;
@ -582,7 +577,6 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
stimPlanColors[0]->updateConductivityResultName();
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
riv->loadDataAndUpdate();
this->setActiveReservoirView(riv);

View File

@ -197,7 +197,7 @@ const caf::ColorTable& RiaColorTables::tensorWhiteGrayBlackPaletteColors()
{
static std::vector<cvf::Color3ub> colors{
cvf::Color3ub::WHITE,
cvf::Color3ub::GRAY,
cvf::Color3ub::LIGHT_GRAY,
cvf::Color3ub::BLACK,
};
@ -208,12 +208,27 @@ const caf::ColorTable& RiaColorTables::tensorWhiteGrayBlackPaletteColors()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const caf::ColorTable& RiaColorTables::tensorMagentaBrownBlackPaletteColors()
const caf::ColorTable& RiaColorTables::tensorOrangeBlueWhitePaletteColors()
{
static std::vector<cvf::Color3ub> colors{
cvf::Color3ub::DARK_MAGENTA,
cvf::Color3ub(236, 118, 0), // Orange
cvf::Color3ub(56, 56, 255), // Vivid Blue
cvf::Color3ub(210, 248, 250), // White Turquoiseish
};
static caf::ColorTable colorTable = caf::ColorTable(colors);
return colorTable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const caf::ColorTable& RiaColorTables::tensorsMagentaBrownGrayPaletteColors()
{
static std::vector<cvf::Color3ub> colors{
cvf::Color3ub(248, 0, 170), // Magenta
cvf::Color3ub::BROWN,
cvf::Color3ub::BLACK,
cvf::Color3ub::LIGHT_GRAY,
};
static caf::ColorTable colorTable = caf::ColorTable(colors);
@ -482,22 +497,6 @@ const caf::ColorTable& RiaColorTables::timestepsPaletteColors()
return colorTable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const caf::ColorTable& RiaColorTables::mohrsCirclePaletteColors()
{
static std::vector<cvf::Color3ub> colors{
cvf::Color3ub::RED,
cvf::Color3ub::DARK_GREEN,
cvf::Color3ub::BLUE
};
static caf::ColorTable colorTable = caf::ColorTable(colors);
return colorTable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -38,7 +38,8 @@ public:
static const caf::ColorTable& redWhiteBluePaletteColors();
static const caf::ColorTable& categoryPaletteColors();
static const caf::ColorTable& tensorWhiteGrayBlackPaletteColors();
static const caf::ColorTable& tensorMagentaBrownBlackPaletteColors();
static const caf::ColorTable& tensorOrangeBlueWhitePaletteColors();
static const caf::ColorTable& tensorsMagentaBrownGrayPaletteColors();
static const caf::ColorTable& angularPaletteColors();
static const caf::ColorTable& stimPlanPaletteColors();
static const caf::ColorTable& faultsPaletteColors();
@ -52,7 +53,6 @@ public:
static const caf::ColorTable& wellLogPlotPaletteColors();
static const caf::ColorTable& selectionPaletteColors();
static const caf::ColorTable& timestepsPaletteColors();
static const caf::ColorTable& mohrsCirclePaletteColors();
static cvf::Color3f undefinedCellColor();
static cvf::Color3f perforationLengthColor();

View File

@ -117,14 +117,8 @@ list( APPEND REFERENCED_CMAKE_FILES
CommandFileInterface/CMakeLists_files.cmake
CommandFileInterface/Core/CMakeLists_files.cmake
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND REFERENCED_CMAKE_FILES
Commands/FractureCommands/CMakeLists_files.cmake
)
endif()
)
option (RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS "Include ApplicationCode Unit Tests" OFF)
if (RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS)
@ -189,11 +183,6 @@ if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING)
endif()
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
add_definitions(-DUSE_PROTOTYPE_FEATURE_FRACTURES)
endif()
#############################################################################
# Qt specifics: Moc, ui, resources
#############################################################################
@ -558,10 +547,6 @@ if(RESINSIGHT_FOUND_HDF5)
set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_souring")
endif()
if(RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_fractures")
endif()
# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6
if (NOT "${RESINSIGHT_RHEL_SYSTEM_NAME}" STREQUAL "")
set (RESINSIGHT_PACKAGE_NAME "${RESINSIGHT_PACKAGE_NAME}_${RESINSIGHT_RHEL_SYSTEM_NAME}")

View File

@ -71,9 +71,6 @@ void RicHelpAboutFeature::onActionTriggered(bool isChecked)
#ifdef USE_HDF5
activeFeatures += " Souring";
#endif
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
activeFeatures += " Fractures";
#endif
if (!activeFeatures.isEmpty())
{

View File

@ -26,7 +26,7 @@
#include "RimProject.h"
#include "RimWellPath.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "cafSelectionManager.h"
@ -58,7 +58,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered(bool isChecked
RicNewFishbonesSubsFeature::askUserToSetUsefulScaling(wellPath->fishbonesCollection());
wellPath->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(obj);
Riu3DMainWindowTools::selectAsCurrentItem(obj);
RimProject* proj;
wellPath->firstAncestorOrThisOfTypeAsserted(proj);

View File

@ -27,7 +27,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "cafSelectionManager.h"
@ -62,7 +62,7 @@ void RicNewPerforationIntervalAtMeasuredDepthFeature::onActionTriggered(bool isC
wellPathCollection->uiCapability()->updateConnectedEditors();
wellPathCollection->scheduleRedrawAffectedViews();
RiuMainWindow::instance()->selectAsCurrentItem(perforationInterval);
Riu3DMainWindowTools::selectAsCurrentItem(perforationInterval);
}
//--------------------------------------------------------------------------------------------------

View File

@ -21,7 +21,7 @@
#include "WellPathCommands/RicWellPathsUnitSystemSettingsImpl.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RimPerforationInterval.h"
#include "RimPerforationCollection.h"
@ -66,7 +66,7 @@ void RicNewPerforationIntervalFeature::onActionTriggered(bool isChecked)
wellPathCollection->uiCapability()->updateConnectedEditors();
wellPathCollection->scheduleRedrawAffectedViews();
RiuMainWindow::instance()->selectAsCurrentItem(perforationInterval);
Riu3DMainWindowTools::selectAsCurrentItem(perforationInterval);
}
//--------------------------------------------------------------------------------------------------

View File

@ -27,7 +27,7 @@
#include "RimWellPathCompletions.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -60,7 +60,7 @@ void RicWellPathImportCompletionsFileFeature::onActionTriggered(bool isChecked)
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Path Completions", defaultDir, "Well Path Completions (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Path Completions", defaultDir, "Well Path Completions (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
if (wellPathFilePaths.size() < 1) return;

View File

@ -29,7 +29,7 @@
#include "RifPerforationIntervalReader.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -62,7 +62,7 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Path Perforation Intervals", defaultDir, "Well Path Perforation Intervals (*.ev);;All Files (*.*)");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Path Perforation Intervals", defaultDir, "Well Path Perforation Intervals (*.ev);;All Files (*.*)");
if (wellPathFilePaths.size() < 1) return;
@ -109,7 +109,7 @@ void RicWellPathImportPerforationIntervalsFeature::onActionTriggered(bool isChec
if (lastPerforationInterval)
{
RiuMainWindow::instance()->selectAsCurrentItem(lastPerforationInterval);
Riu3DMainWindowTools::selectAsCurrentItem(lastPerforationInterval);
}
}

View File

@ -8,18 +8,13 @@ ${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.h
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.h
${CMAKE_CURRENT_LIST_DIR}/RicExportFishbonesWellSegmentsFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.h
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.h
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.h
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.h
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.h
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.h
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.h
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.h
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.h
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.h
)
endif()
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicExportCompletionDataSettingsUi.cpp
@ -30,19 +25,13 @@ ${CMAKE_CURRENT_LIST_DIR}/RigCompletionData.cpp
${CMAKE_CURRENT_LIST_DIR}/RigCompletionDataGridCell.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportFishbonesWellSegmentsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCaseAndFileExportSettingsUi.cpp
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.cpp
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.cpp
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.cpp
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicExportFractureCompletionsImpl.cpp
${CMAKE_CURRENT_LIST_DIR}/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp
${CMAKE_CURRENT_LIST_DIR}/RigTransmissibilityCondenser.cpp
${CMAKE_CURRENT_LIST_DIR}/RigFractureTransmissibilityEquations.cpp
${CMAKE_CURRENT_LIST_DIR}/RigWellPathStimplanIntersector.cpp
)
endif()
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)

View File

@ -76,9 +76,7 @@ RicExportCompletionDataSettingsUi::RicExportCompletionDataSettingsUi(bool onlyWe
CAF_PDM_InitField(&includePerforations, "IncludePerforations", true, "Include Perforations", "", "", "");
CAF_PDM_InitField(&includeFishbones, "IncludeFishbones", true, "Include Fishbones", "", "", "");
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitField(&includeFractures, "IncludeFractures", true, "Include Fractures", "", "", "");
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitField(&excludeMainBoreForFishbones, "ExcludeMainBoreForFishbones", false, "Exclude Main Bore Transmissibility For Fishbones", "", "", "");
m_onlyWellPathCollectionSelected = onlyWellPathCollectionSelected;
@ -114,7 +112,6 @@ void RicExportCompletionDataSettingsUi::showForWellPath()
//--------------------------------------------------------------------------------------------------
void RicExportCompletionDataSettingsUi::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (changedField == &compdatExport)
{
if (compdatExport == WPIMULT_AND_DEFAULT_CONNECTION_FACTORS)
@ -128,7 +125,6 @@ void RicExportCompletionDataSettingsUi::fieldChangedByUi(const caf::PdmFieldHand
includeFractures.uiCapability()->setUiReadOnly(false);
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
//--------------------------------------------------------------------------------------------------
@ -210,7 +206,6 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
if (!includePerforations) timeStep.uiCapability()->setUiReadOnly(true);
else timeStep.uiCapability()->setUiReadOnly(false);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmUiGroup* fractureGroup = uiOrdering.addNewGroup("Export of Fracture Completions");
fractureGroup->add(&includeFractures);
@ -222,7 +217,6 @@ void RicExportCompletionDataSettingsUi::defineUiOrdering(QString uiConfigName, c
{
includeFractures.uiCapability()->setUiReadOnly(false);
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
uiOrdering.skipRemainingFields();

View File

@ -63,9 +63,7 @@ public:
caf::PdmField<bool> includePerforations;
caf::PdmField<bool> includeFishbones;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmField<bool> includeFractures;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmField<bool> excludeMainBoreForFishbones;

View File

@ -34,7 +34,7 @@
#include "RigEclipseCaseData.h"
#include "RigWellPath.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
#include "cafPdmUiPropertyViewDialog.h"
@ -78,7 +78,7 @@ void RicExportFishbonesWellSegmentsFeature::onActionTriggered(bool isChecked)
exportSettings.folder = defaultDir;
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Well Segments", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Well Segments", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
if (propertyDialog.exec() == QDialog::Accepted)

View File

@ -30,7 +30,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
#include "cafSelectionManager.h"
@ -118,7 +118,7 @@ void RicWellPathExportCompletionDataFeature::onActionTriggered(bool isChecked)
if (exportSettings->folder().isEmpty()) exportSettings->folder = defaultDir;
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), exportSettings, "Export Completion Data", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), exportSettings, "Export Completion Data", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
if (propertyDialog.exec() == QDialog::Accepted)

View File

@ -141,9 +141,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
}
size_t maxProgress = usedWellPaths.size() * 3 +
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
simWells.size() +
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
(exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL
? usedWellPaths.size()
: exportSettings.fileSplit == RicExportCompletionDataSettingsUi::SPLIT_ON_WELL_AND_COMPLETION_TYPE
@ -175,7 +173,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
}
progress.incrementProgress();
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (exportSettings.includeFractures())
{
std::vector<RigCompletionData> fractureCompletionData =
@ -183,11 +180,9 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
wellPath, exportSettings, fractureTransmissibilityExportInformationStream.get());
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
progress.incrementProgress();
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
for (auto simWell : simWells)
{
std::vector<RigCompletionData> fractureCompletionData = RicExportFractureCompletionsImpl::generateCompdatValuesForSimWell(
@ -195,7 +190,6 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
appendCompletionData(&completionsPerEclipseCell, fractureCompletionData);
progress.incrementProgress();
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
const QString eclipseCaseName = exportSettings.caseToApply->caseUserDescription();

View File

@ -25,7 +25,7 @@
#include "RimIntersectionCollection.h"
#include "RimGridView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "RiuViewer.h"
@ -125,7 +125,7 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
m_intersectionCollection->appendIntersectionAndUpdate(intersection);
RiuSelectionManager::instance()->deleteAllItems();
RiuMainWindow::instance()->selectAsCurrentItem(intersection);
Riu3DMainWindowTools::selectAsCurrentItem(intersection);
}
//--------------------------------------------------------------------------------------------------

View File

@ -26,7 +26,7 @@
#include "RimIntersectionCollection.h"
#include "RimGridView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "RiuViewer.h"
@ -116,7 +116,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
RiuSelectionManager::instance()->deleteAllItems();
RiuMainWindow::instance()->selectAsCurrentItem(intersection);
Riu3DMainWindowTools::selectAsCurrentItem(intersection);
}
//--------------------------------------------------------------------------------------------------

View File

@ -23,7 +23,7 @@
#include "RimEclipseInputCase.h"
#include "RiaApplication.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -49,7 +49,7 @@ void RicAddEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)");
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Select Eclipse Input Property Files", defaultDir, "All Files (*.* *)");
if (fileNames.isEmpty()) return;

View File

@ -27,7 +27,7 @@
#include "RimOilField.h"
#include "RiaApplication.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
//--------------------------------------------------------------------------------------------------
///
@ -73,8 +73,9 @@ void RicEclipseCaseNewGroupExec::redo()
analysisModels->caseGroups().push_back(createdObject);
analysisModels->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(createdObject);
RiuMainWindow::instance()->setExpanded(createdObject);
Riu3DMainWindowTools::selectAsCurrentItem(createdObject);
Riu3DMainWindowTools::setExpanded(createdObject);
}
}

View File

@ -29,7 +29,7 @@
#include "cafSelectionManager.h"
#include "cvfAssert.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
//--------------------------------------------------------------------------------------------------
///
@ -66,7 +66,7 @@ void RicEclipsePropertyFilterFeatureImpl::addPropertyFilter(RimEclipsePropertyFi
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
}
@ -83,7 +83,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
}
//--------------------------------------------------------------------------------------------------

View File

@ -25,7 +25,7 @@
#include "RimEclipseCaseCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -50,7 +50,7 @@ void RicImportEclipseCaseFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
app->setLastUsedDialogDirectory("BINARY_GRID", defaultDir);

View File

@ -21,7 +21,7 @@
#include "RiaApplication.h"
#include "RiaImportEclipseCaseTools.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QFileDialog>
@ -38,7 +38,7 @@ void RicImportEclipseCaseTimeStepFilterFeature::onActionTriggered(bool isChecked
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
QString fileName = QFileDialog::getOpenFileName(RiuMainWindow::instance(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
QString fileName = QFileDialog::getOpenFileName(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse File", defaultDir, "Eclipse Grid Files (*.GRID *.EGRID)");
if (!fileName.isEmpty())
{
defaultDir = QFileInfo(fileName).absolutePath();

View File

@ -30,7 +30,7 @@
#include "RimOilField.h"
#include "RimProject.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -76,7 +76,7 @@ bool RicImportInputEclipseCaseFeature::openInputEclipseCaseFromFileNames(const Q
analysisModels->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(riv->cellResult());
Riu3DMainWindowTools::selectAsCurrentItem(riv->cellResult());
if (fileNames.size() == 1)
{
@ -101,7 +101,7 @@ void RicImportInputEclipseCaseFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Eclipse Input Files", defaultDir, "Eclipse Input Files and Input Properties Eclipse Input Files (*.GRDECL);;All Files (*.*)");
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Eclipse Input Files", defaultDir, "Eclipse Input Files and Input Properties Eclipse Input Files (*.GRDECL);;All Files (*.*)");
if (fileNames.isEmpty()) return;

View File

@ -26,7 +26,7 @@
#include "RimProject.h"
#include "RiaApplication.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -53,7 +53,7 @@ void RicNewStatisticsCaseFeature::onActionTriggered(bool isChecked)
RimEclipseStatisticsCase* newCase = addStatisticalCalculation(uiItem);
if (newCase)
{
RiuMainWindow::instance()->selectAsCurrentItem(newCase);
Riu3DMainWindowTools::selectAsCurrentItem(newCase);
}
}
}

View File

@ -30,7 +30,7 @@
#include "RimEclipseInputPropertyCollection.h"
#include "RimExportInputPropertySettings.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
#include "cafSelectionManager.h"
@ -68,7 +68,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
if (!isResolved)
{
QMessageBox::warning(RiuMainWindow::instance(), "Export failure", "Property is not resolved, and then it is not possible to export the property.");
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Export failure", "Property is not resolved, and then it is not possible to export the property.");
return;
}
@ -101,7 +101,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
exportSettings.fileName = outputFileName;
}
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Eclipse Property to Text File", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Eclipse Property to Text File", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
if (propertyDialog.exec() == QDialog::Accepted)

View File

@ -35,7 +35,7 @@
#include "RigActiveCellInfo.h"
#include "RigEclipseCaseData.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
#include "cafSelectionManager.h"
@ -54,7 +54,7 @@ void executeCommand(RimEclipseView* view)
if (!view) return;
RicSaveEclipseInputVisibleCellsUi exportSettings;
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export FLUXNUM/MULTNUM", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export FLUXNUM/MULTNUM", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
if (propertyDialog.exec() == QDialog::Accepted)

View File

@ -34,7 +34,7 @@
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
#include "cafUtils.h"
@ -92,7 +92,7 @@ void RicSaveEclipseResultAsInputPropertyExec::redo()
exportSettings.fileName = outputFileName;
}
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &exportSettings, "Export Binary Eclipse Data to Text File", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &exportSettings, "Export Binary Eclipse Data to Text File", "");
RicExportFeatureImpl::configureForExport(&propertyDialog);
if (propertyDialog.exec() == QDialog::Accepted)

View File

@ -28,7 +28,7 @@
#include "RicSnapshotViewToFileFeature.h"
#include "RicSnapshotFilenameGenerator.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafUtils.h"
@ -123,11 +123,7 @@ void RicSnapshotAllPlotsToFileFeature::onActionTriggered(bool isChecked)
if (currentActiveWidget)
{
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->setActiveViewer(currentActiveWidget);
}
RiuPlotMainWindowTools::setActiveViewer(currentActiveWidget);
}
}

View File

@ -32,7 +32,7 @@
#include "RicSnapshotViewToFileFeature.h"
#include "RicSnapshotFilenameGenerator.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuViewer.h"
#include "RigFemResultPosEnum.h"
@ -72,9 +72,6 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(QString snapshotFolderName)
{
RiuMainWindow* mainWnd = RiuMainWindow::instance();
if (!mainWnd) return;
RimProject* project = RiaApplication::instance()->project();
if (project == nullptr) return;
@ -108,7 +105,7 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(QStrin
RiaApplication::instance()->setActiveReservoirView(riv);
RiuViewer* viewer = riv->viewer();
mainWnd->setActiveViewer(viewer->layoutWidget());
Riu3DMainWindowTools::setActiveViewer(viewer->layoutWidget());
RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate();
@ -159,11 +156,7 @@ void RicSnapshotAllViewsToFileFeature::onActionTriggered(bool isChecked)
if (currentActiveWidget)
{
RiuMainWindow* mainWindow = RiuMainWindow::instance();
if (mainWindow)
{
mainWindow->setActiveViewer(currentActiveWidget);
}
Riu3DMainWindowTools::setActiveViewer(currentActiveWidget);
}
}

View File

@ -25,7 +25,7 @@
#include "RimProject.h"
#include "RimFlowCharacteristicsPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
@ -79,12 +79,10 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered(bool isChecke
flowPlotColl->updateConnectedEditors();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->selectAsCurrentItem(flowCharacteristicsPlot);
mainPlotWindow->setExpanded(flowCharacteristicsPlot);
}
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(flowCharacteristicsPlot);
RiuPlotMainWindowTools::setExpanded(flowCharacteristicsPlot);
}
}
}

View File

@ -25,7 +25,7 @@
#include "RimProject.h"
#include "RimWellAllocationPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
@ -79,12 +79,8 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered(bool isChecked)
flowPlotColl->updateConnectedEditors();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->selectAsCurrentItem(wellAllocationPlot);
mainPlotWindow->setExpanded(wellAllocationPlot);
}
RiuPlotMainWindowTools::selectAsCurrentItem(wellAllocationPlot);
RiuPlotMainWindowTools::setExpanded(wellAllocationPlot);
}
}
}

View File

@ -41,7 +41,6 @@
#include "RiaSummaryTools.h"
#include "RiuMainPlotWindow.h"
#include "RiuMainWindow.h"
#include "cafSelectionManager.h"

View File

@ -37,7 +37,7 @@
#include "RimSimWellInView.h"
#include "RimViewManipulator.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafCmdFeature.h"
#include "cafCmdFeatureManager.h"
@ -156,7 +156,7 @@ void RicShowContributingWellsFeatureImpl::modifyViewToShowContributingWells(RimE
propertyFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->setExpanded(propertyFilterCollection);
Riu3DMainWindowTools::setExpanded(propertyFilterCollection);
viewToModify->faultCollection()->showFaultCollection = false;
viewToModify->faultCollection()->updateConnectedEditors();

View File

@ -32,7 +32,7 @@
#include "RimProject.h"
#include "Rim3dView.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include <QAction>
@ -91,13 +91,13 @@ void RicShowFlowCharacteristicsPlotFeature::onActionTriggered(bool isChecked)
RimFlowPlotCollection* flowPlotColl = RiaApplication::instance()->project()->mainPlotCollection->flowPlotCollection();
if (flowPlotColl)
{
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::showPlotMainWindow();
flowPlotColl->defaultFlowCharacteristicsPlot()->setFromFlowSolution(eclCase->defaultFlowDiagSolution());
flowPlotColl->defaultFlowCharacteristicsPlot()->updateConnectedEditors();
// Make sure the summary plot window is created and visible
plotwindow->selectAsCurrentItem(flowPlotColl->defaultFlowCharacteristicsPlot());
RiuPlotMainWindowTools::selectAsCurrentItem(flowPlotColl->defaultFlowCharacteristicsPlot());
}
}
}

View File

@ -28,7 +28,7 @@
#include "Rim3dView.h"
#include "RimWellAllocationPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
@ -110,8 +110,8 @@ void RicShowWellAllocationPlotFeature::onActionTriggered(bool isChecked)
flowPlotColl->defaultWellAllocPlot()->updateConnectedEditors();
// Make sure the summary plot window is created and visible
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
plotwindow->selectAsCurrentItem(flowPlotColl->defaultWellAllocPlot());
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(flowPlotColl->defaultWellAllocPlot());
}
}
}

View File

@ -26,7 +26,7 @@
#include "RimOilField.h"
#include "RimProject.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -59,7 +59,7 @@ void RicNewEllipseFractureTemplateFeature::selectFractureTemplateAndUpdate(RimFr
}
}
RiuMainWindow::instance()->selectAsCurrentItem(fractureTemplate);
Riu3DMainWindowTools::selectAsCurrentItem(fractureTemplate);
}
//--------------------------------------------------------------------------------------------------

View File

@ -34,7 +34,7 @@
#include "RimSimWellInView.h"
#include "RimStimPlanColors.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "RivSimWellPipeSourceInfo.h"
@ -109,7 +109,7 @@ void RicNewSimWellFractureAtPosFeature::onActionTriggered(bool isChecked)
fracture->setFractureTemplate(fracDef);
simWell->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
activeView->scheduleCreateDisplayModelAndRedraw();

View File

@ -36,7 +36,7 @@
#include "RimSimWellFractureCollection.h"
#include "RimSimWellInView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -98,7 +98,7 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
fracture->updateFracturePositionFromLocation();
eclipseWell->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
RimEclipseCase* eclipseCase = nullptr;
objHandle->firstAncestorOrThisOfType(eclipseCase);

View File

@ -26,7 +26,7 @@
#include "RimProject.h"
#include "RimStimPlanFractureTemplate.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -90,7 +90,7 @@ void RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool isChecked)
}
}
RiuMainWindow::instance()->selectAsCurrentItem(fractureDef);
Riu3DMainWindowTools::selectAsCurrentItem(fractureDef);
}
}

View File

@ -36,7 +36,7 @@
#include "RimWellPathFracture.h"
#include "RimWellPathFractureCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "WellPathCommands/RicWellPathsUnitSystemSettingsImpl.h"
@ -93,7 +93,7 @@ void RicNewWellPathFractureFeature::addFracture(RimWellPath* wellPath, double me
fracture->setFractureTemplate(fracDef);
wellPath->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
Riu3DMainWindowTools::selectAsCurrentItem(fracture);
RimProject* project = nullptr;
fractureCollection->firstAncestorOrThisOfType(project);

View File

@ -22,7 +22,7 @@
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RimGridView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafCmdExecCommandManager.h"
#include "cafSelectionManager.h"
@ -61,7 +61,7 @@ void RicAppendIntersectionBoxFeature::onActionTriggered(bool isChecked)
intersectionBox->setToDefaultSizeBox();
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
Riu3DMainWindowTools::selectAsCurrentItem(intersectionBox);
RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfTypeAsserted(rimView);

View File

@ -22,7 +22,7 @@
#include "RimCase.h"
#include "RimIntersection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "cafSelectionManagerTools.h"
@ -67,7 +67,7 @@ void RicNewIntersectionViewFeature::onActionTriggered(bool isChecked)
QString text = QString("The intersection view only supports vertical intersections.\n"
"The intersection '%1' is not vertical but a converted version will be shown in the view .").arg(intersection->name());
QMessageBox::warning(RiuMainWindow::instance(), "New Intersection View", text);
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "New Intersection View", text);
}
Rim2dIntersectionView* intersectionView = intersection->correspondingIntersectionView();

View File

@ -26,7 +26,7 @@
#include "RicScriptFeatureImpl.h"
#include "RimScriptCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cvfAssert.h"
@ -49,7 +49,7 @@ bool RicAddScriptPathFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicAddScriptPathFeature::onActionTriggered(bool isChecked)
{
QString selectedFolder = QFileDialog::getExistingDirectory(RiuMainWindow::instance(), "Select script folder");
QString selectedFolder = QFileDialog::getExistingDirectory(Riu3DMainWindowTools::mainWindowWidget(), "Select script folder");
if (!selectedFolder.isEmpty())
{
QString filePathString = RiaApplication::instance()->preferences()->scriptDirectories();

View File

@ -24,7 +24,7 @@
#include "RimCalcScript.h"
#include "RiaApplication.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
#include "cvfAssert.h"
@ -65,7 +65,7 @@ void RicEditScriptFeature::onActionTriggered(bool isChecked)
if (!myProcess->waitForStarted(1000))
{
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
}
}
}

View File

@ -27,7 +27,7 @@
#include "RimCalcScript.h"
#include "RimScriptCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiuTools.h"
#include "cafUtils.h"
@ -99,7 +99,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
QFile file(fullPathFilenameNewScript);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
{
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to create file\n" + fullPathFilenameNewScript);
return;
}
@ -108,7 +108,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
if (calcScript)
{
RiuMainWindow::instance()->selectAsCurrentItem(calcScript);
Riu3DMainWindowTools::selectAsCurrentItem(calcScript);
}
RiaApplication* app = RiaApplication::instance();
@ -123,7 +123,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
if (!myProcess->waitForStarted(1000))
{
QMessageBox::warning(RiuMainWindow::instance(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Script editor", "Failed to start script editor executable\n" + scriptEditor);
}
}
}

View File

@ -21,7 +21,7 @@
#include "RiaApplication.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RicPasteFeatureImpl.h"
@ -112,7 +112,7 @@ void RicPasteEclipseViewsFeature::onActionTriggered(bool isChecked)
lastViewCopy = rimReservoirView;
}
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
if (lastViewCopy) Riu3DMainWindowTools::selectAsCurrentItem(lastViewCopy);
}
//--------------------------------------------------------------------------------------------------

View File

@ -21,7 +21,7 @@
#include "RicPasteFeatureImpl.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RimGeoMechView.h"
#include "RimGeoMechCase.h"
@ -105,7 +105,7 @@ void RicPasteGeoMechViewsFeature::onActionTriggered(bool isChecked)
lastViewCopy = rimReservoirView;
}
if (lastViewCopy) RiuMainWindow::instance()->selectAsCurrentItem(lastViewCopy);
if (lastViewCopy) Riu3DMainWindowTools::selectAsCurrentItem(lastViewCopy);
}
//--------------------------------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafPdmObject.h"
#include "cafSelectionManager.h"
@ -71,7 +71,8 @@ void RicCreateSummaryCaseCollectionFeature::onActionTriggered(bool isChecked)
summaryCaseMainCollection->addCaseCollection(selection);
summaryCaseMainCollection->updateConnectedEditors();
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(summaryCaseMainCollection->summaryCaseCollections().back()->allSummaryCases().front());
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(summaryCaseMainCollection->summaryCaseCollections().back()->allSummaryCases().front());
}
//--------------------------------------------------------------------------------------------------

View File

@ -44,9 +44,7 @@
#include "RiuMainPlotWindow.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimFractureTemplateCollection.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "cafNotificationCenter.h"
@ -150,7 +148,6 @@ void RicDeleteItemExec::redo()
view->scheduleCreateDisplayModelAndRedraw();
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
RimFractureTemplateCollection* fracTemplateColl;
parentObj->firstAncestorOrThisOfType(fracTemplateColl);
if (fracTemplateColl)
@ -172,7 +169,6 @@ void RicDeleteItemExec::redo()
}
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
// Well paths

View File

@ -50,14 +50,12 @@
#include "RimWellLogRftCurve.h"
#include "RimWellRftPlot.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimEllipseFractureTemplate.h"
#include "RimSimWellFracture.h"
#include "RimSimWellFractureCollection.h"
#include "RimStimPlanFractureTemplate.h"
#include "RimWellPathFracture.h"
#include "RimWellPathFractureCollection.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "cafCmdExecCommandManager.h"
@ -113,15 +111,12 @@ bool isDeletable(caf::PdmUiItem* uiItem)
if (dynamic_cast<RimFishbonesMultipleSubs*>(uiItem)) return true;
if (dynamic_cast<RimPerforationInterval*>(uiItem)) return true;
if (dynamic_cast<RimAsciiDataCurve*>(uiItem)) return true;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (dynamic_cast<RimWellPathFractureCollection*>(uiItem)) return true;
if (dynamic_cast<RimWellPathFracture*>(uiItem)) return true;
if (dynamic_cast<RimEllipseFractureTemplate*>(uiItem)) return true;
if (dynamic_cast<RimStimPlanFractureTemplate*>(uiItem)) return true;
if (dynamic_cast<RimSimWellFractureCollection*>(uiItem)) return true;
if (dynamic_cast<RimSimWellFracture*>(uiItem)) return true;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
return false;
}

View File

@ -25,7 +25,7 @@
#include "RimGeoMechView.h"
#include "RimGeoMechResultDefinition.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -66,7 +66,7 @@ void RicGeoMechPropertyFilterFeatureImpl::addPropertyFilter(RimGeoMechPropertyFi
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
}
@ -83,7 +83,7 @@ void RicGeoMechPropertyFilterFeatureImpl::insertPropertyFilter(RimGeoMechPropert
propertyFilterCollection->reservoirView()->scheduleCreateDisplayModelAndRedraw();
propertyFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(propertyFilter);
Riu3DMainWindowTools::selectAsCurrentItem(propertyFilter);
}

View File

@ -33,7 +33,7 @@
#include "RigFemPartResultsCollection.h"
#include "RigGeoMechCaseData.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QFileDialog>
@ -56,7 +56,7 @@ void RicImportFormationNamesFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
QStringList fileNames = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Formation Names", defaultDir, "Formation Names description File (*.lyr);;All Files (*.*)");
QStringList fileNames = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Formation Names", defaultDir, "Formation Names description File (*.lyr);;All Files (*.*)");
if (fileNames.isEmpty()) return;
@ -96,7 +96,7 @@ void RicImportFormationNamesFeature::onActionTriggered(bool isChecked)
if (formationName)
{
RiuMainWindow::instance()->selectAsCurrentItem(formationName);
Riu3DMainWindowTools::selectAsCurrentItem(formationName);
}
}

View File

@ -26,7 +26,7 @@
#include "RimProject.h"
#include "RimSummaryObservedDataFile.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
@ -100,7 +100,8 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog()
} while (retryImport);
}
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(observedData);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(observedData);
}
//--------------------------------------------------------------------------------------------------

View File

@ -25,7 +25,7 @@
#include "RimGeoMechView.h"
#include "Rim3dView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "RiaLogging.h"
#include "cafSelectionManager.h"
@ -43,7 +43,7 @@ void RicNewViewFeature::addReservoirView(RimEclipseCase* eclipseCase, RimGeoMech
if (newView)
{
RiuMainWindow::instance()->setExpanded(newView);
Riu3DMainWindowTools::setExpanded(newView);
}
}

View File

@ -22,7 +22,7 @@
#include "RimCellRangeFilter.h"
#include "RimCellRangeFilterCollection.h"
#include "Rim3dView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
//--------------------------------------------------------------------------------------------------
@ -69,7 +69,7 @@ void RicRangeFilterInsertExec::redo()
m_cellRangeFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(rangeFilter);
Riu3DMainWindowTools::selectAsCurrentItem(rangeFilter);
}
}

View File

@ -25,7 +25,7 @@
#include "RimCellRangeFilterCollection.h"
#include "RimGridView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
//--------------------------------------------------------------------------------------------------
@ -75,7 +75,7 @@ void RicRangeFilterNewExec::redo()
m_cellRangeFilterCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(rangeFilter);
Riu3DMainWindowTools::selectAsCurrentItem(rangeFilter);
RimGridView* view = nullptr;
m_cellRangeFilterCollection->firstAncestorOrThisOfTypeAsserted(view);

View File

@ -25,7 +25,7 @@
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
@ -60,13 +60,13 @@ void RicSelectColorResult::onActionTriggered(bool isChecked)
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>(activeView);
if (eclView)
{
RiuMainWindow::instance()->selectAsCurrentItem(eclView->cellResult());
Riu3DMainWindowTools::selectAsCurrentItem(eclView->cellResult());
return;
}
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(activeView);
if (geoMechView)
{
RiuMainWindow::instance()->selectAsCurrentItem(geoMechView->cellResult());
Riu3DMainWindowTools::selectAsCurrentItem(geoMechView->cellResult());
}
}

View File

@ -35,7 +35,7 @@
#include "RifReaderEclipseRft.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
@ -206,11 +206,11 @@ RimWellLogExtractionCurve* RicWellLogTools::addExtractionCurve(RimWellLogTrack*
plotTrack->updateConnectedEditors();
// Make sure the summary plot window is created and visible
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::showPlotMainWindow();
RiaApplication::instance()->project()->updateConnectedEditors();
plotwindow->selectAsCurrentItem(curve);
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
return curve;
}
@ -254,11 +254,11 @@ RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, con
plotTrack->setFormationTrajectoryType(RimWellLogTrack::SIMULATION_WELL);
plotTrack->updateConnectedEditors();
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
RiuPlotMainWindowTools::showPlotMainWindow();
RiaApplication::instance()->project()->updateConnectedEditors();
plotwindow->selectAsCurrentItem(curve);
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
return curve;
}
@ -279,8 +279,8 @@ RimWellLogFileCurve* RicWellLogTools::addFileCurve(RimWellLogTrack* plotTrack)
plotTrack->updateConnectedEditors();
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
plotwindow->selectAsCurrentItem(curve);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(curve);
return curve;
}

View File

@ -31,7 +31,7 @@
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
@ -65,8 +65,8 @@ void RicDuplicateSummaryCurveFeature::onActionTriggered(bool isChecked)
if (curve)
{
RimSummaryCurve* newCurve = RicPasteSummaryCurveFeature::copyCurveAndAddToPlot(curve);
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(newCurve);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(newCurve);
}
}

View File

@ -36,7 +36,7 @@
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "cafPdmReferenceHelper.h"
@ -71,7 +71,8 @@ void RicNewGridTimeHistoryCurveFeature::createCurveFromSelectionItem(const RiuSe
plot->updateConnectedEditors();
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(newCurve);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(newCurve);
}
//--------------------------------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@
#include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cvfAssert.h"
@ -65,12 +65,9 @@ void RicNewSummaryCrossPlotFeature::onActionTriggered(bool isChecked)
summaryCrossPlotColl->updateConnectedEditors();
summaryPlot->loadDataAndUpdate();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->selectAsCurrentItem(summaryPlot);
mainPlotWindow->setExpanded(summaryPlot);
}
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(summaryPlot);
RiuPlotMainWindowTools::setExpanded(summaryPlot);
}
}

View File

@ -41,7 +41,7 @@
#include "RimSummaryPlotCollection.h"
#include "RimSummaryCalculationCollection.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "RiuSummaryCurveDefSelection.h"
#include "RiuSummaryQwtPlot.h"
#include "RiuTools.h"
@ -193,9 +193,10 @@ void RicSummaryCurveCreator::fieldChangedByUi(const caf::PdmFieldHandle* changed
if (changedField == &m_okButtonField)
{
m_closeButtonField = true;
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
mainPlotWindow->selectAsCurrentItem(m_targetPlot);
mainPlotWindow->setExpanded(m_targetPlot);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(m_targetPlot);
RiuPlotMainWindowTools::setExpanded(m_targetPlot);
}
m_applyButtonField = false;

View File

@ -29,7 +29,7 @@
#include "RimViewLinker.h"
#include "RimViewLinkerCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
@ -177,7 +177,7 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
proj->viewLinkerCollection.uiCapability()->updateConnectedEditors();
proj->updateConnectedEditors();
RiuMainWindow::instance()->setExpanded(proj->viewLinkerCollection());
Riu3DMainWindowTools::setExpanded(proj->viewLinkerCollection());
}

View File

@ -27,7 +27,7 @@
#include "RimViewLinker.h"
#include "RimViewLinkerCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QTreeView>
@ -81,8 +81,8 @@ void RicSetMasterViewFeature::onActionTriggered(bool isChecked)
proj->updateConnectedEditors();
// Set managed view collection to selected and expanded in project tree
RiuMainWindow::instance()->selectAsCurrentItem(viewLinker);
RiuMainWindow::instance()->setExpanded(viewLinker);
Riu3DMainWindowTools::selectAsCurrentItem(viewLinker);
Riu3DMainWindowTools::setExpanded(viewLinker);
}
//--------------------------------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@
#include "Rim3dView.h"
#include "RimViewController.h"
#include "RimViewLinker.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafSelectionManager.h"
@ -61,7 +61,7 @@ void RicShowLinkOptionsFeature::onActionTriggered(bool isChecked)
RimViewController* viewController = activeView->viewController();
RiuMainWindow::instance()->selectAsCurrentItem(viewController);
Riu3DMainWindowTools::selectAsCurrentItem(viewController);
}
//--------------------------------------------------------------------------------------------------

View File

@ -32,7 +32,7 @@
#include "RimWellLogTrack.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "RigWellLogFile.h"
@ -109,8 +109,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
plotTrack->viewer()->replot();
RiaApplication::instance()->project()->updateConnectedEditors();
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem(plot);
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow()->setExpanded(plotTrack);
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::selectAsCurrentItem(plot);
RiuPlotMainWindowTools::setExpanded(plotTrack);
}
//--------------------------------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@
#include "RimMainPlotCollection.h"
#include "RimEclipseResultCase.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "RiuSelectionManager.h"
#include "cafSelectionManagerTools.h"
@ -123,12 +123,9 @@ void RicNewPltPlotFeature::onActionTriggered(bool isChecked)
pltPlot->loadDataAndUpdate();
pltPlotColl->updateConnectedEditors();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->setExpanded(plotTrack);
mainPlotWindow->selectAsCurrentItem(pltPlot);
}
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded(plotTrack);
RiuPlotMainWindowTools::selectAsCurrentItem(pltPlot);
}
}

View File

@ -29,7 +29,7 @@
#include "RimWellPath.h"
#include "RimWellRftPlot.h"
#include "RiuMainPlotWindow.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManagerTools.h"
@ -84,12 +84,9 @@ void RicNewRftPlotFeature::onActionTriggered(bool isChecked)
rftPlot->loadDataAndUpdate();
rftPlotColl->updateConnectedEditors();
RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (mainPlotWindow)
{
mainPlotWindow->setExpanded(plotTrack);
mainPlotWindow->selectAsCurrentItem(rftPlot);
}
RiuPlotMainWindowTools::showPlotMainWindow();
RiuPlotMainWindowTools::setExpanded(plotTrack);
RiuPlotMainWindowTools::selectAsCurrentItem(rftPlot);
}
}

View File

@ -21,7 +21,7 @@
#include "RiaApplication.h"
#include "RimProject.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiObjectEditorHandle.h"
@ -46,7 +46,7 @@ void RicWellLogsImportFileFeature::onActionTriggered(bool isChecked)
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("WELL_LOGS_DIR");
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
if (wellLogFilePaths.size() < 1) return;

View File

@ -26,7 +26,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QFileDialog>
@ -50,7 +50,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("WELLPATHFORMATIONS_DIR");
QStringList wellPathFormationsFilePaths =
QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Picks", defaultDir,
QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Picks", defaultDir,
"Well Picks (*.csv);;All Files (*.*)");
if (wellPathFormationsFilePaths.size() < 1)
@ -80,7 +80,7 @@ void RicWellPathFormationsImportFileFeature::onActionTriggered(bool isChecked)
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
if (wellPath)
{
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
}
}
}

View File

@ -26,7 +26,7 @@
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QFileDialog>
@ -50,7 +50,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("WELLPATH_DIR");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
QStringList wellPathFilePaths = QFileDialog::getOpenFileNames(Riu3DMainWindowTools::mainWindowWidget(), "Import Well Paths", defaultDir, "Well Paths (*.json *.asc *.asci *.ascii *.dev);;All Files (*.*)");
if (wellPathFilePaths.size() < 1) return;
@ -73,7 +73,7 @@ void RicWellPathsImportFileFeature::onActionTriggered(bool isChecked)
RimWellPath* wellPath = oilField->wellPathCollection->mostRecentlyUpdatedWellPath();
if (wellPath)
{
RiuMainWindow::instance()->selectAsCurrentItem(wellPath);
Riu3DMainWindowTools::selectAsCurrentItem(wellPath);
}
}
}

View File

@ -20,7 +20,7 @@
#include "RicWellPathsUnitSystemSettingsUi.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include "cafPdmUiPropertyViewDialog.h"
@ -35,7 +35,7 @@ bool RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem(RimWellPath * wellP
}
RicWellPathsUnitSystemSettingsUi settings;
caf::PdmUiPropertyViewDialog propertyDialog(RiuMainWindow::instance(), &settings, "Select Unit System for Well Path", "");
caf::PdmUiPropertyViewDialog propertyDialog(Riu3DMainWindowTools::mainWindowWidget(), &settings, "Select Unit System for Well Path", "");
if (propertyDialog.exec() == QDialog::Accepted)
{
wellPath->setUnitSystem(settings.unitSystem());

View File

@ -37,17 +37,12 @@ ${CMAKE_CURRENT_LIST_DIR}/RifWellPathFormationReader.h
${CMAKE_CURRENT_LIST_DIR}/RifWellPathFormationsImporter.h
${CMAKE_CURRENT_LIST_DIR}/RifElementPropertyTableReader.h
${CMAKE_CURRENT_LIST_DIR}/RifElementPropertyReader.h
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanXmlReader.h
# HDF5 file reader is directly included in ResInsight main CmakeList.txt
#${CMAKE_CURRENT_LIST_DIR}/RifHdf5Reader.h
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanXmlReader.h
)
endif()
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RifEclipseDataTableFormatter.cpp
${CMAKE_CURRENT_LIST_DIR}/RifEclipseInputFileTools.cpp
@ -84,17 +79,12 @@ ${CMAKE_CURRENT_LIST_DIR}/RifWellPathFormationReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifWellPathFormationsImporter.cpp
${CMAKE_CURRENT_LIST_DIR}/RifElementPropertyTableReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifElementPropertyReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanXmlReader.cpp
# HDF5 file reader is directly included in ResInsight main CmakeList.txt
#${CMAKE_CURRENT_LIST_DIR}/RifHdf5Reader.cpp
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RifStimPlanXmlReader.cpp
)
endif()
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)

View File

@ -19,7 +19,7 @@
#include "RifWellPathFormationReader.h"
#include "RiaLogging.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
#include <QFile>
#include <QMessageBox>
@ -63,7 +63,7 @@ std::map<QString, cvf::ref<RigWellPathFormations>>
if (wellNames.empty() || formationNames.empty())
{
QMessageBox::warning(RiuMainWindow::instance(), "Import failure",
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Import failure",
QString("Failed to parse %1 as a well pick file").arg(filePath));
RiaLogging::error(QString("Failed to parse %1 as a well pick file").arg(filePath));
@ -71,7 +71,7 @@ std::map<QString, cvf::ref<RigWellPathFormations>>
}
else if (!(mdIsPresent || tvdIsPresent))
{
QMessageBox::warning(RiuMainWindow::instance(), "Import failure",
QMessageBox::warning(Riu3DMainWindowTools::mainWindowWidget(), "Import failure",
QString("Failed to parse %1 as a well pick file. Neither MD or TVD is present.").arg(filePath));
RiaLogging::error(QString("Failed to parse %1 as a well pick file. Neither MD or TVD is present.").arg(filePath));

View File

@ -2146,7 +2146,7 @@ std::vector<caf::Ten3f> RigFemPartResultsCollection::tensors(const RigFemResultA
address13.componentName = "S13";
address23.componentName = "S23";
}
else if (resVarAddr.fieldName == "E")
else if (resVarAddr.fieldName == "NE")
{
address11.componentName = "E11";
address22.componentName = "E22";
@ -2312,7 +2312,7 @@ std::vector<RigFemResultAddress> RigFemPartResultsCollection::tensorPrincipalCom
addresses[1].componentName = "S2";
addresses[2].componentName = "S3";
}
else if (resVarAddr.fieldName == "E")
else if (resVarAddr.fieldName == "NE")
{
addresses[0].componentName = "E1";
addresses[1].componentName = "E2";

View File

@ -36,15 +36,9 @@ ${CMAKE_CURRENT_LIST_DIR}/RivObjectSourceInfo.h
${CMAKE_CURRENT_LIST_DIR}/RivWellConnectionsPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivFishbonesSubsPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivTensorResultPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivWellFracturePartMgr.h
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RivWellFracturePartMgr.h
)
endif()
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RivCellEdgeEffectGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RivFaultPartMgr.cpp
@ -77,14 +71,9 @@ ${CMAKE_CURRENT_LIST_DIR}/RivObjectSourceInfo.cpp
${CMAKE_CURRENT_LIST_DIR}/RivWellConnectionsPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivFishbonesSubsPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivTensorResultPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivWellFracturePartMgr.cpp
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RivWellFracturePartMgr.cpp
)
endif()
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)

View File

@ -338,20 +338,19 @@ cvf::ref<cvf::Part> RivTensorResultPartMgr::createPart(const std::vector<TensorV
cvf::ref<cvf::ScalarMapperDiscreteLinear> discreteScalarMapper = new cvf::ScalarMapperDiscreteLinear;
auto vectorColors = m_rimReservoirView->tensorResults()->vectorColors();
if (vectorColors == RimTensorResults::MAGENTA_BROWN_BLACK || vectorColors == RimTensorResults::WHITE_GRAY_BLACK)
{
activeScalerMapper = discreteScalarMapper.p();
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
}
else
if (vectorColors == RimTensorResults::RESULT_COLORS)
{
activeScalerMapper = m_rimReservoirView->tensorResults()->legendConfig()->scalarMapper();
createResultColorTextureCoords(lineTexCoords.p(), tensorVisualizations, activeScalerMapper);
}
else
{
activeScalerMapper = discreteScalarMapper.p();
createOneColorPerPrincipalScalarMapper(vectorColors, discreteScalarMapper.p());
createOneColorPerPrincipalTextureCoords(lineTexCoords.p(), tensorVisualizations, discreteScalarMapper.p());
}
caf::ScalarMapperEffectGenerator surfEffGen(activeScalerMapper, caf::PO_1);
@ -382,14 +381,19 @@ void RivTensorResultPartMgr::createOneColorPerPrincipalScalarMapper(const RimTen
cvf::Color3ubArray arrowColors;
arrowColors.resize(3);
if (colorSet == RimTensorResults::MAGENTA_BROWN_BLACK)
{
arrowColors = RiaColorTables::tensorMagentaBrownBlackPaletteColors().color3ubArray();
}
else if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
if (colorSet == RimTensorResults::WHITE_GRAY_BLACK)
{
arrowColors = RiaColorTables::tensorWhiteGrayBlackPaletteColors().color3ubArray();
}
else if (colorSet == RimTensorResults::ORANGE_BLUE_WHITE)
{
arrowColors = RiaColorTables::tensorOrangeBlueWhitePaletteColors().color3ubArray();
}
else if (colorSet == RimTensorResults::MAGENTA_BROWN_GRAY)
{
arrowColors = RiaColorTables::tensorsMagentaBrownGrayPaletteColors().color3ubArray();
}
scalarMapper->setColors(arrowColors);
scalarMapper->setRange(0.5, 3.5);
@ -453,7 +457,7 @@ bool RivTensorResultPartMgr::isTensorAddress(RigFemResultAddress address)
{
return false;
}
if (!(address.fieldName == "SE" || address.fieldName == "ST" || address.fieldName == "E"))
if (!(address.fieldName == "SE" || address.fieldName == "ST" || address.fieldName == "NE"))
{
return false;
}

View File

@ -248,8 +248,6 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
}
else if (stimPlanTemplate)
{
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
const RigFractureCell* cell = getFractureCellAtDomainCoord(domainIntersectionPoint);
RimStimPlanColors* stimPlanColors = activeView.fractureColors;
@ -267,8 +265,6 @@ const QString RivWellFracturePartMgr::resultInfoText(const RimEclipseView& activ
// Cell index
text.append("Cell Index: ");
text.append(iText + ", " + jText + "\n");
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
return text;

View File

@ -82,7 +82,6 @@ RivWellPathPartMgr::~RivWellPathPartMgr()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
void RivWellPathPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList* model)
{
if (m_rimView.isNull()) return;
@ -99,7 +98,6 @@ void RivWellPathPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList* m
f->fracturePartManager()->appendGeometryPartsToModel(model, *eclView);
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
//--------------------------------------------------------------------------------------------------
///

View File

@ -62,9 +62,7 @@ public:
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
const QDateTime& timeStamp,

View File

@ -57,7 +57,6 @@ void RivWellPathsPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
void RivWellPathsPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList* model)
{
if (!isWellPathVisible()) return;
@ -69,7 +68,6 @@ void RivWellPathsPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList*
partMgr->appendStaticFracturePartsToModel(model);
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
//--------------------------------------------------------------------------------------------------
///

View File

@ -61,9 +61,7 @@ public:
const cvf::BoundingBox& wellPathClipBoundingBox,
const caf::DisplayCoordTransform* displayCoordTransform);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
const QDateTime& timeStamp,

View File

@ -95,14 +95,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RimTimeStepFilter.h
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculation.h
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.h
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.h
)
endif()
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimEclipseCaseCollection.cpp
@ -200,15 +196,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RimTimeStepFilter.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculation.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSummaryCalculationVariable.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.cpp
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanLegendConfig.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanColors.cpp
)
endif()
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)

View File

@ -9,25 +9,19 @@ ${CMAKE_CURRENT_LIST_DIR}/RimFishboneWellPathCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimPerforationCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimPerforationInterval.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathCompletions.h
${CMAKE_CURRENT_LIST_DIR}/RimEllipseFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureContainment.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureExportSettings.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.h
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RimEllipseFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureContainment.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureExportSettings.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.h
)
endif()
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimCompletionCellIntersectionCalc.cpp
@ -39,25 +33,19 @@ ${CMAKE_CURRENT_LIST_DIR}/RimFishboneWellPathCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimPerforationCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimPerforationInterval.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathCompletions.cpp
${CMAKE_CURRENT_LIST_DIR}/RimEllipseFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureContainment.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureExportSettings.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.cpp
)
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_FRACTURES)
list (APPEND SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimEllipseFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureContainment.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureExportSettings.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimFractureTemplateCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSimWellFractureCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStimPlanFractureTemplate.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFracture.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathFractureCollection.cpp
)
endif()
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)

View File

@ -38,7 +38,6 @@
#include "RigWellPathIntersectionTools.h"
#include "RigCellGeometryTools.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimFracture.h"
#include "RimWellPathFracture.h"
#include "RimFractureTemplate.h"
@ -47,7 +46,6 @@
#include "RimSimWellFracture.h"
#include "RigFractureGrid.h"
#include "RigFractureCell.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include <QDateTime>
@ -70,7 +68,6 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult(const RimP
}
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
for (RimEclipseView* view : eclipseCase->reservoirViews())
{
for (RimSimWellInView* simWell : view->wellCollection()->wells())
@ -81,7 +78,6 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult(const RimP
}
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
//--------------------------------------------------------------------------------------------------
@ -115,7 +111,6 @@ void RimCompletionCellIntersectionCalc::calculateWellPathIntersections(const Rim
}
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (wellPath->fractureCollection()->isChecked())
{
for (const RimWellPathFracture* fracture : wellPath->fractureCollection()->fractures())
@ -126,7 +121,6 @@ void RimCompletionCellIntersectionCalc::calculateWellPathIntersections(const Rim
}
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
if (wellPath->perforationIntervalCollection()->isChecked())
{
@ -182,7 +176,6 @@ void RimCompletionCellIntersectionCalc::calculatePerforationIntersections(const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
void RimCompletionCellIntersectionCalc::calculateFractureIntersections(const RigMainGrid* mainGrid, const RimFracture* fracture, std::vector<double>& values)
{
if (!fracture->fractureTemplate()) return;
@ -251,4 +244,3 @@ void RimCompletionCellIntersectionCalc::calculateFractureIntersections(const Rig
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES

View File

@ -20,18 +20,14 @@
#include <vector>
class RigMainGrid;
class RimEclipseCase;
class RimFishbonesMultipleSubs;
class RimFracture;
class RimPerforationInterval;
class RimProject;
class RimWellPath;
class RimFishbonesMultipleSubs;
class RimPerforationInterval;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
class RimFracture;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
class RimEclipseCase;
class RigMainGrid;
class QDateTime;
//==================================================================================================
@ -51,7 +47,5 @@ private:
static void calculateWellPathIntersections(const RimWellPath* wellPath, const RigMainGrid* grid, std::vector<double>& values, const QDateTime& fromDate);
static void calculateFishbonesIntersections(const RimFishbonesMultipleSubs* fishbonesSubs, const RigMainGrid* grid, std::vector<double>& values);
static void calculatePerforationIntersections(const RimWellPath* wellPath, const RimPerforationInterval* perforationInterval, const RigMainGrid* grid, std::vector<double>& values);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
static void calculateFractureIntersections(const RigMainGrid* mainGrid, const RimFracture* fracture, std::vector<double>& values);
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
};

View File

@ -28,7 +28,7 @@
#include "RifWellPathImporter.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
CAF_PDM_SOURCE_INIT(RimFishboneWellPathCollection, "WellPathCompletionCollection");
@ -133,7 +133,7 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
m_wellPaths.push_back(completion);
updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(completion);
Riu3DMainWindowTools::selectAsCurrentItem(completion);
uiCapability()->setUiHidden(!m_wellPaths.empty());

View File

@ -342,6 +342,28 @@ cvf::Mat4d RimFracture::transformMatrix() const
return m;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFracture::setFractureTemplateNoUpdate(RimFractureTemplate* fractureTemplate)
{
if (fractureTemplate && fractureTemplate->fractureTemplateUnit() != fractureUnit())
{
QString fractureUnitText = RiaEclipseUnitTools::UnitSystemType::uiText(fractureUnit());
QString warningText =
QString("Using a fracture template defined in a different unit is not supported.\n\nPlease select a "
"fracture template of unit '%1'")
.arg(fractureUnitText);
QMessageBox::warning(nullptr, "Fracture Template Selection", warningText);
return;
}
m_fractureTemplate = fractureTemplate;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -622,21 +644,7 @@ size_t RimFracture::findAnchorEclipseCell(const RigMainGrid* mainGrid ) const
//--------------------------------------------------------------------------------------------------
void RimFracture::setFractureTemplate(RimFractureTemplate* fractureTemplate)
{
if (fractureTemplate && fractureTemplate->fractureTemplateUnit() != fractureUnit())
{
QString fractureUnitText = RiaEclipseUnitTools::UnitSystemType::uiText(fractureUnit());
QString warningText =
QString("Using a fracture template defined in a different unit is not supported.\n\nPlease select a "
"fracture template of unit '%1'")
.arg(fractureUnitText);
QMessageBox::warning(nullptr, "Fracture Template Selection", warningText);
return;
}
m_fractureTemplate = fractureTemplate;
setFractureTemplateNoUpdate(fractureTemplate);
if (!fractureTemplate)
{

View File

@ -72,6 +72,7 @@ public:
cvf::Mat4d transformMatrix() const;
void setFractureTemplateNoUpdate(RimFractureTemplate* fractureTemplate);
void setFractureTemplate(RimFractureTemplate* fractureTemplate);
RimFractureTemplate* fractureTemplate() const;

View File

@ -18,6 +18,8 @@
#include "RimFractureTemplateCollection.h"
#include "RiaLogging.h"
#include "RigStatisticsMath.h"
#include "RimCase.h"
@ -127,6 +129,69 @@ void RimFractureTemplateCollection::computeMinMax(const QString& uiResultName, c
if (*negClosestToZero) *negClosestToZero = posNegAccumulator.neg;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimFractureTemplateCollection::createAndAssignTemplateCopyForNonMatchingUnit()
{
// If a fracture has different unit than the associated template, create a copy of template in correct unit
std::vector<RimFractureTemplate*> templatesToBeAdded;
for (RimFractureTemplate* fractureTemplate : fractureDefinitions())
{
if (fractureTemplate)
{
RimFractureTemplate* templateWithMatchingUnit = nullptr;
std::vector<caf::PdmObjectHandle*> referringObjects;
fractureTemplate->objectsWithReferringPtrFields(referringObjects);
for (auto refObj : referringObjects)
{
auto fracture = dynamic_cast<RimFracture*>(refObj);
if (fracture && fracture->fractureUnit() != fractureTemplate->fractureTemplateUnit())
{
if (!templateWithMatchingUnit)
{
templateWithMatchingUnit = dynamic_cast<RimFractureTemplate*>(fractureTemplate->xmlCapability()->copyByXmlSerialization(caf::PdmDefaultObjectFactory::instance()));
auto currentUnit = fractureTemplate->fractureTemplateUnit();
auto neededUnit = RiaEclipseUnitTools::UNITS_UNKNOWN;
if (currentUnit == RiaEclipseUnitTools::UNITS_METRIC)
{
neededUnit = RiaEclipseUnitTools::UNITS_FIELD;
}
else if (currentUnit == RiaEclipseUnitTools::UNITS_FIELD)
{
neededUnit = RiaEclipseUnitTools::UNITS_METRIC;
}
templateWithMatchingUnit->convertToUnitSystem(neededUnit);
QString name = templateWithMatchingUnit->name();
name += " (created to match fracture unit)";
templateWithMatchingUnit->setName(name);
templatesToBeAdded.push_back(templateWithMatchingUnit);
}
RiaLogging::warning("Detected fracture with different unit than fracture template. Creating copy of template "
"with matching unit.");
CVF_ASSERT(templateWithMatchingUnit->fractureTemplateUnit() == fracture->fractureUnit());
fracture->setFractureTemplateNoUpdate(templateWithMatchingUnit);
}
}
}
}
for (auto templateWithMatchingUnit : templatesToBeAdded)
{
fractureDefinitions.push_back(templateWithMatchingUnit);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -46,6 +46,7 @@ public:
std::vector<std::pair<QString, QString> > resultNamesAndUnits() const;
void computeMinMax(const QString& uiResultName, const QString& unit, double* minValue, double* maxValue, double* posClosestToZero, double* negClosestToZero) const;
void createAndAssignTemplateCopyForNonMatchingUnit();
void loadAndUpdateData();
void setDefaultConductivityResultIfEmpty();

View File

@ -27,7 +27,7 @@
#include "RifWellPathImporter.h"
#include "RiuMainWindow.h"
#include "Riu3DMainWindowTools.h"
CAF_PDM_SOURCE_INIT(RimPerforationCollection, "PerforationCollection");
@ -81,7 +81,7 @@ void RimPerforationCollection::appendPerforation(RimPerforationInterval* perfora
perforation->setUnitSystemSpecificDefaults();
updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(perforation);
Riu3DMainWindowTools::selectAsCurrentItem(perforation);
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);

View File

@ -21,9 +21,7 @@
#include "RimFishbonesCollection.h"
#include "RimFishboneWellPathCollection.h"
#include "RimPerforationCollection.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimWellPathFractureCollection.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "cvfAssert.h"
@ -47,11 +45,9 @@ RimWellPathCompletions::RimWellPathCompletions()
m_fishbonesCollection = new RimFishbonesCollection;
m_fishbonesCollection.uiCapability()->setUiHidden(true);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitFieldNoDefault(&m_fractureCollection, "Fractures", "Fractures", "", "", "");
m_fractureCollection = new RimWellPathFractureCollection;
m_fractureCollection.uiCapability()->setUiHidden(true);
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitField(&m_wellNameForExport, "WellNameForExport", QString(), "Well Name for Completion Export", "", "", "");
}
@ -95,26 +91,22 @@ QString RimWellPathCompletions::wellNameForExport() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() const
{
CVF_ASSERT(m_fractureCollection);
return m_fractureCollection;
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPathCompletions::hasCompletions() const
{
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (!fractureCollection()->fractures().empty())
{
return true;
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
return !fishbonesCollection()->fishbonesSubs().empty() ||
!fishbonesCollection()->wellPathCollection()->wellPaths().empty() ||
@ -147,10 +139,8 @@ void RimWellPathCompletions::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTree
uiTreeOrdering.add(&m_fishbonesCollection);
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
if (!fractureCollection()->fractures().empty())
{
uiTreeOrdering.add(&m_fractureCollection);
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}

View File

@ -24,9 +24,7 @@
class RimFishbonesCollection;
class RimPerforationCollection;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
class RimWellPathFractureCollection;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
//==================================================================================================
///
@ -41,9 +39,7 @@ public:
RimFishbonesCollection* fishbonesCollection() const;
RimPerforationCollection* perforationCollection() const;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
RimWellPathFractureCollection* fractureCollection() const;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
void setWellNameForExport(const QString& name);
QString wellNameForExport() const;
@ -57,9 +53,7 @@ protected:
private:
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmChildField<RimWellPathFractureCollection*> m_fractureCollection;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmField<QString> m_wellNameForExport;
};

View File

@ -77,7 +77,6 @@
#include "RimWellPltPlot.h"
#include "RimWellRftPlot.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimEllipseFractureTemplate.h"
#include "RimStimPlanFractureTemplate.h"
#include "RimFractureTemplateCollection.h"
@ -85,7 +84,6 @@
#include "RimSimWellFracture.h"
#include "RimWellPathFracture.h"
#include "RimWellPathFractureCollection.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "RiuMainWindow.h"
@ -266,10 +264,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator();
menuBuilder.subMenuStart("Completions", QIcon(":/FishBoneGroup16x16.png"));
// Fracture commands
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
menuBuilder << "RicNewWellPathFractureFeature";
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
menuBuilder << "RicNewFishbonesSubsFeature";
menuBuilder << "RicNewPerforationIntervalFeature";
menuBuilder << "RicEditPerforationCollectionFeature";
@ -525,7 +520,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
{
menuBuilder << "RicShowGridStatisticsFeature";
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
else if (dynamic_cast<RimSimWellFracture*>(uiItem))
{
menuBuilder << "RicNewSimWellFractureFeature";
@ -561,8 +555,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "Separator";
menuBuilder << "RicConvertFractureTemplateUnitFeature";
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
if (dynamic_cast<Rim3dView*>(uiItem))
{
@ -678,10 +670,8 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicEclipseWellShowSpheresFeature";
menuBuilder << "RicEclipseWellShowWellCellsFeature";
menuBuilder << "RicEclipseWellShowWellCellFenceFeature";
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
menuBuilder << "Separator";
menuBuilder << "RicNewSimWellFractureFeature";
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
menuBuilder.addSeparator();
menuBuilder << "RicCopyIntersectionsToAllViewsInCaseFeature";

View File

@ -254,10 +254,7 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView()
rimEclipseView->cellEdgeResult()->setResultVariable("MULT");
rimEclipseView->cellEdgeResult()->enableCellEdgeColors = false;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
rimEclipseView->fractureColors()->setDefaultResultName();
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
caf::PdmDocument::updateUiIconStateRecursively(rimEclipseView);

View File

@ -71,12 +71,10 @@
#include "RivTernarySaturationOverlayItem.h"
#include "RivWellPathsPartMgr.h"
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
#include "RimFracture.h"
#include "RimFractureTemplateCollection.h"
#include "RimSimWellFracture.h"
#include "RivWellFracturePartMgr.h"
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
#include "cafCadNavigation.h"
@ -123,11 +121,9 @@ RimEclipseView::RimEclipseView()
faultResultSettings = new RimEclipseFaultColors();
faultResultSettings.uiCapability()->setUiHidden(true);
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitFieldNoDefault(&fractureColors, "StimPlanColors", "Fracture", "", "", "");
fractureColors = new RimStimPlanColors();
fractureColors.uiCapability()->setUiHidden(true);
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
CAF_PDM_InitFieldNoDefault(&wellCollection, "WellCollection", "Simulation Wells", "", "", "");
wellCollection = new RimSimWellInViewCollection;
@ -462,15 +458,11 @@ void RimEclipseView::createDisplayModel()
// NB! StimPlan legend colors must be updated before well path geometry is added to the model
// as the fracture geometry depends on the StimPlan legend colors
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
fractureColors->updateLegendData();
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
m_wellPathsPartManager->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p());
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
m_wellPathPipeVizModel->updateBoundingBoxesRecursive();
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());
@ -702,7 +694,6 @@ void RimEclipseView::updateCurrentTimeStep()
}
// Sim Well Fractures
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
{
cvf::String name = "SimWellFracturesModel";
this->removeModelByName(frameScene, name);
@ -733,7 +724,6 @@ void RimEclipseView::updateCurrentTimeStep()
simWellFracturesModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel(simWellFracturesModelBasicList.p());
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
}
@ -770,9 +760,7 @@ void RimEclipseView::onLoadDataAndUpdate()
this->cellEdgeResult()->loadResult();
this->faultResultSettings()->customFaultResult()->loadResult();
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
this->fractureColors->loadDataAndUpdate();
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
updateMdiWindowVisibility();
@ -786,7 +774,6 @@ void RimEclipseView::onLoadDataAndUpdate()
syncronizeWellsWithResults();
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
{
// Update simulation well fractures after well cell results are imported
@ -797,7 +784,6 @@ void RimEclipseView::onLoadDataAndUpdate()
fracture->loadDataAndUpdate();
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
this->scheduleCreateDisplayModelAndRedraw();
}
@ -1046,7 +1032,6 @@ void RimEclipseView::updateLegends()
this->cellEdgeResult()->legendConfig()->setAutomaticRanges(cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE, cvf::UNDEFINED_DOUBLE);
}
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
RimLegendConfig* stimPlanLegend = fractureColors()->activeLegend();
if (stimPlanLegend)
{
@ -1057,7 +1042,6 @@ void RimEclipseView::updateLegends()
m_viewer->addColorLegendToBottomLeftCorner(stimPlanLegend->legend());
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
}
//--------------------------------------------------------------------------------------------------
@ -1395,8 +1379,6 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
uiTreeOrdering.add(faultResultSettings());
uiTreeOrdering.add(wellCollection());
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
RimProject* project = RiaApplication::instance()->project();
CVF_ASSERT(project);
RimOilField* oilfield = project->activeOilField();
@ -1408,7 +1390,6 @@ void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering
uiTreeOrdering.add(fractureColors());
}
}
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
uiTreeOrdering.add(faultCollection());
uiTreeOrdering.add(m_crossSectionCollection());

View File

@ -53,9 +53,7 @@ class RimFaultInViewCollection;
class RimReservoirCellResultsStorage;
class RimReservoirCellResultsStorage;
class RimSimWellInViewCollection;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
class RimStimPlanColors;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
class RiuViewer;
class RivReservoirSimWellsPartMgr;
class RivIntersectionPartMgr;
@ -85,9 +83,7 @@ public:
caf::PdmChildField<RimEclipseCellColors*> cellResult;
caf::PdmChildField<RimCellEdgeColors*> cellEdgeResult;
caf::PdmChildField<RimEclipseFaultColors*> faultResultSettings;
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmChildField<RimStimPlanColors*> fractureColors;
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
caf::PdmChildField<RimSimWellInViewCollection*> wellCollection;
caf::PdmChildField<RimFaultInViewCollection*> faultCollection;

View File

@ -383,6 +383,22 @@ void RimGeoMechCase::addElementPropertyFiles(const std::vector<caf::FilePath>& f
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimGeoMechCase::cohesion() const
{
return m_cohesion;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimGeoMechCase::frictionAngleDeg() const
{
return m_frictionAngleDeg;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

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