Copy changes from dev-branch into main
History of main branch was difficult to merge. Take a copy of dev-branch, and merge both ways between dev and main after the release.
12
.github/workflows/AppFwkUnitTest.yml
vendored
@@ -46,7 +46,7 @@ jobs:
|
||||
run: |
|
||||
execute_process(
|
||||
COMMAND cmake
|
||||
-S Fwk/AppFwk
|
||||
-S Fwk
|
||||
-B cmakebuild
|
||||
-G Ninja
|
||||
RESULT_VARIABLE result
|
||||
@@ -70,13 +70,13 @@ jobs:
|
||||
- name: Run Unit Tests
|
||||
shell: bash
|
||||
run: |
|
||||
cmakebuild/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCore_UnitTests
|
||||
cmakebuild/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXml_UnitTests
|
||||
cmakebuild/cafProjectDataModel/cafProjectDataModel_UnitTests/cafProjectDataModel_UnitTests
|
||||
cmakebuild/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScripting_UnitTests
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmCore_UnitTests/cafPdmCore_UnitTests
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafPdmXml/cafPdmXml_UnitTests/cafPdmXml_UnitTests
|
||||
cmakebuild/AppFwk/cafProjectDataModel/cafProjectDataModel_UnitTests/cafProjectDataModel_UnitTests
|
||||
cmakebuild/AppFwk/cafPdmScripting/cafPdmScripting_UnitTests/cafPdmScripting_UnitTests
|
||||
|
||||
- name: Run Unit Tests Windows (does not work on Linux)
|
||||
if: contains( matrix.os, 'windows')
|
||||
shell: bash
|
||||
run: |
|
||||
cmakebuild/cafUserInterface/cafUserInterface_UnitTests/cafUserInterface_UnitTests
|
||||
cmakebuild/AppFwk/cafUserInterface/cafUserInterface_UnitTests/cafUserInterface_UnitTests
|
||||
|
||||
11
.github/workflows/ResInsightWithCache.yml
vendored
@@ -196,6 +196,7 @@ jobs:
|
||||
-D RESINSIGHT_BUNDLE_OPENSSL=true
|
||||
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
|
||||
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
|
||||
-D RESINSIGHT_ENABLE_PRECOMPILED_HEADERS=false
|
||||
-D RESINSIGHT_ENABLE_UNITY_BUILD=${{ matrix.config.unity-build }}
|
||||
-D RESINSIGHT_ENABLE_GRPC=${{ matrix.config.build-python-module }}
|
||||
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }}
|
||||
@@ -229,6 +230,14 @@ jobs:
|
||||
run: |
|
||||
cmakebuild/ApplicationExeCode/ResInsight --unittest
|
||||
|
||||
- name: (Python) Check types using mypy
|
||||
if: matrix.config.build-python-module
|
||||
shell: bash
|
||||
run: |
|
||||
${{ steps.python-path.outputs.PYTHON_EXECUTABLE }} -m pip install mypy types-protobuf
|
||||
cd GrpcInterface/Python/rips
|
||||
${{ steps.python-path.outputs.PYTHON_EXECUTABLE }} -m mypy *.py generated/generated_classes.py
|
||||
|
||||
- name: Run pytest
|
||||
if: matrix.config.build-python-module
|
||||
env:
|
||||
@@ -276,7 +285,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
|
||||
- name: Publish package distributions to TestPyPI
|
||||
- name: Publish Python package to pypi
|
||||
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
# uncomment the two lines below to publish to test PyPi
|
||||
|
||||
15
.github/workflows/clang-tidy.yml
vendored
@@ -2,6 +2,9 @@ name: clang-tidy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
paths:
|
||||
- '**.clang-tidy'
|
||||
workflow_dispatch:
|
||||
@@ -65,17 +68,11 @@ jobs:
|
||||
- name: Run clang-tidy and apply fixes, clang-format after fixes
|
||||
run: |
|
||||
cd build
|
||||
run-clang-tidy-15 -fix files ApplicationLibCode/Application ApplicationLibCode/ProjectDataModel ApplicationLibCode/ReservoirDataModel ApplicationLibCode/Commands ApplicationLibCode/GeoMech
|
||||
run-clang-tidy-15 -config-file ../ApplicationLibCode/.clang-tidy -fix files ApplicationLibCode
|
||||
- name: Run clang-format after clang-tidy
|
||||
run: |
|
||||
cd build/ApplicationLibCode
|
||||
cd ApplicationLibCode
|
||||
find -name '*.h' -o -name '*.cpp' -o -name '*.inl' | xargs clang-format-15 -i
|
||||
- name: Remove Qt before creating PR
|
||||
run: |
|
||||
rm -rf Qt
|
||||
cd ThirdParty/vcpkg
|
||||
git reset --hard HEAD
|
||||
git clean -fxd
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -83,3 +80,5 @@ jobs:
|
||||
title: "Fixes by clang-tidy"
|
||||
branch: clang-tidy-patches
|
||||
branch-suffix: random
|
||||
add-paths: |
|
||||
ApplicationLibCode/*
|
||||
|
||||
2
.gitignore
vendored
@@ -79,5 +79,3 @@ CMakePresets.json
|
||||
|
||||
#Python
|
||||
*.pyc
|
||||
|
||||
*.ESMRY
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
^ApplicationLibCode/ReservoirDataModel/RigWellLogFile.cpp:28:aswell
|
||||
^ApplicationLibCode/ReservoirDataModel/RigWellLogLasFile.cpp:28:aswell
|
||||
^ApplicationLibCode/ReservoirDataModel/RigLasFileExporter.cpp:33:aswell
|
||||
^ApplicationExeCode/Resources/EastView.svg
|
||||
^ApplicationExeCode/Resources/NorthView.svg
|
||||
|
||||
@@ -215,7 +215,8 @@
|
||||
<file>themes/dark/arrow-down.svg</file>
|
||||
<file>themes/dark/arrow-up.svg</file>
|
||||
<file>themes/dark/gripper.svg</file>
|
||||
<file>themes/light/gripper.svg</file>
|
||||
<file>themes/shared/radio-button-active.svg</file>
|
||||
<file>themes/shared/radio-circle-active.svg</file>
|
||||
<file>themes/dark/checkbox-checked.svg</file>
|
||||
<file>themes/dark/checkbox-checked-disabled.svg</file>
|
||||
<file>themes/dark/checkbox-unchecked.svg</file>
|
||||
@@ -274,7 +275,12 @@
|
||||
<file>open-text-editor.svg</file>
|
||||
<file>Seismic16x16.png</file>
|
||||
<file>SeismicDelta16x16.png</file>
|
||||
<file>Fullscreen.png</file>
|
||||
<file>SeismicView16x16.png</file>
|
||||
<file>SeismicView24x24.png</file>
|
||||
<file>SeismicViews24x24.png</file>
|
||||
<file>SeismicData24x24.png</file>
|
||||
<file>SeismicSection16x16.png</file>
|
||||
<file>Fullscreen.png</file>
|
||||
<file>plot-template-standard.svg</file>
|
||||
<file>plot-template-ensemble.svg</file>
|
||||
<file>decline-curve.svg</file>
|
||||
|
||||
BIN
ApplicationExeCode/Resources/SeismicData24x24.png
Normal file
|
After Width: | Height: | Size: 461 B |
BIN
ApplicationExeCode/Resources/SeismicSection16x16.png
Normal file
|
After Width: | Height: | Size: 705 B |
BIN
ApplicationExeCode/Resources/SeismicView16x16.png
Normal file
|
After Width: | Height: | Size: 825 B |
BIN
ApplicationExeCode/Resources/SeismicView24x24.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
ApplicationExeCode/Resources/SeismicViews24x24.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
@@ -27,6 +27,20 @@ $plotGridColor: #394046; // Plot grid color
|
||||
$auxiliaryCurveColor: #000000; // Auxiliary curve color
|
||||
$externalInputColor: #e82257; // External input background color
|
||||
|
||||
QTreeView[state="UseRadioButtons"] {
|
||||
color: $textColor;
|
||||
selection-color: $textColor;
|
||||
}
|
||||
|
||||
QTreeView[state="UseRadioButtons"]::indicator:checked {
|
||||
image: url(:/themes/shared/radio-button-active.svg);
|
||||
}
|
||||
|
||||
QTreeView[state="UseRadioButtons"]::indicator:unchecked {
|
||||
image: url(:/themes/shared/radio-circle-active.svg);
|
||||
}
|
||||
|
||||
|
||||
svg {
|
||||
stroke: white;
|
||||
stroke-width: 2;
|
||||
|
||||
@@ -24,6 +24,21 @@ $plotGridColor: #394046; // Plot grid color
|
||||
$auxiliaryCurveColor: #000000; // Auxiliary curve color
|
||||
$externalInputColor: #fff2a7; // Background color for external input fields
|
||||
|
||||
|
||||
QTreeView[state="UseRadioButtons"] {
|
||||
color: $textColor;
|
||||
selection-color: $textColor;
|
||||
}
|
||||
|
||||
QTreeView[state="UseRadioButtons"]::indicator:checked {
|
||||
image: url(:/themes/shared/radio-button-active.svg);
|
||||
}
|
||||
|
||||
QTreeView[state="UseRadioButtons"]::indicator:unchecked {
|
||||
image: url(:/themes/shared/radio-circle-active.svg);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 24 24"
|
||||
style="enable-background:new 0 0 24 24;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="radio-button-active.svg"
|
||||
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs36"><rect
|
||||
x="3.3651412"
|
||||
y="2.1265823"
|
||||
width="18.835443"
|
||||
height="19.793574"
|
||||
id="rect250" /></defs><sodipodi:namedview
|
||||
id="namedview34"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="42.791667"
|
||||
inkscape:cx="10.738072"
|
||||
inkscape:cy="10.703018"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" />
|
||||
<style
|
||||
type="text/css"
|
||||
id="style20">
|
||||
.st0{fill:url(#SVGID_1_);stroke:#8F9090;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#8DC584;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<linearGradient
|
||||
id="SVGID_1_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="1.1804"
|
||||
y1="12.4846"
|
||||
x2="22.8196"
|
||||
y2="12.4846">
|
||||
<stop
|
||||
offset="1.118836e-07"
|
||||
style="stop-color:#9D9D9C"
|
||||
id="stop22" />
|
||||
<stop
|
||||
offset="0.5652"
|
||||
style="stop-color:#CECECE"
|
||||
id="stop24" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#5C5C5B"
|
||||
id="stop26" />
|
||||
</linearGradient>
|
||||
|
||||
|
||||
<ellipse
|
||||
style="fill:none;stroke:#999999;stroke-width:2.06358;stroke-miterlimit:3.4;stroke-dasharray:none"
|
||||
id="path848"
|
||||
ry="9.2489386"
|
||||
rx="9.2021999"
|
||||
cy="12"
|
||||
cx="12" /><path
|
||||
style="fill:#999999;fill-opacity:1;stroke:#999999;stroke-width:5.87689;stroke-miterlimit:3.4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path964"
|
||||
sodipodi:type="arc"
|
||||
sodipodi:cx="11.871469"
|
||||
sodipodi:cy="12.000001"
|
||||
sodipodi:rx="3.6184046"
|
||||
sodipodi:ry="3.7936726"
|
||||
sodipodi:start="0"
|
||||
sodipodi:end="6.2730014"
|
||||
sodipodi:open="true"
|
||||
sodipodi:arc-type="arc"
|
||||
d="m 15.489873,12.000001 a 3.6184046,3.7936726 0 0 1 -3.609192,3.79366 3.6184046,3.7936726 0 0 1 -3.6275702,-3.774343 3.6184046,3.7936726 0 0 1 3.5907212,-3.812879 3.6184046,3.7936726 0 0 1 3.645854,3.754928" /></svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 24 24"
|
||||
style="enable-background:new 0 0 24 24;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="radio-circle-active.svg"
|
||||
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs36"><rect
|
||||
x="3.3651412"
|
||||
y="2.1265823"
|
||||
width="18.835443"
|
||||
height="19.793574"
|
||||
id="rect250" /></defs><sodipodi:namedview
|
||||
id="namedview34"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="42.791667"
|
||||
inkscape:cx="10.644596"
|
||||
inkscape:cy="10.42259"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" />
|
||||
<style
|
||||
type="text/css"
|
||||
id="style20">
|
||||
.st0{fill:url(#SVGID_1_);stroke:#8F9090;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
.st1{fill:none;stroke:#8DC584;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
|
||||
</style>
|
||||
<linearGradient
|
||||
id="SVGID_1_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="1.1804"
|
||||
y1="12.4846"
|
||||
x2="22.8196"
|
||||
y2="12.4846">
|
||||
<stop
|
||||
offset="1.118836e-07"
|
||||
style="stop-color:#9D9D9C"
|
||||
id="stop22" />
|
||||
<stop
|
||||
offset="0.5652"
|
||||
style="stop-color:#CECECE"
|
||||
id="stop24" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#5C5C5B"
|
||||
id="stop26" />
|
||||
</linearGradient>
|
||||
|
||||
|
||||
<ellipse
|
||||
style="fill:none;stroke:#999999;stroke-width:2.06358;stroke-miterlimit:3.4;stroke-dasharray:none"
|
||||
id="path848"
|
||||
ry="9.2489386"
|
||||
rx="9.2021999"
|
||||
cy="12"
|
||||
cx="12" /></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1,5 +1,5 @@
|
||||
---
|
||||
Checks: '-*,modernize-use-override,modernize-deprecated-headers,modernize-use-using,bugprone-bool-pointer-implicit-conversion,bugprone-parent-virtual-call,bugprone-redundant-branch-condition,bugprone-suspicious-semicolon,bugprone-suspicious-string-compare,modernize-redundant-void-arg,readability-static-accessed-through-instance'
|
||||
Checks: '-*,modernize-use-override,modernize-deprecated-headers,modernize-use-using,bugprone-bool-pointer-implicit-conversion,bugprone-parent-virtual-call,bugprone-redundant-branch-condition,bugprone-suspicious-semicolon,bugprone-suspicious-string-compare,modernize-redundant-void-arg,readability-static-accessed-through-instance,readability-simplify-boolean-expr,readability-container-size-empty'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: 'ApplicationLibCode/*.*$'
|
||||
FormatStyle: 'file'
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
# Python version of RiaVersionInfo.h
|
||||
# Just sets version constants
|
||||
|
||||
RESINSIGHT_MAJOR_VERSION = "@RESINSIGHT_MAJOR_VERSION@"
|
||||
RESINSIGHT_MINOR_VERSION = "@RESINSIGHT_MINOR_VERSION@"
|
||||
RESINSIGHT_PATCH_VERSION = "@RESINSIGHT_PATCH_VERSION@"
|
||||
RESINSIGHT_MAJOR_VERSION : str = "@RESINSIGHT_MAJOR_VERSION@"
|
||||
RESINSIGHT_MINOR_VERSION : str = "@RESINSIGHT_MINOR_VERSION@"
|
||||
RESINSIGHT_PATCH_VERSION : str = "@RESINSIGHT_PATCH_VERSION@"
|
||||
|
||||
PYTHON_GRPC_PROTOC_VERSION : str = "@PYTHON_GRPC_PROTOC_VERSION@"
|
||||
|
||||
@@ -0,0 +1,470 @@
|
||||
// ResInsight version string : 2023.10.0-RC_02
|
||||
// Report generated : fre. okt 20 13:58:15 2023
|
||||
//
|
||||
//
|
||||
|
||||
AnalysisPlot
|
||||
AnalysisPlotCollection
|
||||
AnalysisPlotDataEntry
|
||||
Annotations
|
||||
AsciiDataCurve
|
||||
CalcScript
|
||||
CellEdgeResultSlot
|
||||
CellFilterCollection
|
||||
CellIndexFilter
|
||||
CellPropertyFilter
|
||||
CellPropertyFilters
|
||||
CellRangeFilter
|
||||
CellRangeFilterCollection
|
||||
ChangeDataSourceFeatureUi
|
||||
CmdAddItemExecData
|
||||
CmdDeleteItemExecData
|
||||
CmdSelectionChangeExecData
|
||||
ColorLegend
|
||||
ColorLegendCollection
|
||||
ColorLegendItem
|
||||
CompletionTemplateCollection
|
||||
CorrelationMatrixPlot
|
||||
CorrelationPlot
|
||||
CorrelationPlotCollection
|
||||
CorrelationReportPlot
|
||||
CrossSection
|
||||
CrossSectionCollection
|
||||
CsvSummaryCase
|
||||
CurveIntersection
|
||||
DataContainerFloat
|
||||
DataContainerString
|
||||
DataContainerTime
|
||||
DeclineCurve
|
||||
DepthTrackPlot
|
||||
DoubleParameter
|
||||
Eclipse2dViewCollection
|
||||
EclipseCase
|
||||
EclipseGeometrySelectionItem
|
||||
EclipseResultAddress
|
||||
ElasticProperties
|
||||
ElasticPropertyScaling
|
||||
ElasticPropertyScalingCollection
|
||||
EnsembleFractureStatistics
|
||||
EnsembleFractureStatisticsPlot
|
||||
EnsembleFractureStatisticsPlotCollection
|
||||
EnsembleStatisticsSurface
|
||||
EnsembleSurface
|
||||
EnsembleWellLogStatisticsCurve
|
||||
EnsembleWellLogs
|
||||
EnsembleWellLogsCollection
|
||||
FaciesInitialPressureConfig
|
||||
FaciesProperties
|
||||
Fault
|
||||
FaultReactivationModel
|
||||
FaultReactivationModelCollection
|
||||
Faults
|
||||
FileSummaryCase
|
||||
FileSurface
|
||||
FishbonesCollection
|
||||
FishbonesMultipleSubs
|
||||
FishbonesPipeProperties
|
||||
FlowCharacteristicsPlot
|
||||
FlowDiagSolution
|
||||
FlowPlotCollection
|
||||
FormationNames
|
||||
FormationNamesCollectionObject
|
||||
FractureContainment
|
||||
FractureDefinitionCollection
|
||||
FractureGroupStatisticsCollection
|
||||
FractureTemplateCollection
|
||||
GeoMech2dViewCollection
|
||||
GeoMechGeometrySelectionItem
|
||||
GeoMechPart
|
||||
GeoMechPartCollection
|
||||
GeoMechPropertyFilter
|
||||
GeoMechPropertyFilters
|
||||
GeoMechResultDefinition
|
||||
GeoMechResultSlot
|
||||
GeoMechView
|
||||
GridCaseSurface
|
||||
GridCollection
|
||||
GridCrossPlotCurve
|
||||
GridCrossPlotCurveSet
|
||||
GridCrossPlotRegressionCurve
|
||||
GridInfo
|
||||
GridInfoCollection
|
||||
GridStatisticsPlot
|
||||
GridStatisticsPlotCollection
|
||||
GridSummaryCase
|
||||
GridTimeHistoryCurve
|
||||
IntegerParameter
|
||||
Intersection2dView
|
||||
Intersection2dViewCollection
|
||||
IntersectionBox
|
||||
IntersectionCollection
|
||||
IntersectionResultDefinition
|
||||
Legend
|
||||
ListParameter
|
||||
MainPlotCollection
|
||||
MdiWindowController
|
||||
MockModelSettings
|
||||
ModeledWellPath
|
||||
MultiPlot
|
||||
MultiSnapshotDefinition
|
||||
MultiSummaryPlot
|
||||
NonNetLayers
|
||||
ObservedDataCollection
|
||||
ObservedFmuRftData
|
||||
ObservedPressureDepthData
|
||||
ParameterGroup
|
||||
ParameterList
|
||||
ParameterResultCrossPlot
|
||||
PdmDocument
|
||||
PdmObjectCollection
|
||||
PdmObjectGroup
|
||||
Perforation
|
||||
PerforationCollection
|
||||
PlotDataFilterCollection
|
||||
PlotDataFilterItem
|
||||
PlotTemplateCollection
|
||||
PlotTemplateFileItem
|
||||
PolyLineFilter
|
||||
PolygonFilter
|
||||
PolylineTarget
|
||||
PolylinesFromFileAnnotation
|
||||
PressureTable
|
||||
PressureTableItem
|
||||
PropertyFilter
|
||||
RegressionAnalysisCurve
|
||||
ResInsightAnalysisModels
|
||||
ResInsightGeoMechCase
|
||||
ResInsightGeoMechModels
|
||||
ResInsightOilField
|
||||
ResInsightProject
|
||||
ResampleData
|
||||
ReservoirCellResultStorage
|
||||
ReservoirView
|
||||
ResultDefinition
|
||||
ResultSlot
|
||||
ResultStorageEntryInfo
|
||||
RftAddress
|
||||
RiaMemoryCleanup
|
||||
RiaPreferences
|
||||
RiaPreferencesGeoMech
|
||||
RiaPreferencesSummary
|
||||
RiaPreferencesSystem
|
||||
RiaRegressionTest
|
||||
RicCaseAndFileExportSettingsUi
|
||||
RicCellRangeUi
|
||||
RicCreateDepthAdjustedLasFilesUi
|
||||
RicCreateEnsembleSurfaceUi
|
||||
RicCreateEnsembleWellLogUi
|
||||
RicCreateMultipleWellPathLateralsUi
|
||||
RicDeleteItemExecData
|
||||
RicExportCarfinUi
|
||||
RicExportCompletionDataSettingsUi
|
||||
RicExportContourMapToTextUi
|
||||
RicExportEclipseInputGridUi
|
||||
RicExportLgrUi
|
||||
RicExportToLasFileObj
|
||||
RicExportToLasFileResampleUi
|
||||
RicExportWellPathsUi
|
||||
RicGridCalculator
|
||||
RicHoloLensCreateSessionUi
|
||||
RicHoloLensExportToFolderUi
|
||||
RicHoloLensServerSettings
|
||||
RicLinkVisibleViewsFeatureUi
|
||||
RicPasteAsciiDataToSummaryPlotFeatureUi
|
||||
RicSaturationPressureUi
|
||||
RicSaveEclipseInputVisibleCellsUi
|
||||
RicSaveMultiPlotTemplateFeatureSettings
|
||||
RicSelectCaseOrEnsembleUi
|
||||
RicSelectPlotTemplateUi
|
||||
RicSelectSummaryPlotUI
|
||||
RicSelectViewUI
|
||||
RicSummaryAddressSelection
|
||||
RicSummaryCurveCalculator
|
||||
RicSummaryCurveCreator
|
||||
RicWellPathsUnitSystemSettingsUi
|
||||
RifReaderSettings
|
||||
Rim3dWellLogCurveCollection
|
||||
Rim3dWellLogExtractionCurve
|
||||
Rim3dWellLogFileCurve
|
||||
Rim3dWellLogRftCurve
|
||||
RimAnnotationCollection
|
||||
RimAnnotationCollectionBase
|
||||
RimAnnotationGroupCollection
|
||||
RimAnnotationLineAppearance
|
||||
RimAnnotationTextAppearance
|
||||
RimBinaryExportSettings
|
||||
RimCaseCollection
|
||||
RimCellFilterCollection
|
||||
RimCommandExecuteScript
|
||||
RimCommandIssueFieldChanged
|
||||
RimCommandObject
|
||||
RimCommandRouter
|
||||
RimContourMapView
|
||||
RimCsvUserData
|
||||
RimCustomObjectiveFunction
|
||||
RimCustomObjectiveFunctionCollection
|
||||
RimCustomObjectiveFunctionWeight
|
||||
RimDerivedEnsembleCase
|
||||
RimDerivedEnsembleCaseCollection
|
||||
RimDialogData
|
||||
RimEclipseContourMapProjection
|
||||
RimEclipseResultAddressCollection
|
||||
RimElementVectorResult
|
||||
RimEllipseFractureTemplate
|
||||
RimEnsembleCurveFilter
|
||||
RimEnsembleCurveFilterCollection
|
||||
RimEnsembleCurveSet
|
||||
RimEnsembleCurveSetCollection
|
||||
RimEnsembleStatistics
|
||||
RimEnsembleWellLogCurveSet
|
||||
RimEquilibriumAxisAnnotation
|
||||
RimExportInputSettings
|
||||
RimFaultResultSlot
|
||||
RimFractureExportSettings
|
||||
RimGeoMechContourMapProjection
|
||||
RimGeoMechContourMapView
|
||||
RimGeoMechFaultReactivationResult
|
||||
RimGridCalculation
|
||||
RimGridCalculationCollection
|
||||
RimGridCalculationVariable
|
||||
RimGridCrossPlot
|
||||
RimGridCrossPlotCollection
|
||||
RimGridCrossPlotCurveSetNameConfig
|
||||
RimGridCrossPlotNameConfig
|
||||
RimIdenticalGridCaseGroup
|
||||
RimInputProperty
|
||||
RimInputPropertyCollection
|
||||
RimInputReservoir
|
||||
RimIntersectionResultsDefinitionCollection
|
||||
RimMeasurement
|
||||
RimMswCompletionParameters
|
||||
RimMudWeightWindowParameters
|
||||
RimMultiPlotCollection
|
||||
RimMultipleEclipseResults
|
||||
RimMultipleLocations
|
||||
RimMultipleValveLocations
|
||||
RimNonDarcyPerforationParameters
|
||||
RimObjectiveFunction
|
||||
RimObservedEclipseUserData
|
||||
RimOilFieldEntry
|
||||
RimOilRegionEntry
|
||||
RimPlotAxisAnnotation
|
||||
RimPlotCellFilterCollection
|
||||
RimPlotCellPropertyFilter
|
||||
RimPlotRectAnnotation
|
||||
RimPolylineAppearance
|
||||
RimPolylinesAnnotationInView
|
||||
RimPolylinesFromFileAnnotationInView
|
||||
RimProcess
|
||||
RimReachCircleAnnotation
|
||||
RimReachCircleAnnotationInView
|
||||
RimResultSelectionUi
|
||||
RimRftCase
|
||||
RimRftTopologyCurve
|
||||
RimRoffCase
|
||||
RimSEGYConvertOptions
|
||||
RimSaturationPressurePlot
|
||||
RimSaturationPressurePlotCollection
|
||||
RimSeismicView
|
||||
RimStatisticalCalculation
|
||||
RimStatisticalCollection
|
||||
RimStimPlanColors
|
||||
RimStimPlanFractureTemplate
|
||||
RimStimPlanLegendConfig
|
||||
RimSummaryAddressCollection
|
||||
RimSummaryAddressSelector
|
||||
RimSummaryCalculation
|
||||
RimSummaryCalculationCollection
|
||||
RimSummaryCalculationVariable
|
||||
RimSummaryCurveCollection
|
||||
RimSummaryCurveCollectionModifier
|
||||
RimSummaryMultiPlotCollection
|
||||
RimSummaryPlotManager
|
||||
RimSummaryTable
|
||||
RimSummaryTableCollection
|
||||
RimSurfaceIntersectionBand
|
||||
RimSurfaceIntersectionCollection
|
||||
RimSurfaceIntersectionCurve
|
||||
RimTensorResults
|
||||
RimTernaryLegendConfig
|
||||
RimTextAnnotation
|
||||
RimTextAnnotationInView
|
||||
RimThermalFractureTemplate
|
||||
RimTimeAxisAnnotation
|
||||
RimTimeStepFilter
|
||||
RimUserDefinedIndexFilter
|
||||
RimUserDefinedPolylinesAnnotationInView
|
||||
RimVfpPlotCollection
|
||||
RimViewLinkerCollection
|
||||
RimViewNameConfig
|
||||
RimVirtualPerforationResults
|
||||
RimWellAllocationOverTimePlot
|
||||
RimWellConnectivityTable
|
||||
RimWellIASettings
|
||||
RimWellIASettingsCollection
|
||||
RimWellLogExtractionCurve
|
||||
RimWellLogExtractionCurveNameConfig
|
||||
RimWellLogFileCurveNameConfig
|
||||
RimWellLogLasFileCurveNameConfig
|
||||
RimWellLogPlotNameConfig
|
||||
RimWellLogRftCurveNameConfig
|
||||
RimWellLogWbsCurve
|
||||
RimWellPathEntry
|
||||
RimWellPathImport
|
||||
RimWellPathTieIn
|
||||
RiuCreateMultipleFractionsUi
|
||||
RiuMultipleFractionsOptions
|
||||
ScriptLocation
|
||||
SeismicCollection
|
||||
SeismicData
|
||||
SeismicDataCollection
|
||||
SeismicDifferenceData
|
||||
SeismicSection
|
||||
SeismicSectionCollection
|
||||
SeismicView
|
||||
SeismicViewCollection
|
||||
SimWellFracture
|
||||
SimWellFractureCollection
|
||||
StimPlanFractureTemplate
|
||||
StimPlanModel
|
||||
StimPlanModelCollection
|
||||
StimPlanModelCurve
|
||||
StimPlanModelPlot
|
||||
StimPlanModelPlotCollection
|
||||
StimPlanModelTemplate
|
||||
StimPlanModelTemplateCollection
|
||||
StreamlineInViewCollection
|
||||
StringParameter
|
||||
SummaryAddress
|
||||
SummaryCaseCollection
|
||||
SummaryCaseSubCollection
|
||||
SummaryCrossPlot
|
||||
SummaryCrossPlotCollection
|
||||
SummaryCurve
|
||||
SummaryCurveAutoName
|
||||
SummaryObservedDataFile
|
||||
SummaryPageDownloadEntity
|
||||
SummaryPlot
|
||||
SummaryPlotCollection
|
||||
SummaryTimeAxisProperties
|
||||
SummaryYAxisProperties
|
||||
Surface
|
||||
SurfaceCollection
|
||||
SurfaceInView
|
||||
SurfaceInViewCollection
|
||||
SurfaceResultDefinition
|
||||
TC2
|
||||
TestCommand1
|
||||
ThermalFractureTemplate
|
||||
TofAccumulatedPhaseFractionsPlot
|
||||
TotalWellAllocationPlot
|
||||
TriangleGeometry
|
||||
UserDefinedFilter
|
||||
UserDefinedPolylinesAnnotation
|
||||
ValveTemplate
|
||||
ValveTemplateCollection
|
||||
VfpPlot
|
||||
View3dOverlayInfoConfig
|
||||
ViewController
|
||||
ViewLinker
|
||||
WbsParameters
|
||||
Well
|
||||
WellAllocationPlot
|
||||
WellAllocationPlotLegend
|
||||
WellBoreStabilityPlot
|
||||
WellDistributionPlot
|
||||
WellDistributionPlotCollection
|
||||
WellFlowRateCurve
|
||||
WellLogCalculatedCurve
|
||||
WellLogExtractionCurve
|
||||
WellLogFile
|
||||
WellLogFileChannel
|
||||
WellLogFileCurve
|
||||
WellLogLasFile
|
||||
WellLogLasFileCurve
|
||||
WellLogPlot
|
||||
WellLogPlotCollection
|
||||
WellLogPlotTrack
|
||||
WellLogRftCurve
|
||||
WellMeasurement
|
||||
WellMeasurementCurve
|
||||
WellMeasurementFilePath
|
||||
WellMeasurementInView
|
||||
WellMeasurements
|
||||
WellMeasurementsInView
|
||||
WellPath
|
||||
WellPathAicdParameters
|
||||
WellPathAttribute
|
||||
WellPathAttributes
|
||||
WellPathBase
|
||||
WellPathCompletionSettings
|
||||
WellPathCompletions
|
||||
WellPathFracture
|
||||
WellPathFractureCollection
|
||||
WellPathGeometry
|
||||
WellPathGeometryDef
|
||||
WellPathGroup
|
||||
WellPathTarget
|
||||
WellPathValve
|
||||
WellPaths
|
||||
WellPltPlot
|
||||
WellPltPlotCollection
|
||||
WellRftEnsembleCurveSet
|
||||
WellRftPlot
|
||||
WellRftPlotCollection
|
||||
Wells
|
||||
cafNamedTreeNode
|
||||
cafObjectReferenceTreeNode
|
||||
cafTreeNode
|
||||
cloneView
|
||||
closeProject
|
||||
computeCaseGroupStatistics
|
||||
createGridCaseGroup
|
||||
createGridCaseGroupResult
|
||||
createLgrForCompletions
|
||||
createMultiPlot
|
||||
createMultipleFractures
|
||||
createSaturationPressurePlots
|
||||
createStatisticsCase
|
||||
createStatisticsCaseResult
|
||||
createView
|
||||
createViewResult
|
||||
createWbsPlotResult
|
||||
createWellBoreStabilityPlot
|
||||
exportContourMapToText
|
||||
exportFlowCharacteristics
|
||||
exportLgrForCompletions
|
||||
exportMsw
|
||||
exportMultiCaseSnapshots
|
||||
exportProperty
|
||||
exportPropertyInViews
|
||||
exportSimWellFractureCompletions
|
||||
exportSnapshots
|
||||
exportVisibleCells
|
||||
exportWellLogPlotData
|
||||
exportWellLogPlotDataResult
|
||||
exportWellPathCompletions
|
||||
exportWellPaths
|
||||
importFormationNames
|
||||
importWellLogFiles
|
||||
importWellLogFilesResult
|
||||
importWellPaths
|
||||
importWellPathsResult
|
||||
loadCase
|
||||
loadCaseResult
|
||||
openProject
|
||||
replaceCase
|
||||
replaceMultipleCases
|
||||
replaceSourceCases
|
||||
runOctaveScript
|
||||
saveProject
|
||||
saveProjectAs
|
||||
scaleFractureTemplate
|
||||
setExportFolder
|
||||
setFractureContainment
|
||||
setMainWindowSize
|
||||
setPlotWindowSize
|
||||
setStartDir
|
||||
setTimeStep
|
||||
stackCurves
|
||||
unstackCurves
|
||||
@@ -34,6 +34,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -72,6 +73,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSeismicDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaLasDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaWellFlowDefines.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaSummaryCurveAddress.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||
|
||||
@@ -68,6 +68,10 @@
|
||||
#include "RimPlotWindow.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSeismicData.h"
|
||||
#include "RimSeismicDataCollection.h"
|
||||
#include "RimSeismicView.h"
|
||||
#include "RimSeismicViewCollection.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStimPlanModel.h"
|
||||
@@ -81,7 +85,7 @@
|
||||
#include "RimTextAnnotationInView.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogLasFile.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
@@ -207,8 +211,14 @@ const char* RiaApplication::getVersionStringApp( bool includeCrtInfo )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::enableDevelopmentFeatures()
|
||||
{
|
||||
QString environmentVar = QProcessEnvironment::systemEnvironment().value( "RESINSIGHT_DEVEL", QString( "0" ) );
|
||||
return environmentVar.toInt() == 1;
|
||||
static int envValue = -999;
|
||||
if ( envValue == -999 )
|
||||
{
|
||||
QString environmentVar = QProcessEnvironment::systemEnvironment().value( "RESINSIGHT_DEVEL", QString( "0" ) );
|
||||
envValue = environmentVar.toInt();
|
||||
}
|
||||
|
||||
return envValue == 1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -345,7 +355,7 @@ bool RiaApplication::openFile( const QString& fileName )
|
||||
{
|
||||
loadingSucceded = loadProject( fileName );
|
||||
}
|
||||
else if ( fileType == RiaDefines::ImportFileType::GEOMECH_ODB_FILE )
|
||||
else if ( int( fileType ) & int( RiaDefines::ImportFileType::ANY_GEOMECH_FILE ) )
|
||||
{
|
||||
loadingSucceded = openOdbCaseFromFile( fileName );
|
||||
lastUsedDialogTag = "GEOMECH_MODEL";
|
||||
@@ -421,7 +431,7 @@ QString RiaApplication::createAbsolutePathFromProjectRelativePath( QString proje
|
||||
}
|
||||
else
|
||||
{
|
||||
absolutePath = this->lastUsedDialogDirectory( "BINARY_GRID" );
|
||||
absolutePath = lastUsedDialogDirectory( "BINARY_GRID" );
|
||||
}
|
||||
|
||||
QDir projectDir( absolutePath );
|
||||
@@ -518,7 +528,6 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
}
|
||||
}
|
||||
|
||||
// Add well paths for each oil field
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++ )
|
||||
{
|
||||
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
|
||||
@@ -528,8 +537,16 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
oilField->wellPathCollection = std::make_unique<RimWellPathCollection>();
|
||||
}
|
||||
|
||||
// Initialize well paths
|
||||
oilField->wellPathCollection->loadDataAndUpdate();
|
||||
oilField->ensembleWellLogsCollection->loadDataAndUpdate();
|
||||
|
||||
// Initialize seismic data
|
||||
auto& seisDataColl = oilField->seismicDataCollection();
|
||||
for ( auto seismicData : seisDataColl->seismicData() )
|
||||
{
|
||||
seismicData->ensureFileReaderIsInitialized();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -598,8 +615,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
|
||||
// Now load the ReservoirViews for the cases
|
||||
// Add all "native" cases in the project
|
||||
std::vector<RimCase*> casesToLoad;
|
||||
m_project->allCases( casesToLoad );
|
||||
std::vector<RimCase*> casesToLoad = m_project->allGridCases();
|
||||
{
|
||||
caf::ProgressInfo caseProgress( casesToLoad.size(), "Reading Cases" );
|
||||
|
||||
@@ -645,7 +661,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
}
|
||||
}
|
||||
|
||||
this->setActiveReservoirView( riv );
|
||||
setActiveReservoirView( riv );
|
||||
|
||||
RimGridView* rigv = dynamic_cast<RimGridView*>( riv );
|
||||
if ( rigv ) rigv->cellFilterCollection()->updateIconState();
|
||||
@@ -669,6 +685,14 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
cas->intersectionViewCollection()->syncFromExistingIntersections( false );
|
||||
}
|
||||
|
||||
for ( RimOilField* oilField : m_project->oilFields )
|
||||
{
|
||||
for ( auto seisView : oilField->seismicViewCollection()->views() )
|
||||
{
|
||||
seisView->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
// Init summary case groups
|
||||
for ( RimOilField* oilField : m_project->oilFields )
|
||||
{
|
||||
@@ -784,12 +808,7 @@ bool RiaApplication::saveProjectAs( const QString& fileName, gsl::not_null<QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaApplication::hasValidProjectFileExtension( const QString& fileName )
|
||||
{
|
||||
if ( fileName.contains( ".rsp", Qt::CaseInsensitive ) || fileName.contains( ".rip", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return fileName.contains( ".rsp", Qt::CaseInsensitive ) || fileName.contains( ".rip", Qt::CaseInsensitive );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -924,7 +943,7 @@ bool RiaApplication::openOdbCaseFromFile( const QString& fileName, bool applyTim
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> wellPathFilePaths, gsl::not_null<QStringList*> errorMessages )
|
||||
{
|
||||
if ( m_project == nullptr || m_project->oilFields.size() < 1 ) return {};
|
||||
if ( m_project == nullptr || m_project->oilFields.empty() ) return {};
|
||||
|
||||
RimOilField* oilField = m_project->activeOilField();
|
||||
if ( oilField == nullptr ) return {};
|
||||
@@ -953,7 +972,7 @@ std::vector<RimWellPath*> RiaApplication::addWellPathsToModel( QList<QString> we
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::addWellPathFormationsToModel( QList<QString> wellPathFormationsFilePaths )
|
||||
{
|
||||
if ( m_project == nullptr || m_project->oilFields.size() < 1 ) return;
|
||||
if ( m_project == nullptr || m_project->oilFields.empty() ) return;
|
||||
|
||||
RimOilField* oilField = m_project->activeOilField();
|
||||
if ( oilField == nullptr ) return;
|
||||
@@ -976,10 +995,10 @@ void RiaApplication::addWellPathFormationsToModel( QList<QString> wellPathFormat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Add a list of well log file paths (LAS files) to the well path collection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimWellLogFile*> RiaApplication::addWellLogsToModel( const QList<QString>& wellLogFilePaths,
|
||||
gsl::not_null<QStringList*> errorMessages )
|
||||
std::vector<RimWellLogLasFile*> RiaApplication::addWellLogsToModel( const QList<QString>& wellLogFilePaths,
|
||||
gsl::not_null<QStringList*> errorMessages )
|
||||
{
|
||||
if ( m_project == nullptr || m_project->oilFields.size() < 1 ) return {};
|
||||
if ( m_project == nullptr || m_project->oilFields.empty() ) return {};
|
||||
|
||||
RimOilField* oilField = m_project->activeOilField();
|
||||
if ( oilField == nullptr ) return {};
|
||||
@@ -991,7 +1010,7 @@ std::vector<RimWellLogFile*> RiaApplication::addWellLogsToModel( const QList<QSt
|
||||
m_project->updateConnectedEditors();
|
||||
}
|
||||
|
||||
std::vector<RimWellLogFile*> wellLogFiles = oilField->wellPathCollection->addWellLogs( wellLogFilePaths, errorMessages );
|
||||
std::vector<RimWellLogLasFile*> wellLogFiles = oilField->wellPathCollection->addWellLogs( wellLogFilePaths, errorMessages );
|
||||
|
||||
oilField->wellPathCollection->updateConnectedEditors();
|
||||
|
||||
@@ -1221,10 +1240,10 @@ void RiaApplication::applyPreferences()
|
||||
m_defaultAnnotationFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::ANNOTATION_FONT] );
|
||||
m_defaultWellLabelFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::WELL_LABEL_FONT] );
|
||||
|
||||
if ( this->project() )
|
||||
if ( project() )
|
||||
{
|
||||
this->project()->setScriptDirectories( m_preferences->scriptDirectories(), m_preferences->maxScriptFoldersDepth() );
|
||||
this->project()->setPlotTemplateFolders( m_preferences->plotTemplateFolders() );
|
||||
project()->setScriptDirectories( m_preferences->scriptDirectories(), m_preferences->maxScriptFoldersDepth() );
|
||||
project()->setPlotTemplateFolders( m_preferences->plotTemplateFolders() );
|
||||
|
||||
project()->scriptCollection()->updateConnectedEditors();
|
||||
project()->rootPlotTemplateItem()->updateConnectedEditors();
|
||||
|
||||
@@ -61,7 +61,7 @@ class RimProject;
|
||||
class RimSummaryPlot;
|
||||
class Rim3dView;
|
||||
class RimViewWindow;
|
||||
class RimWellLogFile;
|
||||
class RimWellLogLasFile;
|
||||
class RimWellLogPlot;
|
||||
class RimWellAllocationPlot;
|
||||
|
||||
@@ -147,9 +147,9 @@ public:
|
||||
|
||||
bool openOdbCaseFromFile( const QString& fileName, bool applyTimeStepFilter = false );
|
||||
|
||||
std::vector<RimWellPath*> addWellPathsToModel( QList<QString> wellPathFilePaths, gsl::not_null<QStringList*> errorMessages );
|
||||
void addWellPathFormationsToModel( QList<QString> wellPathFilePaths );
|
||||
std::vector<RimWellLogFile*> addWellLogsToModel( const QList<QString>& wellLogFilePaths, gsl::not_null<QStringList*> errorMessages );
|
||||
std::vector<RimWellPath*> addWellPathsToModel( QList<QString> wellPathFilePaths, gsl::not_null<QStringList*> errorMessages );
|
||||
void addWellPathFormationsToModel( QList<QString> wellPathFilePaths );
|
||||
std::vector<RimWellLogLasFile*> addWellLogsToModel( const QList<QString>& wellLogFilePaths, gsl::not_null<QStringList*> errorMessages );
|
||||
|
||||
QString scriptDirectories() const;
|
||||
QString scriptEditorPath() const;
|
||||
|
||||
@@ -123,8 +123,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
|
||||
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
||||
{
|
||||
this->showFormattedTextInMessageBoxOrConsole( "\nThe current command line options in ResInsight are:\n" +
|
||||
this->commandLineParameterHelp() );
|
||||
showFormattedTextInMessageBoxOrConsole( "\nThe current command line options in ResInsight are:\n" + commandLineParameterHelp() );
|
||||
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||
}
|
||||
|
||||
@@ -132,7 +131,7 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
{
|
||||
QString text = QString( STRPRODUCTVER ) + "\n";
|
||||
|
||||
this->showFormattedTextInMessageBoxOrConsole( text );
|
||||
showFormattedTextInMessageBoxOrConsole( text );
|
||||
|
||||
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,15 @@ void caf::AppEnum<RiaDefines::DepthUnitType>::setUp()
|
||||
setDefault( RiaDefines::DepthUnitType::UNIT_METER );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::GridModelReader>::setUp()
|
||||
{
|
||||
addItem( RiaDefines::GridModelReader::LIBECL, "LIBECL", "libecl" );
|
||||
addItem( RiaDefines::GridModelReader::OPM_COMMON, "OPM_COMMON", "opm-common (beta)" );
|
||||
|
||||
setDefault( RiaDefines::GridModelReader::LIBECL );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::EclipseUnitSystem>::setUp()
|
||||
{
|
||||
@@ -288,6 +297,10 @@ RiaDefines::ImportFileType RiaDefines::obtainFileTypeFromFileName( const QString
|
||||
{
|
||||
return ImportFileType::GEOMECH_ODB_FILE;
|
||||
}
|
||||
else if ( fileName.endsWith( "INP", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return ImportFileType::GEOMECH_INP_FILE;
|
||||
}
|
||||
else if ( fileName.endsWith( ".rsp", Qt::CaseInsensitive ) || fileName.endsWith( ".rip", Qt::CaseInsensitive ) )
|
||||
{
|
||||
return ImportFileType::RESINSIGHT_PROJECT_FILE;
|
||||
@@ -335,12 +348,9 @@ QString RiaDefines::defaultDirectoryLabel( RiaDefines::ImportFileType fileType )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDefines::isInjector( WellProductionType wellProductionType )
|
||||
{
|
||||
if ( wellProductionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellProductionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellProductionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return wellProductionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellProductionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellProductionType == RiaDefines::WellProductionType::WATER_INJECTOR;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -133,8 +133,10 @@ enum class ImportFileType
|
||||
GEOMECH_ODB_FILE = 0x10,
|
||||
RESINSIGHT_PROJECT_FILE = 0x20,
|
||||
ROFF_FILE = 0x30,
|
||||
GEOMECH_INP_FILE = 0x40,
|
||||
ECLIPSE_RESULT_GRID = ECLIPSE_GRID_FILE | ECLIPSE_EGRID_FILE,
|
||||
ANY_ECLIPSE_FILE = ECLIPSE_RESULT_GRID | ECLIPSE_INPUT_FILE | ECLIPSE_SUMMARY_FILE | ROFF_FILE,
|
||||
ANY_GEOMECH_FILE = GEOMECH_ODB_FILE | GEOMECH_INP_FILE,
|
||||
ANY_IMPORT_FILE = 0xFF
|
||||
};
|
||||
|
||||
@@ -167,6 +169,12 @@ enum class GridCaseAxis
|
||||
UNDEFINED_AXIS
|
||||
};
|
||||
|
||||
enum class GridModelReader
|
||||
{
|
||||
LIBECL,
|
||||
OPM_COMMON
|
||||
};
|
||||
|
||||
enum class ThemeEnum
|
||||
{
|
||||
DEFAULT,
|
||||
@@ -230,7 +238,8 @@ enum class View3dContent
|
||||
GEOMECH_DATA = 0b00000010,
|
||||
FLAT_INTERSECTION = 0b00000100,
|
||||
CONTOUR = 0b00001000,
|
||||
ALL = 0b00001111
|
||||
SEISMIC = 0b00010000,
|
||||
ALL = 0b00011111
|
||||
};
|
||||
|
||||
}; // namespace RiaDefines
|
||||
|
||||
@@ -28,6 +28,7 @@ void caf::AppEnum<RiaEclipseFileNameTools::EclipseFileType>::setUp()
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_DATA, "DATA", "Data Deck" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_GRID, "GRID", "Grid" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_EGRID, "EGRID", "Grid" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_INIT, "INIT", "Init file" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_UNRST, "UNRST", "Unified Restart" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_SMSPEC, "SMSPEC", "Summary Specification" );
|
||||
addItem( RiaEclipseFileNameTools::EclipseFileType::ECLIPSE_UNSMRY, "UNSMR", "Summary Vectors" );
|
||||
@@ -113,10 +114,5 @@ bool RiaEclipseFileNameTools::hasMatchingSuffix( const QString& fileName, Eclips
|
||||
|
||||
QString suffix = fi.completeSuffix();
|
||||
|
||||
if ( suffix.compare( caf::AppEnum<EclipseFileType>::text( fileType ), Qt::CaseInsensitive ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return suffix.compare( caf::AppEnum<EclipseFileType>::text( fileType ), Qt::CaseInsensitive ) == 0;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
ECLIPSE_DATA,
|
||||
ECLIPSE_GRID,
|
||||
ECLIPSE_EGRID,
|
||||
ECLIPSE_INIT,
|
||||
ECLIPSE_UNRST,
|
||||
ECLIPSE_SMSPEC,
|
||||
ECLIPSE_UNSMRY,
|
||||
|
||||
@@ -77,14 +77,13 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimTextAnnotation.h"
|
||||
#include "RimTextAnnotationInView.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogLasFile.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
@@ -380,7 +379,7 @@ RimViewWindow* RiaGuiApplication::activePlotWindow() const
|
||||
if ( m_mainPlotWindow )
|
||||
{
|
||||
QList<QMdiSubWindow*> subwindows = m_mainPlotWindow->subWindowList( QMdiArea::StackingOrder );
|
||||
if ( subwindows.size() > 0 )
|
||||
if ( !subwindows.empty() )
|
||||
{
|
||||
viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( subwindows.back()->widget() );
|
||||
}
|
||||
@@ -454,8 +453,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
|
||||
if ( progOpt->option( "help" ) || progOpt->option( "?" ) )
|
||||
{
|
||||
this->showFormattedTextInMessageBoxOrConsole( "The current command line options in ResInsight are:\n" +
|
||||
this->commandLineParameterHelp() );
|
||||
showFormattedTextInMessageBoxOrConsole( "The current command line options in ResInsight are:\n" + commandLineParameterHelp() );
|
||||
return RiaApplication::ApplicationStatus::EXIT_COMPLETED;
|
||||
}
|
||||
|
||||
@@ -513,7 +511,7 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
|
||||
{
|
||||
CVF_ASSERT( o.valueCount() == 1 );
|
||||
QString regressionTestPath = cvfqt::Utils::toQString( o.value( 0 ) );
|
||||
RiaRegressionTestRunner::instance()->updateRegressionTest( regressionTestPath );
|
||||
RiaRegressionTestRunner::updateRegressionTest( regressionTestPath );
|
||||
return ApplicationStatus::EXIT_COMPLETED;
|
||||
}
|
||||
|
||||
@@ -954,10 +952,8 @@ void RiaGuiApplication::createMainWindow()
|
||||
{
|
||||
CVF_ASSERT( m_mainWindow == nullptr );
|
||||
|
||||
if ( RiaPreferences::current()->useUndoRedo() )
|
||||
{
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
}
|
||||
// Always enable undo/redo framework, as multi-select operations perform significantly better with it enabled
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
|
||||
m_mainWindow = new RiuMainWindow;
|
||||
QString platform = cvf::System::is64Bit() ? "(64bit)" : "(32bit)";
|
||||
@@ -982,10 +978,8 @@ void RiaGuiApplication::createMainPlotWindow()
|
||||
{
|
||||
CVF_ASSERT( m_mainPlotWindow == nullptr );
|
||||
|
||||
if ( RiaPreferences::current()->useUndoRedo() )
|
||||
{
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
}
|
||||
// Always enable undo/redo framework, as multi-select operations perform significantly better with it enabled
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
|
||||
m_mainPlotWindow = std::make_unique<RiuPlotMainWindow>();
|
||||
m_mainPlotWindow->setWindowTitle( "Plots - ResInsight" );
|
||||
@@ -1060,7 +1054,7 @@ RimViewWindow* RiaGuiApplication::activeViewWindow()
|
||||
RiuPlotMainWindow* mainPlotWindow = dynamic_cast<RiuPlotMainWindow*>( mainWindowWidget );
|
||||
|
||||
QList<QMdiSubWindow*> subwindows = mainPlotWindow->subWindowList( QMdiArea::StackingOrder );
|
||||
if ( subwindows.size() > 0 )
|
||||
if ( !subwindows.empty() )
|
||||
{
|
||||
viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( subwindows.back()->widget() );
|
||||
}
|
||||
@@ -1374,7 +1368,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
fontObject->updateFonts();
|
||||
}
|
||||
|
||||
if ( this->project() )
|
||||
if ( project() )
|
||||
{
|
||||
std::vector<RimViewWindow*> allViewWindows = project()->descendantsIncludingThisOfType<RimViewWindow>();
|
||||
|
||||
@@ -1545,7 +1539,7 @@ void RiaGuiApplication::applyGuiPreferences( const RiaPreferences*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaGuiApplication::applicationResolution()
|
||||
{
|
||||
return RiaGuiApplication::instance()->desktop()->logicalDpiX();
|
||||
return QApplication::desktop()->logicalDpiX();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -192,6 +192,8 @@ RiaPreferences::RiaPreferences()
|
||||
|
||||
CAF_PDM_InitField( &csvTextExportFieldSeparator, "csvTextExportFieldSeparator", QString( "," ), "CSV Text Export Field Separator" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_gridModelReader, "gridModelReader", "Grid Model Reader" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_readerSettings, "readerSettings", "Reader Settings" );
|
||||
m_readerSettings = new RifReaderSettings;
|
||||
CAF_PDM_InitFieldNoDefault( &m_dateFormat, "dateFormat", "Date Format" );
|
||||
@@ -307,7 +309,7 @@ void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field, QS
|
||||
caf::PdmUiLineEditorAttribute* myAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->validator = new RiaValidRegExpValidator( RiaPreferences::current()->defaultMultiLateralWellNamePattern() );
|
||||
myAttr->validator = new RiaValidRegExpValidator( RiaPreferences::defaultMultiLateralWellNamePattern() );
|
||||
}
|
||||
}
|
||||
else if ( field == &m_defaultScaleFactorZ )
|
||||
@@ -357,6 +359,8 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
}
|
||||
else if ( uiConfigName == RiaPreferences::tabNameGrid() )
|
||||
{
|
||||
uiOrdering.add( &m_gridModelReader );
|
||||
|
||||
caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup( "Behavior When Loading Data" );
|
||||
newCaseBehaviourGroup->add( &autocomputeDepthRelatedProperties );
|
||||
newCaseBehaviourGroup->add( &loadAndShowSoil );
|
||||
@@ -629,6 +633,14 @@ const RifReaderSettings* RiaPreferences::readerSettings() const
|
||||
return m_readerSettings;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::GridModelReader RiaPreferences::gridModelReader() const
|
||||
{
|
||||
return m_gridModelReader();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -55,6 +55,7 @@ public:
|
||||
using FontSizeEnum = RiaFontCache::FontSizeEnum;
|
||||
using PageSizeEnum = caf::AppEnum<QPageSize::PageSizeId>;
|
||||
using PageOrientationEnum = caf::AppEnum<QPageLayout::Orientation>;
|
||||
using GridModelEnum = caf::AppEnum<RiaDefines::GridModelReader>;
|
||||
|
||||
bool enableFaultsByDefault() const;
|
||||
|
||||
@@ -66,7 +67,8 @@ public:
|
||||
|
||||
QStringList tabNames();
|
||||
|
||||
const RifReaderSettings* readerSettings() const;
|
||||
const RifReaderSettings* readerSettings() const;
|
||||
RiaDefines::GridModelReader gridModelReader() const;
|
||||
|
||||
bool useUndoRedo() const;
|
||||
|
||||
@@ -165,6 +167,7 @@ private:
|
||||
static double defaultMarginSize( QPageSize::PageSizeId pageSizeId );
|
||||
|
||||
private:
|
||||
caf::PdmField<GridModelEnum> m_gridModelReader;
|
||||
caf::PdmChildField<RifReaderSettings*> m_readerSettings;
|
||||
|
||||
caf::PdmField<QString> m_dateFormat;
|
||||
|
||||
@@ -42,6 +42,14 @@ RiaPreferencesGeoMech::RiaPreferencesGeoMech()
|
||||
m_geomechWIACommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechWIACommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRMDefaultXML, "geomechFRMDefaultXML", "Default Parameter XML File" );
|
||||
m_geomechFRMDefaultXML.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRMDefaultXML.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_geomechFRMCommand, "geomechFRMCommand", "Command to run" );
|
||||
m_geomechFRMCommand.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
||||
m_geomechFRMCommand.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
|
||||
CAF_PDM_InitField( &m_keepTemporaryFiles, "keepTemporaryFile", false, "Keep temporary parameter files (for debugging)" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_keepTemporaryFiles );
|
||||
|
||||
@@ -65,17 +73,14 @@ void RiaPreferencesGeoMech::appendItems( caf::PdmUiOrdering& uiOrdering ) const
|
||||
caf::PdmUiGroup* wellIAGroup = uiOrdering.addNewGroup( "Well Integrity Analysis" );
|
||||
wellIAGroup->add( &m_geomechWIACommand );
|
||||
wellIAGroup->add( &m_geomechWIADefaultXML );
|
||||
wellIAGroup->add( &m_waitForInputFileEdit );
|
||||
|
||||
caf::PdmUiGroup* faultRMGroup = uiOrdering.addNewGroup( "Fault Reactivation Modeling" );
|
||||
faultRMGroup->add( &m_geomechFRMCommand );
|
||||
faultRMGroup->add( &m_geomechFRMDefaultXML );
|
||||
|
||||
caf::PdmUiGroup* commonGroup = uiOrdering.addNewGroup( "Common Settings" );
|
||||
commonGroup->add( &m_keepTemporaryFiles );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaPreferencesGeoMech::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
commonGroup->add( &m_waitForInputFileEdit );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -94,6 +99,22 @@ QString RiaPreferencesGeoMech::geomechWIADefaultXML() const
|
||||
return m_geomechWIADefaultXML;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRMCommand() const
|
||||
{
|
||||
return m_geomechFRMCommand;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesGeoMech::geomechFRMDefaultXML() const
|
||||
{
|
||||
return m_geomechFRMDefaultXML;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -105,7 +126,7 @@ bool RiaPreferencesGeoMech::keepTemporaryFiles() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferencesGeoMech::waitBeforeRunWIA() const
|
||||
bool RiaPreferencesGeoMech::waitBeforeRun() const
|
||||
{
|
||||
return m_waitForInputFileEdit;
|
||||
}
|
||||
@@ -122,6 +143,17 @@ bool RiaPreferencesGeoMech::validateWIASettings() const
|
||||
return filesExists( files );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferencesGeoMech::validateFRMSettings() const
|
||||
{
|
||||
QStringList files;
|
||||
files << geomechFRMCommand();
|
||||
|
||||
return filesExists( files );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -37,23 +37,27 @@ public:
|
||||
void appendItems( caf::PdmUiOrdering& uiOrdering ) const;
|
||||
|
||||
bool validateWIASettings() const;
|
||||
bool validateFRMSettings() const;
|
||||
|
||||
// geomech settings
|
||||
QString geomechWIADefaultXML() const;
|
||||
QString geomechWIACommand() const;
|
||||
bool waitBeforeRunWIA() const;
|
||||
|
||||
QString geomechFRMDefaultXML() const;
|
||||
QString geomechFRMCommand() const;
|
||||
|
||||
bool waitBeforeRun() const;
|
||||
bool keepTemporaryFiles() const;
|
||||
|
||||
protected:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
private:
|
||||
bool filesExists( QStringList& filelist ) const;
|
||||
|
||||
caf::PdmField<QString> m_geomechWIADefaultXML;
|
||||
caf::PdmField<QString> m_geomechWIACommand;
|
||||
caf::PdmField<bool> m_waitForInputFileEdit;
|
||||
|
||||
caf::PdmField<QString> m_geomechFRMDefaultXML;
|
||||
caf::PdmField<QString> m_geomechFRMCommand;
|
||||
|
||||
caf::PdmField<bool> m_waitForInputFileEdit;
|
||||
caf::PdmField<bool> m_keepTemporaryFiles;
|
||||
};
|
||||
|
||||
@@ -111,6 +111,15 @@ RiaPreferencesSummary::RiaPreferencesSummary()
|
||||
"" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_defaultSummaryPlot, "defaultSummaryPlot", "Create Plot On Summary Data Import" );
|
||||
|
||||
CAF_PDM_InitField( &m_crossPlotAddressCombinations,
|
||||
"CrossPlotAddressCombinations",
|
||||
QString( "FWCT FOPT;FWPR FOPT;FWIR FOPT;FGOR FOPT;FGLIR FOPR" ),
|
||||
"Cross Plot Addresses [Y-adr X-adr]",
|
||||
"",
|
||||
"Semicolon separated list used to create cross plot curves. Based on selection, the names will be changed to "
|
||||
"corresponing well or group vector names",
|
||||
"" );
|
||||
|
||||
CAF_PDM_InitField( &m_selectDefaultTemplates, "selectDefaultTemplate", false, "", "", "Select Default Templates" );
|
||||
m_selectDefaultTemplates.xmlCapability()->disableIO();
|
||||
m_selectDefaultTemplates.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
||||
@@ -282,6 +291,8 @@ void RiaPreferencesSummary::appendItemsToPlottingGroup( caf::PdmUiOrdering& uiOr
|
||||
break;
|
||||
}
|
||||
|
||||
uiOrdering.add( &m_crossPlotAddressCombinations );
|
||||
|
||||
auto historyCurveGroup = uiOrdering.addNewGroup( "History Vectors" );
|
||||
|
||||
historyCurveGroup->add( &m_defaultSummaryHistoryCurveStyle );
|
||||
@@ -369,6 +380,14 @@ bool RiaPreferencesSummary::appendHistoryVectors() const
|
||||
return m_appendHistoryVectors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferencesSummary::crossPlotAddressCombinations() const
|
||||
{
|
||||
return m_crossPlotAddressCombinations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -387,7 +406,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
|
||||
if ( m_summaryReader == SummaryReaderMode::OPM_COMMON )
|
||||
{
|
||||
if ( RiaApplication::instance()->enableDevelopmentFeatures() )
|
||||
if ( RiaApplication::enableDevelopmentFeatures() )
|
||||
{
|
||||
uiOrdering.add( &m_useEnhancedSummaryDataFile );
|
||||
}
|
||||
@@ -397,7 +416,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
{
|
||||
uiOrdering.add( &m_createH5SummaryDataFile );
|
||||
|
||||
if ( RiaApplication::instance()->enableDevelopmentFeatures() )
|
||||
if ( RiaApplication::enableDevelopmentFeatures() )
|
||||
{
|
||||
uiOrdering.add( &m_createH5SummaryFileThreadCount );
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ public:
|
||||
bool colorCurvesByPhase() const;
|
||||
bool appendHistoryVectors() const;
|
||||
|
||||
QString crossPlotAddressCombinations() const;
|
||||
|
||||
SummaryHistoryCurveStyleMode defaultSummaryHistoryCurveStyle() const;
|
||||
|
||||
RiaDefines::ColumnCount defaultMultiPlotColumnCount() const;
|
||||
@@ -132,6 +134,7 @@ private:
|
||||
caf::PdmField<SummaryRestartFilesImportModeType> m_summaryEnsembleImportMode;
|
||||
|
||||
caf::PdmField<QString> m_defaultSummaryCurvesTextFilter;
|
||||
caf::PdmField<QString> m_crossPlotAddressCombinations;
|
||||
caf::PdmField<SummaryHistoryCurveStyleModeType> m_defaultSummaryHistoryCurveStyle;
|
||||
caf::PdmField<bool> m_curveColorByPhase;
|
||||
caf::PdmField<bool> m_appendHistoryVectors;
|
||||
|
||||
53
ApplicationLibCode/Application/RiaSummaryCurveAddress.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaSummaryCurveAddress.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveAddress::RiaSummaryCurveAddress( const RifEclipseSummaryAddress& summaryAddressX, const RifEclipseSummaryAddress& summaryAddressY )
|
||||
: m_summaryAddressX( summaryAddressX )
|
||||
, m_summaryAddressY( summaryAddressY )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveAddress::RiaSummaryCurveAddress( const RifEclipseSummaryAddress& summaryAddressY )
|
||||
: m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_summaryAddressY( summaryAddressY )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RiaSummaryCurveAddress::summaryAddressX() const
|
||||
{
|
||||
return m_summaryAddressX;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RiaSummaryCurveAddress::summaryAddressY() const
|
||||
{
|
||||
return m_summaryAddressY;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2016- Statoil ASA
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -18,29 +18,23 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
class RimSummaryPlot;
|
||||
class RicSummaryPlotEditorDialog;
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicEditSummaryCrossPlotFeature : public caf::CmdFeature
|
||||
class RiaSummaryCurveAddress
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
RicEditSummaryCrossPlotFeature();
|
||||
|
||||
public:
|
||||
void closeDialogAndResetTargetPlot();
|
||||
explicit RiaSummaryCurveAddress( const RifEclipseSummaryAddress& summaryAddressY );
|
||||
explicit RiaSummaryCurveAddress( const RifEclipseSummaryAddress& summaryAddressX, const RifEclipseSummaryAddress& summaryAddressY );
|
||||
|
||||
static RicSummaryPlotEditorDialog* curveCreatorDialog();
|
||||
RifEclipseSummaryAddress summaryAddressX() const;
|
||||
RifEclipseSummaryAddress summaryAddressY() const;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
auto operator<=>( const RiaSummaryCurveAddress& rhs ) const = default;
|
||||
|
||||
private:
|
||||
RimSummaryPlot* selectedSummaryPlot() const;
|
||||
RifEclipseSummaryAddress m_summaryAddressX;
|
||||
RifEclipseSummaryAddress m_summaryAddressY;
|
||||
};
|
||||
@@ -17,8 +17,11 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
#include "RiaSummaryCurveAddress.h"
|
||||
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
@@ -28,7 +31,9 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
||||
: m_summaryCase( nullptr )
|
||||
: m_summaryCaseY( nullptr )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_ensemble( nullptr )
|
||||
, m_isEnsembleCurve( false )
|
||||
{
|
||||
@@ -37,11 +42,13 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase* summaryCase,
|
||||
const RifEclipseSummaryAddress& summaryAddress,
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase* summaryCaseY,
|
||||
const RifEclipseSummaryAddress& summaryAddressY,
|
||||
bool isEnsembleCurve )
|
||||
: m_summaryCase( summaryCase )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
: m_summaryCaseY( summaryCaseY )
|
||||
, m_summaryAddressY( summaryAddressY )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_ensemble( nullptr )
|
||||
, m_isEnsembleCurve( isEnsembleCurve )
|
||||
{
|
||||
@@ -50,9 +57,11 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCase*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress )
|
||||
: m_summaryCase( nullptr )
|
||||
, m_summaryAddress( summaryAddress )
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddressY )
|
||||
: m_summaryCaseY( nullptr )
|
||||
, m_summaryAddressY( summaryAddressY )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( RifEclipseSummaryAddress::timeAddress() )
|
||||
, m_ensemble( ensemble )
|
||||
, m_isEnsembleCurve( true )
|
||||
{
|
||||
@@ -61,9 +70,22 @@ RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCase* RiaSummaryCurveDefinition::summaryCase() const
|
||||
RiaSummaryCurveDefinition::RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RiaSummaryCurveAddress& summaryCurveAddress )
|
||||
: m_summaryCaseY( nullptr )
|
||||
, m_summaryAddressY( summaryCurveAddress.summaryAddressY() )
|
||||
, m_summaryCaseX( nullptr )
|
||||
, m_summaryAddressX( summaryCurveAddress.summaryAddressX() )
|
||||
, m_ensemble( ensemble )
|
||||
, m_isEnsembleCurve( true )
|
||||
{
|
||||
return m_summaryCase;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCase* RiaSummaryCurveDefinition::summaryCaseY() const
|
||||
{
|
||||
return m_summaryCaseY;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -77,9 +99,17 @@ RimSummaryCaseCollection* RiaSummaryCurveDefinition::ensemble() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RifEclipseSummaryAddress& RiaSummaryCurveDefinition::summaryAddress() const
|
||||
void RiaSummaryCurveDefinition::setEnsemble( RimSummaryCaseCollection* ensemble )
|
||||
{
|
||||
return m_summaryAddress;
|
||||
m_ensemble = ensemble;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RiaSummaryCurveDefinition::summaryAddressY() const
|
||||
{
|
||||
return m_summaryAddressY;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -93,23 +123,97 @@ bool RiaSummaryCurveDefinition::isEnsembleCurve() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::setSummaryAddress( const RifEclipseSummaryAddress& address )
|
||||
void RiaSummaryCurveDefinition::setSummaryAddressY( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
m_summaryAddress = address;
|
||||
m_summaryAddressY = address;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values )
|
||||
void RiaSummaryCurveDefinition::setSummaryCaseX( RimSummaryCase* summaryCase )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddress().isValid() ) return;
|
||||
if ( !curveDefinition.summaryCase() ) return;
|
||||
m_summaryCaseX = summaryCase;
|
||||
}
|
||||
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
||||
if ( !reader ) return;
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::setSummaryAddressX( const RifEclipseSummaryAddress& summaryAddress )
|
||||
{
|
||||
m_summaryAddressX = summaryAddress;
|
||||
}
|
||||
|
||||
reader->values( curveDefinition.summaryAddress(), values );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCase* RiaSummaryCurveDefinition::summaryCaseX() const
|
||||
{
|
||||
return m_summaryCaseX;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseSummaryAddress RiaSummaryCurveDefinition::summaryAddressX() const
|
||||
{
|
||||
return m_summaryAddressX;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryCurveAddress RiaSummaryCurveDefinition::summaryCurveAddress() const
|
||||
{
|
||||
return RiaSummaryCurveAddress( m_summaryAddressX, m_summaryAddressY );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryCurveDefinition::setIdentifierText( SummaryCategory category, const std::string& name )
|
||||
{
|
||||
if ( RifEclipseSummaryAddress::isDependentOnWellName( category ) )
|
||||
{
|
||||
m_summaryAddressY.setWellName( name );
|
||||
m_summaryAddressX.setWellName( name );
|
||||
}
|
||||
|
||||
int id = RiaStdStringTools::toInt( name );
|
||||
|
||||
switch ( category )
|
||||
{
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER:
|
||||
m_summaryAddressY.setAquiferNumber( id );
|
||||
m_summaryAddressX.setAquiferNumber( id );
|
||||
break;
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION:
|
||||
m_summaryAddressY.setRegion( id );
|
||||
m_summaryAddressX.setRegion( id );
|
||||
break;
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP:
|
||||
m_summaryAddressY.setGroupName( name );
|
||||
m_summaryAddressX.setGroupName( name );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<double> RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& curveDefinition )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddressY().isValid() ) return {};
|
||||
if ( !curveDefinition.summaryCaseY() ) return {};
|
||||
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||
if ( !reader ) return {};
|
||||
|
||||
auto [isOk, values] = reader->values( curveDefinition.summaryAddressY() );
|
||||
return values;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -117,13 +221,13 @@ void RiaSummaryCurveDefinition::resultValues( const RiaSummaryCurveDefinition& c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<time_t> RiaSummaryCurveDefinition::timeSteps( const RiaSummaryCurveDefinition& curveDefinition )
|
||||
{
|
||||
if ( !curveDefinition.summaryAddress().isValid() ) return {};
|
||||
if ( !curveDefinition.summaryCase() ) return {};
|
||||
if ( !curveDefinition.summaryAddressY().isValid() ) return {};
|
||||
if ( !curveDefinition.summaryCaseY() ) return {};
|
||||
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCase()->summaryReader();
|
||||
RifSummaryReaderInterface* reader = curveDefinition.summaryCaseY()->summaryReader();
|
||||
if ( !reader ) return {};
|
||||
|
||||
return reader->timeSteps( curveDefinition.summaryAddress() );
|
||||
return reader->timeSteps( curveDefinition.summaryAddressY() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -132,12 +236,12 @@ std::vector<time_t> RiaSummaryCurveDefinition::timeSteps( const RiaSummaryCurveD
|
||||
QString RiaSummaryCurveDefinition::curveDefinitionText() const
|
||||
{
|
||||
QString caseName;
|
||||
if ( summaryCase() )
|
||||
caseName = summaryCase()->displayCaseName();
|
||||
if ( summaryCaseY() )
|
||||
caseName = summaryCaseY()->displayCaseName();
|
||||
else if ( ensemble() )
|
||||
caseName = ensemble()->name();
|
||||
|
||||
return RiaSummaryCurveDefinition::curveDefinitionText( caseName, summaryAddress() );
|
||||
return RiaSummaryCurveDefinition::curveDefinitionText( caseName, summaryAddressY() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -185,18 +289,18 @@ bool RiaSummaryCurveDefinition::operator<( const RiaSummaryCurveDefinition& othe
|
||||
return m_ensemble < other.ensemble();
|
||||
}
|
||||
|
||||
if ( m_summaryCase != other.summaryCase() )
|
||||
if ( m_summaryCaseY != other.summaryCaseY() )
|
||||
{
|
||||
QString summaryCaseName;
|
||||
QString otherSummaryCaseName;
|
||||
|
||||
if ( m_summaryCase )
|
||||
if ( m_summaryCaseY )
|
||||
{
|
||||
summaryCaseName = m_summaryCase->displayCaseName();
|
||||
summaryCaseName = m_summaryCaseY->displayCaseName();
|
||||
}
|
||||
if ( other.summaryCase() )
|
||||
if ( other.summaryCaseY() )
|
||||
{
|
||||
otherSummaryCaseName = other.summaryCase()->displayCaseName();
|
||||
otherSummaryCaseName = other.summaryCaseY()->displayCaseName();
|
||||
}
|
||||
|
||||
// First check if names are different to ensure stable alphabetic sort
|
||||
@@ -206,12 +310,12 @@ bool RiaSummaryCurveDefinition::operator<( const RiaSummaryCurveDefinition& othe
|
||||
}
|
||||
|
||||
// Use pointer address, sorting will be be unstable
|
||||
return m_summaryCase < other.summaryCase();
|
||||
return m_summaryCaseY < other.summaryCaseY();
|
||||
}
|
||||
|
||||
if ( m_summaryAddress != other.summaryAddress() )
|
||||
if ( m_summaryAddressY != other.summaryAddressY() )
|
||||
{
|
||||
return ( m_summaryAddress < other.summaryAddress() );
|
||||
return ( m_summaryAddressY < other.summaryAddressY() );
|
||||
}
|
||||
|
||||
return m_isEnsembleCurve < other.isEnsembleCurve();
|
||||
@@ -235,20 +339,20 @@ void RiaSummaryCurveDefinitionAnalyser::setCurveDefinitions( const std::vector<R
|
||||
m_ensembles.insert( curveDef.ensemble() );
|
||||
valid = true;
|
||||
}
|
||||
else if ( curveDef.summaryCase() )
|
||||
else if ( curveDef.summaryCaseY() )
|
||||
{
|
||||
m_singleSummaryCases.insert( curveDef.summaryCase() );
|
||||
m_singleSummaryCases.insert( curveDef.summaryCaseY() );
|
||||
|
||||
if ( curveDef.summaryCase()->ensemble() )
|
||||
if ( curveDef.summaryCaseY()->ensemble() )
|
||||
{
|
||||
m_ensembles.insert( curveDef.summaryCase()->ensemble() );
|
||||
m_ensembles.insert( curveDef.summaryCaseY()->ensemble() );
|
||||
}
|
||||
valid = true;
|
||||
}
|
||||
|
||||
if ( valid )
|
||||
{
|
||||
const RifEclipseSummaryAddress& address = curveDef.summaryAddress();
|
||||
const RifEclipseSummaryAddress& address = curveDef.summaryAddressY();
|
||||
|
||||
m_vectorNames.insert( address.vectorName() );
|
||||
m_summaryAdresses.insert( address );
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
@@ -29,6 +30,7 @@
|
||||
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RiaSummaryCurveAddress;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -37,19 +39,34 @@ class RiaSummaryCurveDefinition
|
||||
{
|
||||
public:
|
||||
RiaSummaryCurveDefinition();
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& summaryAddress, bool isEnsembleCurve );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddress );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCase* summaryCaseY, const RifEclipseSummaryAddress& summaryAddressY, bool isEnsembleCurve );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& summaryAddressY );
|
||||
explicit RiaSummaryCurveDefinition( RimSummaryCaseCollection* ensemble, const RiaSummaryCurveAddress& summaryCurveAddress );
|
||||
|
||||
RimSummaryCase* summaryCase() const;
|
||||
const RifEclipseSummaryAddress& summaryAddress() const;
|
||||
RimSummaryCaseCollection* ensemble() const;
|
||||
bool isEnsembleCurve() const;
|
||||
void setSummaryAddress( const RifEclipseSummaryAddress& address );
|
||||
// X and Y Axis
|
||||
RimSummaryCaseCollection* ensemble() const;
|
||||
void setEnsemble( RimSummaryCaseCollection* ensemble );
|
||||
|
||||
// Y Axis
|
||||
RimSummaryCase* summaryCaseY() const;
|
||||
RifEclipseSummaryAddress summaryAddressY() const;
|
||||
bool isEnsembleCurve() const;
|
||||
void setSummaryAddressY( const RifEclipseSummaryAddress& address );
|
||||
|
||||
// X Axis
|
||||
void setSummaryCaseX( RimSummaryCase* summaryCase );
|
||||
void setSummaryAddressX( const RifEclipseSummaryAddress& summaryAddress );
|
||||
RimSummaryCase* summaryCaseX() const;
|
||||
RifEclipseSummaryAddress summaryAddressX() const;
|
||||
|
||||
RiaSummaryCurveAddress summaryCurveAddress() const;
|
||||
|
||||
void setIdentifierText( SummaryCategory category, const std::string& name );
|
||||
|
||||
bool operator<( const RiaSummaryCurveDefinition& other ) const;
|
||||
|
||||
// TODO: Consider moving to a separate tools class
|
||||
static void resultValues( const RiaSummaryCurveDefinition& curveDefinition, gsl::not_null<std::vector<double>*> values );
|
||||
static std::vector<double> resultValues( const RiaSummaryCurveDefinition& curveDefinition );
|
||||
static std::vector<time_t> timeSteps( const RiaSummaryCurveDefinition& curveDefinition );
|
||||
|
||||
QString curveDefinitionText() const;
|
||||
@@ -57,8 +74,10 @@ public:
|
||||
static QString curveDefinitionText( const QString& caseName, const RifEclipseSummaryAddress& summaryAddress );
|
||||
|
||||
private:
|
||||
RimSummaryCase* m_summaryCase;
|
||||
RifEclipseSummaryAddress m_summaryAddress;
|
||||
RimSummaryCase* m_summaryCaseY;
|
||||
RifEclipseSummaryAddress m_summaryAddressY;
|
||||
RimSummaryCase* m_summaryCaseX;
|
||||
RifEclipseSummaryAddress m_summaryAddressX;
|
||||
RimSummaryCaseCollection* m_ensemble;
|
||||
bool m_isEnsembleCurve;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,18 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaSummaryDefines.h"
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void caf::AppEnum<RiaDefines::HorizontalAxisType>::setUp()
|
||||
{
|
||||
addItem( RiaDefines::HorizontalAxisType::TIME, "TIME", "Time" );
|
||||
addItem( RiaDefines::HorizontalAxisType::SUMMARY_VECTOR, "SUMMARY_VECTOR", "Summary Vector" );
|
||||
setDefault( RiaDefines::HorizontalAxisType::SUMMARY_VECTOR );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -29,6 +29,12 @@ enum class FileType
|
||||
STIMPLAN_SUMMARY
|
||||
};
|
||||
|
||||
enum class HorizontalAxisType
|
||||
{
|
||||
TIME,
|
||||
SUMMARY_VECTOR
|
||||
};
|
||||
|
||||
QString summaryField();
|
||||
QString summaryAquifer();
|
||||
QString summaryNetwork();
|
||||
|
||||
@@ -52,6 +52,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNetworkTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaOpenMPTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNumericalTools.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaRegressionTextTools.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -101,6 +102,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNetworkTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaOpenMPTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaNumericalTools.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiaRegressionTextTools.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES})
|
||||
|
||||
@@ -146,9 +146,5 @@ bool RiaArgumentParser::parseArguments( cvf::ProgramOptions* progOpt )
|
||||
|
||||
// If positional parameter functionality is to be supported, the test for existence of positionalParameters must be
|
||||
// removed This is based on a pull request by @andlaus https://github.com/OPM/ResInsight/pull/162
|
||||
if ( !parseOk || !progOpt->positionalParameters().empty() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return parseOk && progOpt->positionalParameters().empty();
|
||||
}
|
||||
|
||||
@@ -36,12 +36,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaColorTools::isBrightnessAboveThreshold( cvf::Color3f backgroundColor )
|
||||
{
|
||||
if ( relativeLuminance( backgroundColor ) > 0.4 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return relativeLuminance( backgroundColor ) > 0.4;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -141,6 +136,30 @@ cvf::Color3f RiaColorTools::fromQColorTo3f( QColor color )
|
||||
return cvf::Color3f( color.redF(), color.greenF(), color.blueF() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Find the color with larges distance to the given color based on RGB distance
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::selectContrastColorFromCandiates( cvf::Color3f color, const cvf::Color3fArray& candidates )
|
||||
{
|
||||
if ( candidates.size() == 0 ) return color;
|
||||
|
||||
float maxDiff = 0.0f;
|
||||
cvf::Color3f selectedColor = color;
|
||||
|
||||
for ( const auto& candidate : candidates )
|
||||
{
|
||||
const auto diff = std::fabs( color.r() - candidate.r() ) + std::fabs( color.g() - candidate.g() ) +
|
||||
std::fabs( color.b() - candidate.b() );
|
||||
if ( diff > maxDiff )
|
||||
{
|
||||
maxDiff = diff;
|
||||
selectedColor = candidate;
|
||||
}
|
||||
}
|
||||
|
||||
return selectedColor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -42,6 +42,8 @@ public:
|
||||
static QColor toQColor( cvf::Color4f color );
|
||||
static cvf::Color3f fromQColorTo3f( QColor );
|
||||
|
||||
static cvf::Color3f selectContrastColorFromCandiates( cvf::Color3f color, const cvf::Color3fArray& candidates );
|
||||
|
||||
static QColor textColor();
|
||||
static cvf::Color3f textColor3f();
|
||||
|
||||
|
||||
@@ -18,11 +18,16 @@
|
||||
|
||||
#include "RiaExtractionTools.h"
|
||||
|
||||
#include "RiaSimWellBranchTools.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -37,6 +42,22 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( Ri
|
||||
return wlPlotCollection->findOrCreateExtractor( wellPath, eclipseCase );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateWellLogExtractor( const QString& wellName, RimEclipseCase* eclipseCase )
|
||||
{
|
||||
if ( !eclipseCase ) return nullptr;
|
||||
|
||||
if ( auto wellPathCollection = RimTools::wellPathCollection() )
|
||||
{
|
||||
auto wellPath = wellPathCollection->tryFindMatchingWellPath( wellName );
|
||||
return RiaExtractionTools::findOrCreateWellLogExtractor( wellPath, eclipseCase );
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -71,6 +92,33 @@ RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( co
|
||||
return wlPlotCollection->findOrCreateSimWellExtractor( simWell->name, caseUserDescription, wellPathGeom, eclipseCase->eclipseCaseData() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigEclipseWellLogExtractor* RiaExtractionTools::findOrCreateSimWellExtractor( RimEclipseCase* eclipseCase,
|
||||
const QString& simWellName,
|
||||
bool useBranchDetection,
|
||||
int branchIndex )
|
||||
{
|
||||
if ( !eclipseCase ) return nullptr;
|
||||
|
||||
auto wlPlotCollection = wellLogPlotCollection();
|
||||
if ( !wlPlotCollection ) return nullptr;
|
||||
|
||||
std::vector<const RigWellPath*> wellPaths = RiaSimWellBranchTools::simulationWellBranches( simWellName, useBranchDetection );
|
||||
if ( wellPaths.empty() ) return nullptr;
|
||||
|
||||
branchIndex = RiaSimWellBranchTools::clampBranchIndex( simWellName, branchIndex, useBranchDetection );
|
||||
if ( branchIndex >= static_cast<int>( wellPaths.size() ) ) return nullptr;
|
||||
|
||||
auto wellPathBranch = wellPaths[branchIndex];
|
||||
|
||||
return wlPlotCollection->findOrCreateSimWellExtractor( simWellName,
|
||||
QString( "Find or create sim well extractor" ),
|
||||
wellPathBranch,
|
||||
eclipseCase->eclipseCaseData() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -36,11 +36,18 @@ class QString;
|
||||
//==================================================================================================
|
||||
namespace RiaExtractionTools
|
||||
{
|
||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId = 0 );
|
||||
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||
|
||||
RimWellLogPlotCollection* wellLogPlotCollection();
|
||||
|
||||
// Eclipse
|
||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( const QString& wellName, RimEclipseCase* eclipseCase );
|
||||
RigEclipseWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimEclipseCase* eclipseCase );
|
||||
|
||||
// GeoMech
|
||||
RigGeoMechWellLogExtractor* findOrCreateWellLogExtractor( RimWellPath* wellPath, RimGeoMechCase* geomCase, int partId = 0 );
|
||||
|
||||
// Simulation wells
|
||||
RigEclipseWellLogExtractor* findOrCreateSimWellExtractor( const RimSimWellInView* simWell, const RigWellPath* wellPathGeom );
|
||||
RigEclipseWellLogExtractor*
|
||||
findOrCreateSimWellExtractor( RimEclipseCase* eclipseCase, const QString& simWellName, bool useBranchDetection, int branchIndex );
|
||||
|
||||
}; // namespace RiaExtractionTools
|
||||
|
||||
@@ -54,7 +54,7 @@ void RiaFieldHandleTools::disableWriteAndSetFieldHidden( caf::PdmFieldHandle* fi
|
||||
void RiaFieldHandleTools::updateOverrideStateAndLabel( caf::PdmFieldHandle* fieldHandle, bool isOverridden, const QString& toolTip )
|
||||
{
|
||||
// Get the label text as given by the init_field macro
|
||||
QString labelText = fieldHandle->uiCapability()->uiName( fieldHandle->uiCapability()->uiConfigNameForStaticData() );
|
||||
QString labelText = fieldHandle->uiCapability()->uiName( caf::PdmUiItem::uiConfigNameForStaticData() );
|
||||
|
||||
if ( isOverridden ) labelText += " (overridden)";
|
||||
fieldHandle->uiCapability()->setUiToolTip( toolTip );
|
||||
|
||||
@@ -59,7 +59,7 @@ std::string removeCommonStart( const std::string& mask, const std::string& filen
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaImageCompareReporter::generateHTMLReport( const std::string& fileName, const std::string& diff2htmlHeaderText )
|
||||
{
|
||||
if ( m_directorySets.size() == 0 ) return;
|
||||
if ( m_directorySets.empty() ) return;
|
||||
|
||||
std::ofstream output( fileName.c_str() );
|
||||
if ( !output )
|
||||
|
||||
@@ -190,7 +190,7 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
delete duplicateCase;
|
||||
}
|
||||
|
||||
if ( !candidateCases.empty() )
|
||||
if ( !candidateCases.empty() && RiaGuiApplication::isRunning() && RiuPlotMainWindow::instance()->isVisible() )
|
||||
{
|
||||
RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { candidateCases.front() }, {} );
|
||||
RiuPlotMainWindowTools::setExpanded( candidateCases.front() );
|
||||
@@ -206,10 +206,10 @@ bool RiaImportEclipseCaseTools::openEclipseCasesFromFile( const QStringList&
|
||||
|
||||
project->activeOilField()->completionTemplateCollection()->setDefaultUnitSystemBasedOnLoadedCases();
|
||||
|
||||
RiuPlotMainWindowTools::refreshToolbars();
|
||||
|
||||
if ( RiaGuiApplication::isRunning() )
|
||||
{
|
||||
if ( RiuPlotMainWindow::instance()->isVisible() ) RiuPlotMainWindowTools::refreshToolbars();
|
||||
|
||||
// Call process events to clear the queue. This make sure that we are able raise the 3D window on top of the
|
||||
// plot window. Otherwise the event processing ends up with the plot window on top.
|
||||
QApplication::processEvents();
|
||||
|
||||
@@ -70,7 +70,23 @@ double RiaNumericalTools::computeTenExponentFloor( double value )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaNumericalTools::roundToNumSignificantDigits( double value, double numSignificantDigits )
|
||||
double RiaNumericalTools::roundToNumSignificantDigitsFloor( double value, double numSignificantDigits )
|
||||
{
|
||||
return roundToNumSignificantDigits( value, numSignificantDigits, RoundToSignificantDigitsMode::FLOOR );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaNumericalTools::roundToNumSignificantDigitsCeil( double value, double numSignificantDigits )
|
||||
{
|
||||
return roundToNumSignificantDigits( value, numSignificantDigits, RoundToSignificantDigitsMode::CEIL );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaNumericalTools::roundToNumSignificantDigits( double value, double numSignificantDigits, RoundToSignificantDigitsMode mode )
|
||||
{
|
||||
double absoluteValue = cvf::Math::abs( value );
|
||||
if ( absoluteValue == 0.0 )
|
||||
@@ -83,11 +99,20 @@ double RiaNumericalTools::roundToNumSignificantDigits( double value, double numS
|
||||
|
||||
double factor = pow( 10.0, numSignificantDigits - logDecValue );
|
||||
|
||||
double tmp = value * factor;
|
||||
double integerPart;
|
||||
double fraction = modf( tmp, &integerPart );
|
||||
double tmp = value * factor;
|
||||
double integerPart = 0.0;
|
||||
modf( tmp, &integerPart );
|
||||
|
||||
if ( cvf::Math::abs( fraction ) >= 0.5 ) ( integerPart >= 0 ) ? integerPart++ : integerPart--;
|
||||
double candidateValue = integerPart / factor;
|
||||
|
||||
if ( mode == RoundToSignificantDigitsMode::CEIL && candidateValue < value )
|
||||
{
|
||||
integerPart++;
|
||||
}
|
||||
else if ( mode == RoundToSignificantDigitsMode::FLOOR && value < candidateValue )
|
||||
{
|
||||
integerPart--;
|
||||
}
|
||||
|
||||
double roundedValue = integerPart / factor;
|
||||
|
||||
|
||||
@@ -25,6 +25,14 @@ double roundToClosestPowerOfTenFloor( double value );
|
||||
double computeTenExponentCeil( double value );
|
||||
double computeTenExponentFloor( double value );
|
||||
|
||||
double roundToNumSignificantDigits( double value, double numSignificantDigits );
|
||||
double roundToNumSignificantDigitsFloor( double value, double numSignificantDigits );
|
||||
double roundToNumSignificantDigitsCeil( double value, double numSignificantDigits );
|
||||
|
||||
enum class RoundToSignificantDigitsMode
|
||||
{
|
||||
CEIL,
|
||||
FLOOR
|
||||
};
|
||||
double roundToNumSignificantDigits( double value, double numSignificantDigits, RoundToSignificantDigitsMode mode );
|
||||
|
||||
}; // namespace RiaNumericalTools
|
||||
|
||||
@@ -55,9 +55,9 @@ void RiaOptionItemFactory::appendOptionItemsForEnsembleCurveSets( QList<caf::Pdm
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType )
|
||||
caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclipseSummaryAddressDefines::SummaryCategory summaryType )
|
||||
{
|
||||
auto uiText = caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>::uiText( summaryType );
|
||||
auto uiText = caf::AppEnum<RifEclipseSummaryAddressDefines::SummaryCategory>::uiText( summaryType );
|
||||
|
||||
// Use icons from https://github.com/equinor/webviz-subsurface-components
|
||||
|
||||
@@ -65,55 +65,55 @@ caf::PdmOptionItemInfo RiaOptionItemFactory::optionItemFromSummaryType( RifEclip
|
||||
|
||||
switch ( summaryType )
|
||||
{
|
||||
case RifEclipseSummaryAddress::SUMMARY_INVALID:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_INVALID:
|
||||
iconText = ":/summary/components/images/invalid.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_FIELD:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_FIELD:
|
||||
iconText = ":/summary/components/images/field.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_AQUIFER:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_AQUIFER:
|
||||
iconText = ":/summary/components/images/aquifer.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_NETWORK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_NETWORK:
|
||||
iconText = ":/summary/components/images/network.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_MISC:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_MISC:
|
||||
iconText = ":/summary/components/images/misc.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION:
|
||||
iconText = ":/summary/components/images/region.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_REGION_2_REGION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_REGION_2_REGION:
|
||||
iconText = ":/summary/components/images/region-region.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_GROUP:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_GROUP:
|
||||
iconText = ":/summary/components/images/group.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL:
|
||||
iconText = ":/summary/components/images/well.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION:
|
||||
iconText = ":/summary/components/images/well-completion.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_LGR:
|
||||
iconText = ":/summary/components/images/well.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_COMPLETION_LGR:
|
||||
iconText = ":/summary/components/images/well-completion.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_WELL_SEGMENT:
|
||||
iconText = ":/summary/components/images/segment.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK:
|
||||
iconText = ":/summary/components/images/block.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_BLOCK_LGR:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_BLOCK_LGR:
|
||||
iconText = ":/summary/components/images/block.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_IMPORTED:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_IMPORTED:
|
||||
iconText = ":/summary/components/images/others.svg";
|
||||
break;
|
||||
case RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS:
|
||||
case RifEclipseSummaryAddressDefines::SummaryCategory::SUMMARY_ENSEMBLE_STATISTICS:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifEclipseSummaryAddressDefines.h"
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
|
||||
@@ -31,5 +31,5 @@ class RiaOptionItemFactory
|
||||
public:
|
||||
static void appendOptionItemFromViewNameAndCaseName( Rim3dView* view, QList<caf::PdmOptionItemInfo>* optionItems );
|
||||
static void appendOptionItemsForEnsembleCurveSets( QList<caf::PdmOptionItemInfo>* options );
|
||||
static caf::PdmOptionItemInfo optionItemFromSummaryType( RifEclipseSummaryAddress::SummaryVarCategory summaryType );
|
||||
static caf::PdmOptionItemInfo optionItemFromSummaryType( RifEclipseSummaryAddressDefines::SummaryCategory summaryType );
|
||||
};
|
||||
|
||||
@@ -66,7 +66,7 @@ void RiaProjectFileVersionTools::decodeVersionString( const QString& projectFile
|
||||
|
||||
QStringList subStrings = projectFileVersion.split( "." );
|
||||
|
||||
if ( subStrings.size() > 0 )
|
||||
if ( !subStrings.empty() )
|
||||
{
|
||||
*majorVersion = subStrings[0].toInt();
|
||||
}
|
||||
|
||||
@@ -123,17 +123,17 @@ void RiaProjectModifier::invalidateExternalFilePaths( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaProjectModifier::applyModificationsToProject( RimProject* project )
|
||||
{
|
||||
if ( m_caseIdToGridFileNameMap.size() > 0 )
|
||||
if ( !m_caseIdToGridFileNameMap.empty() )
|
||||
{
|
||||
replaceCase( project );
|
||||
}
|
||||
|
||||
if ( m_groupIdToGridFileNamesMap.size() > 0 )
|
||||
if ( !m_groupIdToGridFileNamesMap.empty() )
|
||||
{
|
||||
replaceSourceCases( project );
|
||||
}
|
||||
|
||||
if ( m_caseIdToPropertiesFolderMap.size() > 0 )
|
||||
if ( !m_caseIdToPropertiesFolderMap.empty() )
|
||||
{
|
||||
replacePropertiesFolder( project );
|
||||
}
|
||||
@@ -193,9 +193,7 @@ void RiaProjectModifier::replaceSourceCases( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaProjectModifier::replaceCase( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( rimCase );
|
||||
@@ -234,9 +232,7 @@ void RiaProjectModifier::replaceCase( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaProjectModifier::replacePropertiesFolder( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseInputCase* inputCase = dynamic_cast<RimEclipseInputCase*>( rimCase );
|
||||
@@ -289,9 +285,7 @@ QString RiaProjectModifier::caseNameFromGridFileName( const QString& fullGridFil
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaProjectModifier::firstCaseId( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseResultCase* resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase );
|
||||
@@ -315,7 +309,7 @@ int RiaProjectModifier::firstGroupId( RimProject* project )
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
|
||||
if ( analysisModels )
|
||||
{
|
||||
if ( analysisModels->caseGroups.size() > 0 )
|
||||
if ( !analysisModels->caseGroups.empty() )
|
||||
{
|
||||
return analysisModels->caseGroups[0]->groupId();
|
||||
}
|
||||
@@ -330,8 +324,7 @@ int RiaProjectModifier::firstGroupId( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaProjectModifier::firstInputCaseId( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
|
||||
116
ApplicationLibCode/Application/Tools/RiaRegressionTextTools.cpp
Normal file
@@ -0,0 +1,116 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaRegressionTextTools.h"
|
||||
|
||||
#include "ExponentialRegression.hpp"
|
||||
#include "LinearRegression.hpp"
|
||||
#include "LogarithmicRegression.hpp"
|
||||
#include "LogisticRegression.hpp"
|
||||
#include "PolynomialRegression.hpp"
|
||||
#include "PowerFitRegression.hpp"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::generateRegressionText( const regression::LinearRegression& reg )
|
||||
{
|
||||
QString sign = reg.intercept() < 0.0 ? "-" : "+";
|
||||
return QString( "y = %1x %2 %3" ).arg( formatDouble( reg.slope() ) ).arg( sign ).arg( formatDouble( std::fabs( reg.intercept() ) ) ) +
|
||||
QString( "<br>R<sup>2</sup> = %1" ).arg( reg.r2() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::generateRegressionText( const regression::PolynomialRegression& reg )
|
||||
{
|
||||
QString str = "y = ";
|
||||
|
||||
bool isFirst = true;
|
||||
std::vector<double> coeffs = reg.coeffisients();
|
||||
QStringList parts;
|
||||
for ( size_t i = 0; i < coeffs.size(); i++ )
|
||||
{
|
||||
double coeff = coeffs[i];
|
||||
// Skip zero coeffs
|
||||
if ( coeff != 0.0 )
|
||||
{
|
||||
if ( coeff < 0.0 )
|
||||
parts.append( "-" );
|
||||
else if ( !isFirst )
|
||||
parts.append( "+" );
|
||||
|
||||
if ( i == 0 )
|
||||
{
|
||||
parts.append( QString( "%1" ).arg( formatDouble( std::fabs( coeff ) ) ) );
|
||||
}
|
||||
else if ( i == 1 )
|
||||
{
|
||||
parts.append( QString( "%1x" ).arg( formatDouble( std::fabs( coeff ) ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
parts.append( QString( " %1x<sup>%2</sup>" ).arg( formatDouble( std::fabs( coeff ) ) ).arg( i ) );
|
||||
}
|
||||
|
||||
isFirst = false;
|
||||
}
|
||||
}
|
||||
|
||||
return str + parts.join( " " ) + QString( "<br>R<sup>2</sup> = %1" ).arg( reg.r2() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::generateRegressionText( const regression::PowerFitRegression& reg )
|
||||
{
|
||||
return QString( "y = %1 + x<sup>%2</sup>" ).arg( formatDouble( reg.scale() ) ).arg( formatDouble( reg.exponent() ) ) +
|
||||
QString( "<br>R<sup>2</sup> = %1" ).arg( reg.r2() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::generateRegressionText( const regression::ExponentialRegression& reg )
|
||||
{
|
||||
return QString( "y = %1 * e<sup>%2x</sup>" ).arg( formatDouble( reg.a() ) ).arg( formatDouble( reg.b() ) ) +
|
||||
QString( "<br>R<sup>2</sup> = %1" ).arg( reg.r2() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::generateRegressionText( const regression::LogarithmicRegression& reg )
|
||||
{
|
||||
return QString( "y = %1 + %2 * ln(x)" ).arg( formatDouble( reg.a() ) ).arg( formatDouble( reg.b() ) ) +
|
||||
QString( "<br>R<sup>2</sup> = %1" ).arg( reg.r2() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaRegressionTextTools::formatDouble( double v )
|
||||
{
|
||||
return QString::number( v, 'g', 2 );
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023- Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace regression
|
||||
{
|
||||
class ExponentialRegression;
|
||||
class LinearRegression;
|
||||
class LogarithmicRegression;
|
||||
class PolynomialRegression;
|
||||
class PowerFitRegression;
|
||||
} // namespace regression
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RiaRegressionTextTools
|
||||
{
|
||||
public:
|
||||
static QString generateRegressionText( const regression::LinearRegression& reg );
|
||||
static QString generateRegressionText( const regression::PolynomialRegression& reg );
|
||||
static QString generateRegressionText( const regression::PowerFitRegression& reg );
|
||||
static QString generateRegressionText( const regression::LogarithmicRegression& reg );
|
||||
static QString generateRegressionText( const regression::ExponentialRegression& reg );
|
||||
|
||||
private:
|
||||
static QString formatDouble( double v );
|
||||
}; // namespace RiaRegressionTextTools
|
||||
@@ -54,7 +54,7 @@ QList<caf::PdmOptionItemInfo> RiaSimWellBranchTools::valueOptionsForBranchIndexF
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
size_t branchCount = simulationWellPaths.size();
|
||||
if ( simulationWellPaths.size() == 0 )
|
||||
if ( simulationWellPaths.empty() )
|
||||
{
|
||||
options.push_front( caf::PdmOptionItemInfo( "None", -1 ) );
|
||||
}
|
||||
@@ -111,7 +111,7 @@ int RiaSimWellBranchTools::clampBranchIndex( const QString& simWellName, int bra
|
||||
{
|
||||
auto branches = RiaSimWellBranchTools::simulationWellBranches( simWellName, branchDetection );
|
||||
|
||||
if ( branches.size() == 0 )
|
||||
if ( branches.empty() )
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <cctype>
|
||||
#include <charconv>
|
||||
#include <regex>
|
||||
|
||||
const std::string WHITESPACE = " \n\r\t\f\v";
|
||||
|
||||
@@ -51,6 +52,16 @@ std::string RiaStdStringTools::trimString( const std::string& s )
|
||||
return rightTrimString( leftTrimString( s ) );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RiaStdStringTools::removeWhitespace( const std::string& line )
|
||||
{
|
||||
std::string s = line;
|
||||
s.erase( std::remove_if( s.begin(), s.end(), isspace ), s.end() );
|
||||
return s;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -163,10 +174,7 @@ std::string RiaStdStringTools::toUpper( const std::string& s )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaStdStringTools::endsWith( const std::string& mainStr, const std::string& toMatch )
|
||||
{
|
||||
if ( mainStr.size() >= toMatch.size() && mainStr.compare( mainStr.size() - toMatch.size(), toMatch.size(), toMatch ) == 0 )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
return mainStr.size() >= toMatch.size() && mainStr.compare( mainStr.size() - toMatch.size(), toMatch.size(), toMatch ) == 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -262,3 +270,14 @@ int RiaStdStringTools::computeEditDistance( const std::string& x, const std::str
|
||||
// The distance between the two full strings as the last value computed.
|
||||
return T[m][n];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RiaStdStringTools::removeHtmlTags( const std::string& s )
|
||||
{
|
||||
std::regex html_tags( "<.*?>" ); // Matches any HTML tag
|
||||
std::string result = std::regex_replace( s, html_tags, "" );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public:
|
||||
static std::string trimString( const std::string& s );
|
||||
static std::string rightTrimString( const std::string& s );
|
||||
static std::string leftTrimString( const std::string& s );
|
||||
static std::string removeWhitespace( const std::string& line );
|
||||
|
||||
static bool isNumber( const std::string& s, char decimalPoint );
|
||||
|
||||
@@ -55,6 +56,8 @@ public:
|
||||
|
||||
static int computeEditDistance( const std::string& x, const std::string& y );
|
||||
|
||||
static std::string removeHtmlTags( const std::string& s );
|
||||
|
||||
private:
|
||||
template <class Container>
|
||||
static void splitByDelimiter( const std::string& str, Container& cont, char delimiter = ' ' );
|
||||
|
||||
@@ -26,10 +26,13 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
using namespace RifEclipseSummaryAddressDefines;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaSummaryAddressAnalyzer::RiaSummaryAddressAnalyzer()
|
||||
: m_onlyCrossPlotCurves( false )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -58,7 +61,25 @@ void RiaSummaryAddressAnalyzer::appendAddresses( const std::set<RifEclipseSummar
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::quantities() const
|
||||
void RiaSummaryAddressAnalyzer::appendAddresses( const std::vector<RiaSummaryCurveAddress>& addresses )
|
||||
{
|
||||
// RiaSummaryCurveAddress can be used to represent cross plot curves. Set the flag m_onlyCrossPlotCurves to true, and this will be set
|
||||
// to false in analyzeSingleAddress if we detect a time curve
|
||||
|
||||
m_onlyCrossPlotCurves = true;
|
||||
|
||||
for ( const auto& adr : addresses )
|
||||
{
|
||||
// Use Y address first, to make sure the ordering of cross plot names is correct
|
||||
analyzeSingleAddress( adr.summaryAddressY() );
|
||||
analyzeSingleAddress( adr.summaryAddressX() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RiaSummaryAddressAnalyzer::quantities() const
|
||||
{
|
||||
return m_quantities;
|
||||
}
|
||||
@@ -98,6 +119,14 @@ bool RiaSummaryAddressAnalyzer::isSingleQuantityIgnoreHistory() const
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaSummaryAddressAnalyzer::onlyCrossPlotCurves() const
|
||||
{
|
||||
return m_onlyCrossPlotCurves;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -108,6 +137,20 @@ std::string RiaSummaryAddressAnalyzer::quantityNameForTitle() const
|
||||
return *quantities().begin();
|
||||
}
|
||||
|
||||
if ( quantities().size() == 2 && m_onlyCrossPlotCurves )
|
||||
{
|
||||
// We have a cross plot with only one curve
|
||||
|
||||
std::string title;
|
||||
for ( const auto& quantity : quantities() )
|
||||
{
|
||||
if ( !title.empty() ) title += " | ";
|
||||
title += quantity;
|
||||
}
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
if ( quantities().size() == 2 && quantityNamesWithHistory().size() == 1 )
|
||||
{
|
||||
return *quantityNamesWithHistory().begin();
|
||||
@@ -132,6 +175,14 @@ std::set<std::string> RiaSummaryAddressAnalyzer::groupNames() const
|
||||
return keysInMap( m_groupNames );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::networkNames() const
|
||||
{
|
||||
return keysInMap( m_networkNames );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -195,7 +246,7 @@ std::set<int> RiaSummaryAddressAnalyzer::aquifers() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> RiaSummaryAddressAnalyzer::categories() const
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryCategory> RiaSummaryAddressAnalyzer::categories() const
|
||||
{
|
||||
return keysInMap( m_categories );
|
||||
}
|
||||
@@ -207,6 +258,7 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
{
|
||||
auto wellAdr = valuesInMap( m_wellNames );
|
||||
auto groupAdr = valuesInMap( m_groupNames );
|
||||
auto networkAdr = valuesInMap( m_networkNames );
|
||||
auto regionAdr = valuesInMap( m_regionNumbers );
|
||||
auto blockAdr = valuesInMap( m_blocks );
|
||||
auto aquiferAdr = valuesInMap( m_aquifers );
|
||||
@@ -214,6 +266,7 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> groupedByObject;
|
||||
groupedByObject.insert( groupedByObject.end(), wellAdr.begin(), wellAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), groupAdr.begin(), groupAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), networkAdr.begin(), networkAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), regionAdr.begin(), regionAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), blockAdr.begin(), blockAdr.end() );
|
||||
groupedByObject.insert( groupedByObject.end(), aquiferAdr.begin(), aquiferAdr.end() );
|
||||
@@ -226,12 +279,12 @@ std::vector<std::vector<RifEclipseSummaryAddress>> RiaSummaryAddressAnalyzer::ad
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category,
|
||||
const std::string& secondaryIdentifier ) const
|
||||
std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSummaryAddressDefines::SummaryCategory category,
|
||||
const std::string& secondaryIdentifier ) const
|
||||
{
|
||||
std::vector<QString> identifierStrings;
|
||||
|
||||
if ( category == RifEclipseSummaryAddress::SUMMARY_REGION )
|
||||
if ( category == SummaryCategory::SUMMARY_REGION )
|
||||
{
|
||||
auto keys = keysInMap( m_regionNumbers );
|
||||
for ( const auto& key : keys )
|
||||
@@ -239,7 +292,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::number( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL )
|
||||
else if ( category == SummaryCategory::SUMMARY_WELL )
|
||||
{
|
||||
auto keys = keysInMap( m_wellNames );
|
||||
for ( const auto& key : keys )
|
||||
@@ -247,7 +300,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_GROUP )
|
||||
else if ( category == SummaryCategory::SUMMARY_GROUP )
|
||||
{
|
||||
auto keys = keysInMap( m_groupNames );
|
||||
for ( const auto& key : keys )
|
||||
@@ -255,7 +308,15 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( category == SummaryCategory::SUMMARY_NETWORK )
|
||||
{
|
||||
auto keys = keysInMap( m_networkNames );
|
||||
for ( const auto& key : keys )
|
||||
{
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == SummaryCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
auto keys = keysInMap( m_blocks );
|
||||
for ( const auto& key : keys )
|
||||
@@ -263,7 +324,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( key ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( category == SummaryCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
auto segmentNumbers = wellSegmentNumbers( secondaryIdentifier );
|
||||
for ( const auto& segment : segmentNumbers )
|
||||
@@ -271,7 +332,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::number( segment ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
else if ( category == SummaryCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
auto connections = wellCompletions( secondaryIdentifier );
|
||||
for ( const auto& conn : connections )
|
||||
@@ -279,7 +340,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
identifierStrings.push_back( QString::fromStdString( conn ) );
|
||||
}
|
||||
}
|
||||
else if ( category == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( category == SummaryCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
auto keys = keysInMap( m_aquifers );
|
||||
for ( const auto& key : keys )
|
||||
@@ -295,7 +356,7 @@ std::vector<QString> RiaSummaryAddressAnalyzer::identifierTexts( RifEclipseSumma
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RifEclipseSummaryAddress> RiaSummaryAddressAnalyzer::addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
RifEclipseSummaryAddressDefines::SummaryCategory category )
|
||||
{
|
||||
std::vector<RifEclipseSummaryAddress> filteredAddresses;
|
||||
|
||||
@@ -329,7 +390,7 @@ std::string RiaSummaryAddressAnalyzer::correspondingHistorySummaryCurveName( con
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category )
|
||||
std::set<std::string> RiaSummaryAddressAnalyzer::vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryCategory category )
|
||||
{
|
||||
auto it = m_categories.find( category );
|
||||
if ( it != m_categories.end() ) return it->second;
|
||||
@@ -345,6 +406,7 @@ void RiaSummaryAddressAnalyzer::clear()
|
||||
m_quantities.clear();
|
||||
m_wellNames.clear();
|
||||
m_groupNames.clear();
|
||||
m_networkNames.clear();
|
||||
m_regionNumbers.clear();
|
||||
m_categories.clear();
|
||||
m_wellCompletions.clear();
|
||||
@@ -384,7 +446,7 @@ void RiaSummaryAddressAnalyzer::computeQuantityNamesWithHistory() const
|
||||
{
|
||||
std::string correspondingHistoryCurve = correspondingHistorySummaryCurveName( s );
|
||||
|
||||
if ( m_quantities.find( correspondingHistoryCurve ) != m_quantities.end() )
|
||||
if ( std::find( m_quantities.begin(), m_quantities.end(), correspondingHistoryCurve ) != m_quantities.end() )
|
||||
{
|
||||
// Insert the curve name without H
|
||||
if ( RiaStdStringTools::endsWith( s, historyIdentifier ) )
|
||||
@@ -408,6 +470,16 @@ void RiaSummaryAddressAnalyzer::computeQuantityNamesWithHistory() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAddress& address )
|
||||
{
|
||||
if ( !address.isValid() ) return;
|
||||
|
||||
if ( address.category() == SummaryCategory::SUMMARY_TIME )
|
||||
{
|
||||
m_onlyCrossPlotCurves = false;
|
||||
|
||||
// A time address has no other information than SummaryCategory::SUMMARY_TIME
|
||||
return;
|
||||
}
|
||||
|
||||
const std::string& wellName = address.wellName();
|
||||
|
||||
if ( !wellName.empty() )
|
||||
@@ -417,7 +489,11 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd
|
||||
|
||||
if ( !address.vectorName().empty() )
|
||||
{
|
||||
m_quantities.insert( address.vectorName() );
|
||||
// The ordering of the quantities is used when creating titles of plots
|
||||
if ( std::find( m_quantities.begin(), m_quantities.end(), address.vectorName() ) == m_quantities.end() )
|
||||
{
|
||||
m_quantities.push_back( address.vectorName() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !address.groupName().empty() )
|
||||
@@ -425,37 +501,42 @@ void RiaSummaryAddressAnalyzer::analyzeSingleAddress( const RifEclipseSummaryAdd
|
||||
m_groupNames.insert( { address.groupName(), address } );
|
||||
}
|
||||
|
||||
if ( !address.networkName().empty() )
|
||||
{
|
||||
m_networkNames.insert( { address.networkName(), address } );
|
||||
}
|
||||
|
||||
if ( address.regionNumber() != -1 )
|
||||
{
|
||||
m_regionNumbers.insert( { address.regionNumber(), address } );
|
||||
}
|
||||
|
||||
if ( address.category() == RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION )
|
||||
if ( address.category() == SummaryCategory::SUMMARY_WELL_COMPLETION )
|
||||
{
|
||||
auto wellNameAndCompletion = std::make_pair( wellName, address.blockAsString() );
|
||||
m_wellCompletions.insert( wellNameAndCompletion );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_WELL_SEGMENT )
|
||||
else if ( address.category() == SummaryCategory::SUMMARY_WELL_SEGMENT )
|
||||
{
|
||||
auto wellNameAndSegment = std::make_pair( wellName, address.wellSegmentNumber() );
|
||||
m_wellSegmentNumbers.insert( wellNameAndSegment );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_BLOCK )
|
||||
else if ( address.category() == SummaryCategory::SUMMARY_BLOCK )
|
||||
{
|
||||
auto text = address.blockAsString();
|
||||
|
||||
m_blocks.insert( { text, address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_AQUIFER )
|
||||
else if ( address.category() == SummaryCategory::SUMMARY_AQUIFER )
|
||||
{
|
||||
m_aquifers.insert( { address.aquiferNumber(), address } );
|
||||
}
|
||||
else if ( address.category() == RifEclipseSummaryAddress::SUMMARY_FIELD || address.category() == RifEclipseSummaryAddress::SUMMARY_MISC )
|
||||
else if ( address.category() == SummaryCategory::SUMMARY_FIELD || address.category() == SummaryCategory::SUMMARY_MISC )
|
||||
{
|
||||
m_otherCategory.push_back( address );
|
||||
}
|
||||
|
||||
if ( address.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
if ( address.category() != SummaryCategory::SUMMARY_INVALID )
|
||||
{
|
||||
if ( m_categories.count( address.category() ) == 0 )
|
||||
{
|
||||
@@ -495,10 +576,10 @@ std::set<int> RiaSummaryAddressAnalyzer::keysInMap( const std::multimap<int, Rif
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
RiaSummaryAddressAnalyzer::keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map )
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryCategory>
|
||||
RiaSummaryAddressAnalyzer::keysInMap( const std::map<RifEclipseSummaryAddressDefines::SummaryCategory, std::set<std::string>>& map )
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> keys;
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryCategory> keys;
|
||||
for ( const auto& [key, value] : map )
|
||||
{
|
||||
keys.insert( key );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaSummaryCurveAddress.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include <set>
|
||||
@@ -39,19 +40,23 @@ public:
|
||||
|
||||
void appendAddresses( const std::set<RifEclipseSummaryAddress>& allAddresses );
|
||||
void appendAddresses( const std::vector<RifEclipseSummaryAddress>& allAddresses );
|
||||
void appendAddresses( const std::vector<RiaSummaryCurveAddress>& addresses );
|
||||
|
||||
void clear();
|
||||
|
||||
std::set<std::string> quantities() const;
|
||||
std::set<std::string> quantityNamesWithHistory() const;
|
||||
std::set<std::string> quantityNamesNoHistory() const;
|
||||
std::vector<std::string> quantities() const;
|
||||
std::set<std::string> quantityNamesWithHistory() const;
|
||||
std::set<std::string> quantityNamesNoHistory() const;
|
||||
|
||||
bool isSingleQuantityIgnoreHistory() const;
|
||||
|
||||
bool onlyCrossPlotCurves() const;
|
||||
|
||||
std::string quantityNameForTitle() const;
|
||||
|
||||
std::set<std::string> wellNames() const;
|
||||
std::set<std::string> groupNames() const;
|
||||
std::set<std::string> networkNames() const;
|
||||
std::set<int> regionNumbers() const;
|
||||
|
||||
std::set<std::string> wellCompletions( const std::string& wellName ) const;
|
||||
@@ -59,17 +64,18 @@ public:
|
||||
std::set<std::string> blocks() const;
|
||||
std::set<int> aquifers() const;
|
||||
|
||||
std::set<RifEclipseSummaryAddress::SummaryVarCategory> categories() const;
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> addressesGroupedByObject() const;
|
||||
std::set<RifEclipseSummaryAddressDefines::SummaryCategory> categories() const;
|
||||
std::vector<std::vector<RifEclipseSummaryAddress>> addressesGroupedByObject() const;
|
||||
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddress::SummaryVarCategory category, const std::string& secondaryIdentifier ) const;
|
||||
std::vector<QString> identifierTexts( RifEclipseSummaryAddressDefines::SummaryCategory category,
|
||||
const std::string& secondaryIdentifier ) const;
|
||||
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
static std::vector<RifEclipseSummaryAddress> addressesForCategory( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||
RifEclipseSummaryAddressDefines::SummaryCategory category );
|
||||
|
||||
static std::string correspondingHistorySummaryCurveName( const std::string& curveName );
|
||||
|
||||
std::set<std::string> vectorNamesForCategory( RifEclipseSummaryAddress::SummaryVarCategory category );
|
||||
std::set<std::string> vectorNamesForCategory( RifEclipseSummaryAddressDefines::SummaryCategory category );
|
||||
|
||||
private:
|
||||
void assignCategoryToQuantities() const;
|
||||
@@ -79,26 +85,29 @@ private:
|
||||
|
||||
static std::set<std::string> keysInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
static std::set<int> keysInMap( const std::multimap<int, RifEclipseSummaryAddress>& map );
|
||||
static std::set<RifEclipseSummaryAddress::SummaryVarCategory>
|
||||
keysInMap( const std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>>& map );
|
||||
static std::set<RifEclipseSummaryAddressDefines::SummaryCategory>
|
||||
keysInMap( const std::map<RifEclipseSummaryAddressDefines::SummaryCategory, std::set<std::string>>& map );
|
||||
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>> valuesInMap( const std::multimap<std::string, RifEclipseSummaryAddress>& map );
|
||||
|
||||
static std::vector<std::vector<RifEclipseSummaryAddress>> valuesInMap( const std::multimap<int, RifEclipseSummaryAddress>& map );
|
||||
|
||||
private:
|
||||
std::set<std::string> m_quantities;
|
||||
std::vector<std::string> m_quantities;
|
||||
mutable std::set<std::string> m_quantitiesWithMatchingHistory;
|
||||
mutable std::set<std::string> m_quantitiesNoMatchingHistory;
|
||||
|
||||
std::vector<RifEclipseSummaryAddress> m_otherCategory;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_wellNames;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_groupNames;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_networkNames;
|
||||
std::multimap<int, RifEclipseSummaryAddress> m_regionNumbers;
|
||||
std::set<std::pair<std::string, std::string>> m_wellCompletions;
|
||||
std::set<std::pair<std::string, int>> m_wellSegmentNumbers;
|
||||
std::multimap<std::string, RifEclipseSummaryAddress> m_blocks;
|
||||
std::multimap<int, RifEclipseSummaryAddress> m_aquifers;
|
||||
|
||||
std::map<RifEclipseSummaryAddress::SummaryVarCategory, std::set<std::string>> m_categories;
|
||||
std::map<RifEclipseSummaryAddressDefines::SummaryCategory, std::set<std::string>> m_categories;
|
||||
|
||||
bool m_onlyCrossPlotCurves;
|
||||
};
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCrossPlot.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryMultiPlotCollection.h"
|
||||
@@ -65,14 +63,6 @@ std::vector<RimSummaryCase*> RiaSummaryTools::singleTopLevelSummaryCases()
|
||||
return {};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlotCollection* RiaSummaryTools::summaryCrossPlotCollection()
|
||||
{
|
||||
return RimMainPlotCollection::current()->summaryCrossPlotCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -122,11 +112,6 @@ void RiaSummaryTools::notifyCalculatedCurveNameHasChanged( int calculationId, co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryPlot* RiaSummaryTools::parentSummaryPlot( caf::PdmObject* object )
|
||||
{
|
||||
if ( parentCrossPlot( object ) )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ( object )
|
||||
{
|
||||
return object->firstAncestorOrThisOfType<RimSummaryPlot>();
|
||||
@@ -161,40 +146,6 @@ RimSummaryMultiPlot* RiaSummaryTools::parentSummaryMultiPlot( caf::PdmObject* ob
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlot* RiaSummaryTools::parentCrossPlot( caf::PdmObject* object )
|
||||
{
|
||||
if ( object )
|
||||
{
|
||||
return object->firstAncestorOrThisOfType<RimSummaryCrossPlot>();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryCrossPlotCollection* RiaSummaryTools::parentCrossPlotCollection( caf::PdmObject* object )
|
||||
{
|
||||
if ( object )
|
||||
{
|
||||
return object->firstAncestorOrThisOfType<RimSummaryCrossPlotCollection>();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaSummaryTools::isSummaryCrossPlot( const RimSummaryPlot* plot )
|
||||
{
|
||||
return dynamic_cast<const RimSummaryCrossPlot*>( plot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -354,3 +305,26 @@ QList<caf::PdmOptionItemInfo> RiaSummaryTools::optionsForSummaryCases( const std
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryTools::copyCurveDataSources( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve )
|
||||
{
|
||||
curve.setSummaryAddressX( otherCurve.summaryAddressX() );
|
||||
curve.setSummaryCaseX( otherCurve.summaryCaseX() );
|
||||
|
||||
curve.setSummaryAddressY( otherCurve.summaryAddressY() );
|
||||
curve.setSummaryCaseY( otherCurve.summaryCaseY() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaSummaryTools::copyCurveAxisData( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve )
|
||||
{
|
||||
curve.setAxisTypeX( otherCurve.axisTypeX() );
|
||||
curve.setTopOrBottomAxisX( otherCurve.axisX() );
|
||||
|
||||
curve.setLeftOrRightAxisY( otherCurve.axisY() );
|
||||
}
|
||||
|
||||
@@ -28,14 +28,13 @@
|
||||
class RimSummaryPlot;
|
||||
class RimSummaryMultiPlot;
|
||||
class RimSummaryMultiPlotCollection;
|
||||
class RimSummaryCrossPlot;
|
||||
class RimSummaryCrossPlotCollection;
|
||||
class RimSummaryCaseMainCollection;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RimSummaryTable;
|
||||
class RimSummaryTableCollection;
|
||||
class RimObservedDataCollection;
|
||||
class RimSummaryCurve;
|
||||
|
||||
class RifEclipseSummaryAddress;
|
||||
|
||||
@@ -53,7 +52,6 @@ class PdmOptionItemInfo;
|
||||
class RiaSummaryTools
|
||||
{
|
||||
public:
|
||||
static RimSummaryCrossPlotCollection* summaryCrossPlotCollection();
|
||||
static RimSummaryCaseMainCollection* summaryCaseMainCollection();
|
||||
static RimSummaryMultiPlotCollection* summaryMultiPlotCollection();
|
||||
static RimObservedDataCollection* observedDataCollection();
|
||||
@@ -66,10 +64,6 @@ public:
|
||||
static RimSummaryMultiPlot* parentSummaryMultiPlot( caf::PdmObject* object );
|
||||
static RimSummaryMultiPlotCollection* parentSummaryPlotCollection( caf::PdmObject* object );
|
||||
|
||||
static RimSummaryCrossPlot* parentCrossPlot( caf::PdmObject* object );
|
||||
static RimSummaryCrossPlotCollection* parentCrossPlotCollection( caf::PdmObject* object );
|
||||
static bool isSummaryCrossPlot( const RimSummaryPlot* plot );
|
||||
|
||||
static RimSummaryTable* parentSummaryTable( caf::PdmObject* object );
|
||||
static RimSummaryTableCollection* parentSummaryTableCollection( caf::PdmObject* object );
|
||||
|
||||
@@ -88,4 +82,7 @@ public:
|
||||
|
||||
static QList<caf::PdmOptionItemInfo> optionsForAllSummaryCases();
|
||||
static QList<caf::PdmOptionItemInfo> optionsForSummaryCases( const std::vector<RimSummaryCase*>& cases );
|
||||
|
||||
static void copyCurveDataSources( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve );
|
||||
static void copyCurveAxisData( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve );
|
||||
};
|
||||
|
||||
@@ -32,12 +32,7 @@ bool RiaTextStringTools::compare( const QString& expected, const QString& actual
|
||||
// 2. report line numbers for all changes
|
||||
// 3. add support for compare with content of a text file on disk
|
||||
|
||||
if ( expected.compare( actual ) == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return expected.compare( actual ) == 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -198,12 +198,7 @@ void calculateNewStepsFromJacobi( double dR1_dq1,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool isZeroCrossing( double newError, double oldError, double maxError )
|
||||
{
|
||||
if ( ( newError < -maxError && maxError < oldError ) || ( newError > maxError && -maxError > oldError ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return ( newError < -maxError && maxError < oldError ) || ( newError > maxError && -maxError > oldError );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -237,8 +232,8 @@ void RiaSCurveCalculator::initializeByFinding_q1q2( cvf::Vec3d p1, double azi1,
|
||||
|
||||
if ( ev_0.curveStatus() == RiaSCurveCalculator::OK_INFINITE_RADIUS12 )
|
||||
{
|
||||
*this = ev_0;
|
||||
this->m_solveStatus = CONVERGED;
|
||||
*this = ev_0;
|
||||
m_solveStatus = CONVERGED;
|
||||
return;
|
||||
} // Todo: Handle infinite radius in one place
|
||||
|
||||
|
||||
@@ -148,6 +148,7 @@ list(
|
||||
ProjectDataModelCommands/CommandRouter/CMakeLists_files.cmake
|
||||
GeoMech/GeoMechVisualization/CMakeLists_files.cmake
|
||||
ModelVisualization/CMakeLists_files.cmake
|
||||
ModelVisualization/Faults/CMakeLists_files.cmake
|
||||
ModelVisualization/GridBox/CMakeLists_files.cmake
|
||||
ModelVisualization/Intersections/CMakeLists_files.cmake
|
||||
ModelVisualization/Seismic/CMakeLists_files.cmake
|
||||
@@ -202,7 +203,7 @@ list(APPEND RI_PRIVATE_INCLUDES ${RESINSIGHT_OPENVDS_API_DIR}/include)
|
||||
# Configure include directories if opm-common.lib is downloaded and linked
|
||||
# without building from source
|
||||
#
|
||||
if(NOT BUILD_FROM_SOURCE)
|
||||
if(NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE)
|
||||
list(APPEND RI_PUBLIC_INCLUDES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/custom-opm-common/opm-common
|
||||
)
|
||||
@@ -395,6 +396,7 @@ target_include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/FileInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Faults
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/GridBox
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Intersections
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Seismic
|
||||
|
||||
@@ -168,9 +168,7 @@ bool RicfCreateMultipleFractures::validateArguments() const
|
||||
{
|
||||
bool valid = m_caseId >= 0 && m_templateId >= 0;
|
||||
|
||||
if ( valid ) return true;
|
||||
|
||||
return false;
|
||||
return valid;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -42,10 +42,8 @@ RicfCreateView::RicfCreateView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmScriptResponse RicfCreateView::execute()
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
if ( rimCase->caseId() == m_caseId() )
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
|
||||
#include <QStringList>
|
||||
@@ -90,9 +89,6 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "LGR" );
|
||||
}
|
||||
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
auto feature = dynamic_cast<RicExportLgrFeature*>( commandManager->getCommandFeature( "RicExportLgrFeature" ) );
|
||||
|
||||
RimEclipseCase* eclipseCase = TOOLS::caseFromId( m_caseId() );
|
||||
if ( !eclipseCase )
|
||||
{
|
||||
@@ -104,16 +100,16 @@ caf::PdmScriptResponse RicfExportLgrForCompletions::execute()
|
||||
caf::VecIjk lgrCellCounts( m_refinementI, m_refinementJ, m_refinementK );
|
||||
QStringList wellsIntersectingOtherLgrs;
|
||||
|
||||
feature->exportLgrsForWellPaths( exportFolder,
|
||||
wellPaths,
|
||||
eclipseCase,
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{ RigCompletionData::CompletionType::PERFORATION,
|
||||
RigCompletionData::CompletionType::FRACTURE,
|
||||
RigCompletionData::CompletionType::FISHBONES },
|
||||
&wellsIntersectingOtherLgrs );
|
||||
RicExportLgrFeature::exportLgrsForWellPaths( exportFolder,
|
||||
wellPaths,
|
||||
eclipseCase,
|
||||
m_timeStep,
|
||||
lgrCellCounts,
|
||||
m_splitType(),
|
||||
{ RigCompletionData::CompletionType::PERFORATION,
|
||||
RigCompletionData::CompletionType::FRACTURE,
|
||||
RigCompletionData::CompletionType::FISHBONES },
|
||||
&wellsIntersectingOtherLgrs );
|
||||
|
||||
caf::PdmScriptResponse response;
|
||||
if ( !wellsIntersectingOtherLgrs.empty() )
|
||||
|
||||
@@ -89,7 +89,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
QByteArray curState = mainWnd->dockManager()->saveState( 0 );
|
||||
mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
QApplication::processEvents();
|
||||
|
||||
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
|
||||
|
||||
@@ -131,7 +131,7 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir, activateWidget, m_prefix, m_viewId(), fileSuffix );
|
||||
}
|
||||
|
||||
RiaGuiApplication::instance()->processEvents();
|
||||
QApplication::processEvents();
|
||||
|
||||
mainWnd->dockManager()->restoreState( curState );
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
PNG,
|
||||
PDF
|
||||
};
|
||||
typedef caf::AppEnum<PlotOutputFormat> PreferredOutputFormatEnum;
|
||||
using PreferredOutputFormatEnum = caf::AppEnum<PlotOutputFormat>;
|
||||
|
||||
enum class SnapshotsType
|
||||
{
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
PLOTS,
|
||||
ALL
|
||||
};
|
||||
typedef caf::AppEnum<SnapshotsType> SnapshotsTypeEnum;
|
||||
using SnapshotsTypeEnum = caf::AppEnum<SnapshotsType>;
|
||||
|
||||
public:
|
||||
RicfExportSnapshots();
|
||||
|
||||
@@ -50,7 +50,7 @@ CAF_PDM_SOURCE_INIT( RicfExportWellLogPlotDataResult, "exportWellLogPlotDataResu
|
||||
RicfExportWellLogPlotDataResult::RicfExportWellLogPlotDataResult()
|
||||
{
|
||||
CAF_PDM_InitObject( "export_well_data_result" );
|
||||
CAF_PDM_InitFieldNoDefault( &this->exportedFiles, "exportedFiles", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &exportedFiles, "exportedFiles", "" );
|
||||
}
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RicfExportWellLogPlotData, "exportWellLogPlotData" );
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
LAS,
|
||||
ASCII
|
||||
};
|
||||
typedef caf::AppEnum<ExportFormat> ExportFormatEnum;
|
||||
using ExportFormatEnum = caf::AppEnum<ExportFormat>;
|
||||
|
||||
public:
|
||||
RicfExportWellLogPlotData();
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaWellNameComparer.h"
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RicfExportWellPaths, "exportWellPaths" );
|
||||
@@ -83,15 +82,11 @@ caf::PdmScriptResponse RicfExportWellPaths::execute()
|
||||
exportFolder = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath( "wellpaths" );
|
||||
}
|
||||
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
auto feature =
|
||||
dynamic_cast<RicExportSelectedWellPathsFeature*>( commandManager->getCommandFeature( "RicExportSelectedWellPathsFeature" ) );
|
||||
|
||||
for ( const auto wellPath : wellPaths )
|
||||
{
|
||||
if ( wellPath )
|
||||
{
|
||||
feature->exportWellPath( wellPath, m_mdStepSize, exportFolder, false );
|
||||
RicExportSelectedWellPathsFeature::exportWellPath( wellPath, m_mdStepSize, exportFolder, false );
|
||||
}
|
||||
}
|
||||
return caf::PdmScriptResponse();
|
||||
|
||||
@@ -64,8 +64,7 @@ caf::PdmScriptResponse RicfImportFormationNames::execute()
|
||||
if ( formationNames )
|
||||
{
|
||||
bool foundCase = false;
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( m_applyToCaseId() == -1 || ( rimCase->caseId() == m_applyToCaseId() ) )
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "WellLogCommands/RicWellLogsImportFileFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RimWellLogFile.h"
|
||||
#include "RimWellLogLasFile.h"
|
||||
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
|
||||
@@ -100,12 +100,12 @@ caf::PdmScriptResponse RicfImportWellLogFiles::execute()
|
||||
|
||||
if ( !wellLogFilePaths.empty() )
|
||||
{
|
||||
std::vector<RimWellLogFile*> importedWellLogFiles =
|
||||
std::vector<RimWellLogLasFile*> importedWellLogFiles =
|
||||
RicWellLogsImportFileFeature::importWellLogFiles( wellLogFilePaths, &warningMessages );
|
||||
if ( !importedWellLogFiles.empty() )
|
||||
{
|
||||
RicfImportWellLogFilesResult* result = new RicfImportWellLogFilesResult;
|
||||
for ( RimWellLogFile* wellLogFile : importedWellLogFiles )
|
||||
for ( RimWellLogLasFile* wellLogFile : importedWellLogFiles )
|
||||
{
|
||||
result->wellPathNames.v().push_back( wellLogFile->wellName() );
|
||||
}
|
||||
|
||||
@@ -69,11 +69,10 @@ void RicfSetTimeStep::setTimeStepIndex( int timeStepIndex )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmScriptResponse RicfSetTimeStep::execute()
|
||||
{
|
||||
RimCase* rimCase = nullptr;
|
||||
std::vector<RimCase*> allCases;
|
||||
RimCase* rimCase = nullptr;
|
||||
|
||||
{
|
||||
RimProject::current()->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = RimProject::current()->allGridCases();
|
||||
|
||||
bool foundCase = false;
|
||||
for ( RimCase* c : allCases )
|
||||
|
||||
@@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewAnalysisPlotFeature, "RicNewAnalysisPlotFeature" );
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewAnalysisPlotFeature::isCommandEnabled()
|
||||
bool RicNewAnalysisPlotFeature::isCommandEnabled() const
|
||||
{
|
||||
if ( caf::firstAncestorOfTypeFromSelectedObject<RimAnalysisPlotCollection>() ) return true;
|
||||
if ( caf::firstAncestorOfTypeFromSelectedObject<RimSummaryPlot>() ) return true;
|
||||
|
||||
@@ -28,7 +28,7 @@ class RicNewAnalysisPlotFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -34,13 +34,11 @@ CAF_CMD_SOURCE_INIT( RicNewPlotDataFilterFeature, "RicNewPlotDataFilterFeature"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPlotDataFilterFeature::isCommandEnabled()
|
||||
bool RicNewPlotDataFilterFeature::isCommandEnabled() const
|
||||
{
|
||||
RimAnalysisPlot* analysisPlot = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimAnalysisPlot>();
|
||||
|
||||
if ( analysisPlot ) return true;
|
||||
|
||||
return false;
|
||||
return analysisPlot != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -28,7 +28,7 @@ class RicNewPlotDataFilterFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateReachCircleAnnotationFeature, "RicCreateReachCircl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateReachCircleAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateReachCircleAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
||||
@@ -32,7 +32,7 @@ class RicCreateReachCircleAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationFeature, "RicCreateTextAnnotationFea
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateTextAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateTextAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjsGlobal = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selObjs2InView = caf::selectedObjectsByTypeStrict<RimAnnotationInViewCollection*>();
|
||||
|
||||
@@ -34,7 +34,7 @@ class RicCreateTextAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
||||
@@ -39,14 +39,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationIn3dViewFeature, "RicCreateTextAnnotationIn3dViewFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateTextAnnotationIn3dViewFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -28,7 +28,6 @@ class RicCreateTextAnnotationIn3dViewFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateUserDefinedPolylinesAnnotationFeature, "RicCreateU
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled()
|
||||
bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
||||
@@ -32,7 +32,7 @@ class RicCreateUserDefinedPolylinesAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicImportPolylinesAnnotationFeature, "RicImportPolylinesAnn
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicImportPolylinesAnnotationFeature::isCommandEnabled()
|
||||
bool RicImportPolylinesAnnotationFeature::isCommandEnabled() const
|
||||
{
|
||||
auto selObjs = caf::selectedObjectsByTypeStrict<RimAnnotationCollection*>();
|
||||
auto selGroupColl = caf::selectedObjectsByTypeStrict<RimAnnotationGroupCollection*>();
|
||||
|
||||
@@ -28,7 +28,7 @@ class RicImportPolylinesAnnotationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
bool isCommandEnabled() const override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ RicTextAnnotation3dEditor::~RicTextAnnotation3dEditor()
|
||||
ownerRiuViewer->removeStaticModel( m_cvfModel.p() );
|
||||
}
|
||||
|
||||
auto textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||
auto textAnnot = dynamic_cast<RimTextAnnotation*>( pdmObject() );
|
||||
if ( textAnnot )
|
||||
{
|
||||
textAnnot->m_anchorPointXyd.uiCapability()->removeFieldEditor( this );
|
||||
@@ -70,7 +70,7 @@ RicTextAnnotation3dEditor::~RicTextAnnotation3dEditor()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigName )
|
||||
{
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( pdmObject() );
|
||||
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
|
||||
Rim3dView* view = mainOrComparisonView();
|
||||
|
||||
@@ -102,7 +102,7 @@ void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
||||
}
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> dispXf = view->displayCoordTransform();
|
||||
double handleSize = 0.7 * view->ownerCase()->characteristicCellSize();
|
||||
double handleSize = 0.7 * view->characteristicCellSize();
|
||||
|
||||
cvf::Vec3d labelPos( textAnnot->m_labelPointXyd() );
|
||||
labelPos.z() *= -1.0;
|
||||
@@ -126,7 +126,7 @@ void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigNam
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicTextAnnotation3dEditor::cleanupBeforeSettingPdmObject()
|
||||
{
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( pdmObject() );
|
||||
if ( textAnnot )
|
||||
{
|
||||
textAnnot->m_anchorPointXyd.uiCapability()->removeFieldEditor( this );
|
||||
@@ -139,7 +139,7 @@ void RicTextAnnotation3dEditor::cleanupBeforeSettingPdmObject()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicTextAnnotation3dEditor::slotLabelUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& tangent )
|
||||
{
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( pdmObject() );
|
||||
|
||||
if ( !textAnnot )
|
||||
{
|
||||
@@ -154,7 +154,7 @@ void RicTextAnnotation3dEditor::slotLabelUpdated( const cvf::Vec3d& origin, cons
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicTextAnnotation3dEditor::slotAnchorUpdated( const cvf::Vec3d& origin, const cvf::Vec3d& dummy )
|
||||
{
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( this->pdmObject() );
|
||||
RimTextAnnotation* textAnnot = dynamic_cast<RimTextAnnotation*>( pdmObject() );
|
||||
|
||||
if ( !textAnnot )
|
||||
{
|
||||
|
||||
@@ -24,20 +24,12 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCloseProjectFeature, "RicCloseProjectFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCloseProjectFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCloseProjectFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
disableModelChangeContribution();
|
||||
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
if ( !app || !app->askUserToSaveModifiedProject() ) return;
|
||||
|
||||
@@ -28,7 +28,6 @@ class RicCloseProjectFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -35,14 +35,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicEditPreferencesFeature, "RicEditPreferencesFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEditPreferencesFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<caf::FontHolderInterface*> findFontObjects()
|
||||
{
|
||||
auto project = RimProject::current();
|
||||
@@ -61,7 +53,7 @@ std::vector<caf::FontHolderInterface*> findFontObjects()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicEditPreferencesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
disableModelChangeContribution();
|
||||
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ class RicEditPreferencesFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
|
||||
@@ -27,20 +27,12 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExitApplicationFeature, "RicExitApplicationFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExitApplicationFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExitApplicationFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
disableModelChangeContribution();
|
||||
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
if ( !app->askUserToSaveModifiedProject() ) return;
|
||||
|
||||
@@ -28,7 +28,6 @@ class RicExitApplicationFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -35,14 +35,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicExportObjectAndFieldKeywordsFeature, "RicExportObjectAndFieldKeywordsFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicExportObjectAndFieldKeywordsFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||